From 5047f40693176e2cde19ecec8358362c84971d35 Mon Sep 17 00:00:00 2001 From: Olof Kindgren Date: Mon, 4 Nov 2024 21:25:33 +0100 Subject: [PATCH] Fix quoting and make libdirs --- edalize/tools/vcs.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/edalize/tools/vcs.py b/edalize/tools/vcs.py index dad76fd9..063588be 100644 --- a/edalize/tools/vcs.py +++ b/edalize/tools/vcs.py @@ -78,7 +78,11 @@ def setup(self, edam): _args = [] for k, v in vlog_defines.items(): - _args.append("+define+{}={}".format(k, self._param_value_str(v))) + _args.append( + "+define+{}={}".format( + k, self._param_value_str(v, str_quote_style='\\"') + ) + ) defines = " ".join(_args) cmd = "vlogan" elif file_type.startswith("vhdlSource"): @@ -118,7 +122,7 @@ def setup(self, edam): depfiles.append(fname) if cmd == "vlogan": has_vlog = True - commands = [] + commands = [["mkdir", lib]] for (cmd, defines), fnames in cmds.items(): if cmd == "vlogan": options = vlogan_options.copy() @@ -152,6 +156,14 @@ def setup(self, edam): [self.name], ) self.commands.set_default_target(self.name) + self.libs = libs.keys() + + def write_config_files(self): + s = "WORK > DEFAULT\nDEFAULT : ./work\n" + for lib in self.libs: + if lib != "work": + s += f"{lib} : ./{lib}\n" + self.update_config_file("synopsys_sim.setup", s) def run(self): args = ["run"]