mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-23 13:04:28 +00:00
Allow Verilator to pass extra args at compile time (like -G...)
This commit is contained in:
parent
8b1d49b5d0
commit
c19916a1d0
4
bin/wsim
4
bin/wsim
@ -127,7 +127,7 @@ if (args.sim == "questa"):
|
||||
elif (args.sim == "verilator"):
|
||||
# PWD=${WALLY}/sim CONFIG=rv64gc TESTSUITE=arch64i
|
||||
print(f"Running Verilator on {args.config} {args.testsuite}")
|
||||
os.system(f"/usr/bin/make -C {regressionDir}/verilator WALLYCONF={args.config} TEST={args.testsuite} TESTBENCH={args.tb} EXTRA_ARGS='{args.args}'")
|
||||
os.system(f"/usr/bin/make -C {regressionDir}/verilator WALLYCONF={args.config} TEST={args.testsuite} TESTBENCH={args.tb} EXTRA_ARGS=\"{args.args}\"")
|
||||
elif (args.sim == "vcs"):
|
||||
print(f"Running VCS on " + args.config + " " + args.testsuite)
|
||||
if (args.gui):
|
||||
@ -135,7 +135,7 @@ elif (args.sim == "vcs"):
|
||||
if (args.args == ""):
|
||||
vcsargs = ""
|
||||
else:
|
||||
vcsargs = " --args " + args.args
|
||||
vcsargs = " --args \"" + args.args + "\""
|
||||
if (ElfFile != ""):
|
||||
ElfFile = " --elffile " + ElfFile
|
||||
cmd = cd + "; " + prefix + " ./run_vcs " + args.config + " " + args.testsuite + vcsargs + ElfFile + " " + flags
|
||||
|
@ -12,6 +12,8 @@ NONPROF?=--stats
|
||||
VERILATOR_DIR=${WALLY}/sim/verilator
|
||||
SOURCE=${WALLY}/config/shared/*.vh ${WALLY}/config/${WALLYCONF} ${WALLY}/config/deriv/${WALLYCONF} ${WALLY}/src/cvw.sv ${WALLY}/testbench/*.sv ${WALLY}/testbench/common/*.sv ${WALLY}/src/*/*.sv ${WALLY}/src/*/*/*.sv
|
||||
EXTRA_ARGS=
|
||||
PLUS_ARGS:=$(filter pattern +%, $(EXTRA_ARGS))
|
||||
PARAM_ARGS:=$(filter-out pattern +%, $(EXTRA_ARGS))
|
||||
|
||||
|
||||
WALLYCONF?=rv64gc
|
||||
@ -44,7 +46,7 @@ default: run
|
||||
|
||||
run: wkdir/$(WALLYCONF)_$(TEST)/V${TESTBENCH}
|
||||
mkdir -p $(VERILATOR_DIR)/logs
|
||||
wkdir/$(WALLYCONF)_$(TEST)/V${TESTBENCH} ${ARGTEST} $(EXTRA_ARGS)
|
||||
wkdir/$(WALLYCONF)_$(TEST)/V${TESTBENCH} ${ARGTEST} $(PLUS_ARGS)
|
||||
|
||||
profile: obj_dir_profiling/V${TESTBENCH}_$(WALLYCONF)
|
||||
$(VERILATOR_DIR)/obj_dir_profiling/V${TESTBENCH}_$(WALLYCONF) ${ARGTEST}
|
||||
@ -65,6 +67,7 @@ wkdir/$(WALLYCONF)_$(TEST)/V${TESTBENCH}: $(DEPENDENCIES)
|
||||
$(INCLUDE_PATH) \
|
||||
${WRAPPER} \
|
||||
${GTEST} \
|
||||
${PARAM_ARGS} \
|
||||
$(SOURCES)
|
||||
|
||||
obj_dir_profiling/V${TESTBENCH}_$(WALLYCONF): $(DEPENDENCIES)
|
||||
@ -77,6 +80,7 @@ obj_dir_profiling/V${TESTBENCH}_$(WALLYCONF): $(DEPENDENCIES)
|
||||
$(INCLUDE_PATH) \
|
||||
${WRAPPER} \
|
||||
${GTEST} \
|
||||
${PARAM_ARGS} \
|
||||
$(SOURCES)
|
||||
|
||||
clean:
|
||||
|
Loading…
Reference in New Issue
Block a user