diff --git a/edalize/tools/vcs.py b/edalize/tools/vcs.py index af26d38f..1ceb1375 100644 --- a/edalize/tools/vcs.py +++ b/edalize/tools/vcs.py @@ -108,6 +108,7 @@ def setup(self, edam): self.commands = EdaCommands() self.f_files = {} self.workdirs = [] + target_files = [] for lib, files in libs.items(): cmds = {} has_vlog = False @@ -130,9 +131,11 @@ def setup(self, edam): options += self.tool_options.get("vlogan_options", []) options += [defines] options += ["+incdir+" + d for d in incdirs] + target_file = "AN.DB/make.vlogan" elif cmd == "vhdlan": options += self.tool_options.get("vhdlan_options", []) - suffix = f".{i}" if i else "" + target_file = "64/vhmra.sdb" + suffix = f"_{i}" if i else "" f_file = f"{lib}{suffix}.f" f_files[f_file] = options workdir = lib + suffix @@ -142,9 +145,10 @@ def setup(self, edam): depfiles += include_files self.commands.add( [cmd] + full64 + ["-f", f_file, "-work", workdir] + fnames, - [workdir + "/AN.DB/make.vlogan"], + [workdir + "/" + target_file], depfiles + [f_file], ) + target_files.append(workdir + "/" + target_file) self.f_files.update(f_files) self.edam = edam.copy() @@ -158,9 +162,7 @@ def setup(self, edam): + full64 + ["-o", self.name, "-file", "vcs.f", "-parameters", "parameters.txt"], [self.name], - [x + "/AN.DB/make.vlogan" for x in self.workdirs] - + user_files - + ["vcs.f", "parameters.txt"], + target_files + user_files + ["vcs.f", "parameters.txt"], ) self.commands.add( diff --git a/tests/test_tool_vcs.py b/tests/test_tool_vcs.py index 17330cde..c503b93d 100644 --- a/tests/test_tool_vcs.py +++ b/tests/test_tool_vcs.py @@ -19,11 +19,11 @@ def test_tool_vcs(tool_fixture): tf.compare_config_files( [ "synopsys_sim.setup", - "libx.1.f", + "libx.f", "vcs.f", - "work.1.f", - "work.2.f", - "work.3.f", + "work.f", + "work_1.f", + "work_2.f", "parameters.txt", ] ) @@ -38,11 +38,11 @@ def test_tool_vcs_minimal(tool_fixture): tf.compare_config_files( [ "synopsys_sim.setup", - "libx.1.f", + "libx.f", "vcs.f", - "work.1.f", - "work.2.f", - "work.3.f", + "work.f", + "work_1.f", + "work_2.f", "parameters.txt", ] ) diff --git a/tests/tools/vcs/basic/Makefile b/tests/tools/vcs/basic/Makefile index 6be90828..49c1c573 100644 --- a/tests/tools/vcs/basic/Makefile +++ b/tests/tools/vcs/basic/Makefile @@ -2,17 +2,19 @@ all: design -work/AN.DB: sv_file.sv vlog_file.v vlog_with_define.v vlog05_file.v vhdl_file.vhd vhdl2008_file another_sv_file.sv vlog_incfile work.1.f work.2.f work.3.f - $(EDALIZE_LAUNCHER) mkdir -p work - $(EDALIZE_LAUNCHER) vlogan -full64 -f work.1.f -work work sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv - $(EDALIZE_LAUNCHER) vlogan -full64 -f work.2.f -work work vlog_with_define.v - $(EDALIZE_LAUNCHER) vhdlan -full64 -f work.3.f -work work vhdl_file.vhd vhdl2008_file +work/AN.DB/make.vlogan: sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv vlog_incfile work.f + $(EDALIZE_LAUNCHER) vlogan -full64 -f work.f -work work sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv -libx/AN.DB: vhdl_lfile libx.1.f - $(EDALIZE_LAUNCHER) mkdir -p libx - $(EDALIZE_LAUNCHER) vhdlan -full64 -f libx.1.f -work libx vhdl_lfile +work_1/AN.DB/make.vlogan: vlog_with_define.v vlog_incfile work_1.f + $(EDALIZE_LAUNCHER) vlogan -full64 -f work_1.f -work work_1 vlog_with_define.v -design: work/AN.DB libx/AN.DB user_file vcs.f parameters.txt +work_2/64/vhmra.sdb: vhdl_file.vhd vhdl2008_file vlog_incfile work_2.f + $(EDALIZE_LAUNCHER) vhdlan -full64 -f work_2.f -work work_2 vhdl_file.vhd vhdl2008_file + +libx/64/vhmra.sdb: vhdl_lfile libx.f + $(EDALIZE_LAUNCHER) vhdlan -full64 -f libx.f -work libx vhdl_lfile + +design: work/AN.DB/make.vlogan work_1/AN.DB/make.vlogan work_2/64/vhmra.sdb libx/64/vhmra.sdb user_file vcs.f parameters.txt $(EDALIZE_LAUNCHER) vcs -full64 -o design -file vcs.f -parameters parameters.txt run: design diff --git a/tests/tools/vcs/basic/libx.1.f b/tests/tools/vcs/basic/libx.f similarity index 100% rename from tests/tools/vcs/basic/libx.1.f rename to tests/tools/vcs/basic/libx.f diff --git a/tests/tools/vcs/basic/synopsys_sim.setup b/tests/tools/vcs/basic/synopsys_sim.setup index 07124e38..e4635d29 100644 --- a/tests/tools/vcs/basic/synopsys_sim.setup +++ b/tests/tools/vcs/basic/synopsys_sim.setup @@ -1,3 +1,5 @@ WORK > DEFAULT DEFAULT : ./work +work_1 : ./work_1 +work_2 : ./work_2 libx : ./libx diff --git a/tests/tools/vcs/basic/work.1.f b/tests/tools/vcs/basic/work.f similarity index 100% rename from tests/tools/vcs/basic/work.1.f rename to tests/tools/vcs/basic/work.f diff --git a/tests/tools/vcs/basic/work.2.f b/tests/tools/vcs/basic/work_1.f similarity index 100% rename from tests/tools/vcs/basic/work.2.f rename to tests/tools/vcs/basic/work_1.f diff --git a/tests/tools/vcs/basic/work.3.f b/tests/tools/vcs/basic/work_2.f similarity index 100% rename from tests/tools/vcs/basic/work.3.f rename to tests/tools/vcs/basic/work_2.f diff --git a/tests/tools/vcs/minimal/Makefile b/tests/tools/vcs/minimal/Makefile index ef6097cd..f6c67c1a 100644 --- a/tests/tools/vcs/minimal/Makefile +++ b/tests/tools/vcs/minimal/Makefile @@ -2,17 +2,19 @@ all: design -work/AN.DB: sv_file.sv vlog_file.v vlog_with_define.v vlog05_file.v vhdl_file.vhd vhdl2008_file another_sv_file.sv vlog_incfile work.1.f work.2.f work.3.f - $(EDALIZE_LAUNCHER) mkdir -p work - $(EDALIZE_LAUNCHER) vlogan -full64 -f work.1.f -work work sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv - $(EDALIZE_LAUNCHER) vlogan -full64 -f work.2.f -work work vlog_with_define.v - $(EDALIZE_LAUNCHER) vhdlan -full64 -f work.3.f -work work vhdl_file.vhd vhdl2008_file +work/AN.DB/make.vlogan: sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv vlog_incfile work.f + $(EDALIZE_LAUNCHER) vlogan -full64 -f work.f -work work sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv -libx/AN.DB: vhdl_lfile libx.1.f - $(EDALIZE_LAUNCHER) mkdir -p libx - $(EDALIZE_LAUNCHER) vhdlan -full64 -f libx.1.f -work libx vhdl_lfile +work_1/AN.DB/make.vlogan: vlog_with_define.v vlog_incfile work_1.f + $(EDALIZE_LAUNCHER) vlogan -full64 -f work_1.f -work work_1 vlog_with_define.v -design: work/AN.DB libx/AN.DB user_file vcs.f parameters.txt +work_2/64/vhmra.sdb: vhdl_file.vhd vhdl2008_file vlog_incfile work_2.f + $(EDALIZE_LAUNCHER) vhdlan -full64 -f work_2.f -work work_2 vhdl_file.vhd vhdl2008_file + +libx/64/vhmra.sdb: vhdl_lfile libx.f + $(EDALIZE_LAUNCHER) vhdlan -full64 -f libx.f -work libx vhdl_lfile + +design: work/AN.DB/make.vlogan work_1/AN.DB/make.vlogan work_2/64/vhmra.sdb libx/64/vhmra.sdb user_file vcs.f parameters.txt $(EDALIZE_LAUNCHER) vcs -full64 -o design -file vcs.f -parameters parameters.txt run: design diff --git a/tests/tools/vcs/minimal/libx.1.f b/tests/tools/vcs/minimal/libx.f similarity index 100% rename from tests/tools/vcs/minimal/libx.1.f rename to tests/tools/vcs/minimal/libx.f diff --git a/tests/tools/vcs/minimal/synopsys_sim.setup b/tests/tools/vcs/minimal/synopsys_sim.setup index 07124e38..e4635d29 100644 --- a/tests/tools/vcs/minimal/synopsys_sim.setup +++ b/tests/tools/vcs/minimal/synopsys_sim.setup @@ -1,3 +1,5 @@ WORK > DEFAULT DEFAULT : ./work +work_1 : ./work_1 +work_2 : ./work_2 libx : ./libx diff --git a/tests/tools/vcs/minimal/work.1.f b/tests/tools/vcs/minimal/work.f similarity index 100% rename from tests/tools/vcs/minimal/work.1.f rename to tests/tools/vcs/minimal/work.f diff --git a/tests/tools/vcs/minimal/work.2.f b/tests/tools/vcs/minimal/work_1.f similarity index 100% rename from tests/tools/vcs/minimal/work.2.f rename to tests/tools/vcs/minimal/work_1.f diff --git a/tests/tools/vcs/minimal/work.3.f b/tests/tools/vcs/minimal/work_2.f similarity index 100% rename from tests/tools/vcs/minimal/work.3.f rename to tests/tools/vcs/minimal/work_2.f