Skip to content

Commit

Permalink
Add .vsim suffix to VCS-compiled model
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Dec 12, 2024
1 parent f23e0cf commit af285da
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
9 changes: 5 additions & 4 deletions edalize/tools/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,19 +157,20 @@ def setup(self, edam):
self.f_files["vcs.f"] = ["-top", self.toplevel] + self.tool_options.get(
"vcs_options", []
)
binary_name = self.name + ".vsim"
self.commands.add(
["vcs"]
+ full64
+ ["-o", self.name, "-file", "vcs.f", "-parameters", "parameters.txt"],
[self.name],
+ ["-o", binary_name, "-file", "vcs.f", "-parameters", "parameters.txt"],
[binary_name],
target_files + user_files + ["vcs.f", "parameters.txt"],
)

self.commands.add(
["./" + self.name, "$(EXTRA_OPTIONS)"]
["./" + binary_name, "$(EXTRA_OPTIONS)"]
+ self.tool_options.get("run_options", []),
["run"],
[self.name],
[binary_name],
)
self.commands.set_default_target(self.name)

Expand Down
8 changes: 4 additions & 4 deletions tests/tools/vcs/basic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ work_2/64/vhmra.sdb: vhdl_file.vhd vhdl2008_file vlog_incfile work_2.f
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
design.vsim: 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.vsim -file vcs.f -parameters parameters.txt

run: design
$(EDALIZE_LAUNCHER) ./design $(EXTRA_OPTIONS) and some run options
run: design.vsim
$(EDALIZE_LAUNCHER) ./design.vsim $(EXTRA_OPTIONS) and some run options
8 changes: 4 additions & 4 deletions tests/tools/vcs/minimal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ work_2/64/vhmra.sdb: vhdl_file.vhd vhdl2008_file vlog_incfile work_2.f
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
design.vsim: 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.vsim -file vcs.f -parameters parameters.txt

run: design
$(EDALIZE_LAUNCHER) ./design $(EXTRA_OPTIONS)
run: design.vsim
$(EDALIZE_LAUNCHER) ./design.vsim $(EXTRA_OPTIONS)

0 comments on commit af285da

Please sign in to comment.