Skip to content

Commit

Permalink
Add .simv 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 4a5dd41
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
11 changes: 6 additions & 5 deletions edalize/tools/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,21 +157,22 @@ def setup(self, edam):
self.f_files["vcs.f"] = ["-top", self.toplevel] + self.tool_options.get(
"vcs_options", []
)
binary_name = self.name + ".simv"
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)
self.commands.set_default_target(binary_name)

def write_config_files(self):
s = "WORK > DEFAULT\nDEFAULT : ./work\n"
Expand Down
10 changes: 5 additions & 5 deletions tests/tools/vcs/basic/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Auto generated by Edalize

all: design
all: design.simv

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
Expand All @@ -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.simv: 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.simv -file vcs.f -parameters parameters.txt

run: design
$(EDALIZE_LAUNCHER) ./design $(EXTRA_OPTIONS) and some run options
run: design.simv
$(EDALIZE_LAUNCHER) ./design.simv $(EXTRA_OPTIONS) and some run options
10 changes: 5 additions & 5 deletions tests/tools/vcs/minimal/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Auto generated by Edalize

all: design
all: design.simv

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
Expand All @@ -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.simv: 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.simv -file vcs.f -parameters parameters.txt

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

0 comments on commit 4a5dd41

Please sign in to comment.