Skip to content

Commit

Permalink
wip: Add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
olofk committed Nov 11, 2024
1 parent 5283c42 commit bab0dc9
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/test_tool_vcs.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from .edalize_tool_common import tool_fixture


def test_tool_vcs(tool_fixture):

tool_options = {
"vlogan_options": ["a", "few", "vlogan", "options"],
"vlogan_options": ["also", "vhdlan", "options"],
"vcs_options": ["some", "vcs", "options"],
"run_options": ["and", "some", "run", "options"],
}

tf = tool_fixture("vcs", tool_options=tool_options, ref_subdir="basic")

name = "design"

tf.tool.configure()
tf.compare_config_files(["synopsys_sim.setup"])


def test_tool_vcs_minimal(tool_fixture):
tf = tool_fixture("vcs", ref_subdir="minimal")

name = "design"

tf.tool.configure()
tf.compare_config_files(["synopsys_sim.setup"])
18 changes: 18 additions & 0 deletions tests/tools/vcs/basic/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#Auto generated by Edalize

all: design

work: sv_file.sv vlog_file.v vlog05_file.v vhdl_file.vhd vhdl2008_file another_sv_file.sv vlog_incfile vlog_incfile
$(EDALIZE_LAUNCHER) mkdir work
$(EDALIZE_LAUNCHER) vlogan also vhdlan options +define+vlogdefine_bool=1 +define+vlogdefine_int=42 +define+vlogdefine_str=\"hello\" +incdir+. -work work sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv
$(EDALIZE_LAUNCHER) vhdlan -work work vhdl_file.vhd vhdl2008_file

libx: vhdl_lfile
$(EDALIZE_LAUNCHER) mkdir libx
$(EDALIZE_LAUNCHER) vhdlan -work libx vhdl_lfile

design: work libx user_file
$(EDALIZE_LAUNCHER) vcs -o design -top top_module some vcs options -pvalue+vlogparam_bool=1 -pvalue+vlogparam_int=42 -pvalue+vlogparam_str=hello

run: design
$(EDALIZE_LAUNCHER) ./design
3 changes: 3 additions & 0 deletions tests/tools/vcs/basic/synopsys_sim.setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WORK > DEFAULT
DEFAULT : ./work
libx : ./libx
18 changes: 18 additions & 0 deletions tests/tools/vcs/minimal/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#Auto generated by Edalize

all: design

work: sv_file.sv vlog_file.v vlog05_file.v vhdl_file.vhd vhdl2008_file another_sv_file.sv
$(EDALIZE_LAUNCHER) mkdir work
$(EDALIZE_LAUNCHER) vlogan +define+vlogdefine_bool=1 +define+vlogdefine_int=42 +define+vlogdefine_str=\"hello\" -work work sv_file.sv vlog_file.v vlog05_file.v another_sv_file.sv
$(EDALIZE_LAUNCHER) vhdlan -work work vhdl_file.vhd vhdl2008_file

libx: vhdl_lfile
$(EDALIZE_LAUNCHER) mkdir libx
$(EDALIZE_LAUNCHER) vhdlan -work libx vhdl_lfile

design: work libx user_file
$(EDALIZE_LAUNCHER) vcs -o design -top top_module -pvalue+vlogparam_bool=1 -pvalue+vlogparam_int=42 -pvalue+vlogparam_str=hello

run: design
$(EDALIZE_LAUNCHER) ./design
3 changes: 3 additions & 0 deletions tests/tools/vcs/minimal/synopsys_sim.setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
WORK > DEFAULT
DEFAULT : ./work
libx : ./libx

0 comments on commit bab0dc9

Please sign in to comment.