mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Reorganizing sim directory for multiple simulators
This commit is contained in:
parent
499e4d6a6e
commit
a8a03d6011
4
Makefile
4
Makefile
@ -48,10 +48,12 @@ imperasdv_cov:
|
||||
vcover report -details -html sim/riscv.ucdb
|
||||
|
||||
funcovreg:
|
||||
iter-elf.bash --search ${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m --cover
|
||||
#iter-elf.bash --search ${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m --cover
|
||||
#iter-elf.bash --search ${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m/I --cover
|
||||
#iter-elf.bash --search ${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m/privilege --cover
|
||||
#iter-elf.bash --search ${WALLY}/tests/riscof/work/wally-riscv-arch-test/rv64i_m/Q --cover
|
||||
rm -f ${WALLY}/tests/riscof/work/riscv-arch-test/rv64i_m/*/src/*/dut/my.elf
|
||||
iter-elf.bash --search ${WALLY}/tests/riscof/work/riscv-arch-test/rv64i_m/I --cover
|
||||
vcover report -details -html sim/riscv.ucdb
|
||||
|
||||
coverage:
|
||||
|
2
sim/questa/coverage
Executable file
2
sim/questa/coverage
Executable file
@ -0,0 +1,2 @@
|
||||
# recompile coverage tests and run coverage including them
|
||||
pushd $WALLY/tests/coverage; make; popd; ./regression-wally -coverage
|
33
sim/wsim
Executable file
33
sim/wsim
Executable file
@ -0,0 +1,33 @@
|
||||
#!/usr/bin/python3
|
||||
#
|
||||
# wsim
|
||||
# David_Harris@hmc.edu 5 April 2024
|
||||
# Invoke a Wally simulation for a desired configuration and test suite or ELF on the specified simulator
|
||||
# usage: wsim CONFIG TESTSUITE [-s/--sim SIMULATOR] [-g/--gui]
|
||||
# example: wsim rv64gc arch64i
|
||||
# example: wsim rv64gc tests/riscof/work/riscv-arch-test/rv64i_m/I/src/ref/ref.elf
|
||||
# example: wsim rv32i arch32i -s verilator
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
|
||||
|
||||
import argparse
|
||||
|
||||
# Read arguments
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("config", help="Configuration file")
|
||||
parser.add_argument("testsuite", help="Test suite or ELF file")
|
||||
parser.add_argument("--sim", "-s", help="Simulator", choices=["questa", "verilator", "vcs"], default="questa")
|
||||
parser.add_argument("--gui", "-g", help="Simulate with GUI", action="store_true")
|
||||
args = parser.parse_args()
|
||||
print("Config: " + args.config + " tests " + args.testsuite + " sim " + args.sim + " gui " + str(args.gui))
|
||||
|
||||
if (args.sim == "questa"):
|
||||
cmd = "do wally-batch.do " + args.config + " " + args.testsuite
|
||||
system("vsim -c -do \"" + cmd + "\"")
|
||||
elif (args.sim == "verilator"):
|
||||
print("Running Verilator")
|
||||
elif (args.sim == "vcs"):
|
||||
print("Running VCS")
|
||||
else:
|
||||
print("Unknown simulator")
|
||||
exit(1)
|
Loading…
Reference in New Issue
Block a user