From f07fd83ca9509835498420abbe54b08c7a434bdd Mon Sep 17 00:00:00 2001 From: Olof Kindgren Date: Tue, 26 Nov 2024 19:06:46 +0100 Subject: [PATCH] paramfix --- edalize/tools/vcs.py | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/edalize/tools/vcs.py b/edalize/tools/vcs.py index c382e50f..ebdeaa8c 100644 --- a/edalize/tools/vcs.py +++ b/edalize/tools/vcs.py @@ -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( @@ -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"]