Skip to content

Commit

Permalink
paramfix
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Nov 26, 2024
1 parent d8f1bc9 commit f07fd83
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions edalize/tools/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,20 +146,17 @@ def setup(self, edam):
self.edam = edam.copy()
self.edam["files"] = unused_files

_parameters = {**self.vlogparam, **self.generic}
parameters = []
for key, value in _parameters.items():
parameters += [f"-pvalue+{key}=" + self._param_value_str(value)]

self.f_files["vcs.f"] = (
["-top", self.toplevel]
+ self.tool_options.get("vcs_options", [])
+ parameters
self.f_files["vcs.f"] = ["-top", self.toplevel] + self.tool_options.get(
"vcs_options", []
)
self.commands.add(
["vcs"] + full64 + ["-o", self.name, "-file", "vcs.f"],
["vcs"]
+ full64
+ ["-o", self.name, "-file", "vcs.f", "-parameters", "parameters.txt"],
[self.name],
[x + "/AN.DB" for x in libs.keys()] + user_files + ["vcs.f"],
[x + "/AN.DB" for x in libs.keys()]
+ user_files
+ ["vcs.f", "parameters.txt"],
)

self.commands.add(
Expand All @@ -180,6 +177,13 @@ def write_config_files(self):
for k, v in self.f_files.items():
self.update_config_file(k, " ".join(v) + "\n")

_parameters = {**self.vlogparam, **self.generic}
parameters = []
s = ""
for key, value in _parameters.items():
s += f"assign {key} {self._param_value_str(value)}"
self.update_config_file("parameters.txt", s)

def run(self):
args = ["run"]

Expand Down

0 comments on commit f07fd83

Please sign in to comment.