Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions edalize/genus.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ def make_list(opt):
jobs = self.tool_options.get("jobs", None)
jobs = "$nproc" if "all" in jobs else jobs

# Build up parameters in the format that the `elaborate` command expects
parameters = [f"{{ {name} {value} }}" for name, value in self.vlogparam.items()]
elaborate_parameters = "{ " + " ".join(parameters) + " }"

template_vars = {
"name": self.name,
"src_files": src_files,
Expand All @@ -95,6 +99,7 @@ def make_list(opt):
"genus_script": make_list(self.tool_options.get("genus_script")),
"report_dir": make_list(self.tool_options.get("report_dir")),
"common_config": make_list(self.tool_options.get("common_config")),
"parameters": elaborate_parameters,
"jobs": make_list(jobs),
"toplevel": self.toplevel,
}
Expand Down
6 changes: 6 additions & 0 deletions edalize/templates/genus/genus-project.tcl.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ set_multi_cpu_usage -local_cpu {{jobs}}

set READ_SOURCES {{ name }}-read-sources

# A variable containing all top-module parameters passed by FuseSoC, ready to
# be passed on to the `elaborate`-command (within the `$GENUS_SCRIPT` like this:
#
# elaborate -parameters "$ELABORATE_PARAMETERS" "$TOP_MODULE"
set ELABORATE_PARAMETERS {{ parameters }}

{% if script_dir -%}
set SCRIPT_DIR {{ script_dir }}
{% else %}
Expand Down