mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-23 13:04:28 +00:00
Merge pull request #941 from jordancarlin/imperas_verbose
Add Imperas lockstep verbose as wsim option
This commit is contained in:
commit
c60ee263ae
9
bin/wsim
9
bin/wsim
@ -35,6 +35,7 @@ parser.add_argument("--params", "-p", help="Optional top-level parameter overrid
|
||||
parser.add_argument("--vcd", "-v", help="Generate testbench.vcd", action="store_true")
|
||||
parser.add_argument("--lockstep", "-l", help="Run ImperasDV lock, step, and compare.", action="store_true")
|
||||
parser.add_argument("--locksteplog", "-b", help="Retired instruction number to be begin logging.", default=0)
|
||||
parser.add_argument("--lockstepverbose", "-lv", help="Run ImperasDV lock, step, and compare with tracing enabled", action="store_true")
|
||||
parser.add_argument("--covlog", "-d", help="Log coverage after n instructions.", default=0)
|
||||
parser.add_argument("--rvvi", "-r", help="Simulate rvvi hardware interface and ethernet.", action="store_true")
|
||||
args = parser.parse_args()
|
||||
@ -68,7 +69,7 @@ if(args.testsuite.endswith('.elf') and args.elf == ""): # No --elf argument; che
|
||||
|
||||
|
||||
# Validate arguments
|
||||
if (args.gui or args.ccov or args.fcov or args.fcovimp or args.fcovrvvi or args.lockstep):
|
||||
if (args.gui or args.ccov or args.fcov or args.fcovimp or args.fcovrvvi or args.lockstep or args.lockstepverbose):
|
||||
if args.sim not in ["questa", "vcs"]:
|
||||
print("Option only supported for Questa and VCS")
|
||||
exit(1)
|
||||
@ -85,13 +86,13 @@ if (args.tb == "testbench_fp"):
|
||||
# if lockstep is enabled, then we need to pass the Imperas lockstep arguments
|
||||
if(int(args.locksteplog) >= 1): EnableLog = 1
|
||||
else: EnableLog = 0
|
||||
if((args.lockstep or args.fcov or args.fcovimp) and args.sim == "questa"):
|
||||
if((args.lockstep or args.lockstepverbose or args.fcov or args.fcovimp) and args.sim == "questa"):
|
||||
prefix = "IMPERAS_TOOLS=" + WALLY + "/config/"+args.config+"/imperas.ic"
|
||||
prefix = "MTI_VCO_MODE=64 " + prefix
|
||||
else:
|
||||
prefix = ""
|
||||
|
||||
if (args.lockstep):
|
||||
if (args.lockstep or args.lockstepverbose):
|
||||
if(args.locksteplog != 0): ImperasPlusArgs = " +IDV_TRACE2LOG=" + str(EnableLog) + " +IDV_TRACE2LOG_AFTER=" + str(args.locksteplog)
|
||||
else: ImperasPlusArgs = ""
|
||||
if(args.fcovimp):
|
||||
@ -109,6 +110,8 @@ if (args.lockstep):
|
||||
else:
|
||||
CovEnableStr = ""
|
||||
suffix = "--lockstep"
|
||||
if(args.lockstepverbose):
|
||||
prefix += ":" + WALLY + "/sim/imperas-verbose.ic"
|
||||
else:
|
||||
ImperasPlusArgs = ""
|
||||
suffix = ""
|
||||
|
@ -109,11 +109,5 @@
|
||||
#-override refRoot/cpu/cv/cover=basic
|
||||
#-override refRoot/cpu/cv/extensions=RV32I
|
||||
|
||||
# Add Imperas simulator application instruction tracing
|
||||
# uncomment these to provide tracing
|
||||
#--verbose --trace --tracechange --traceshowicount --tracemode -tracemem ASX --monitornetschange # --traceafter 300000000
|
||||
#--override cpu/debugflags=6 --override cpu/verbose=1
|
||||
#--override cpu/show_c_prefix=T
|
||||
|
||||
# Store simulator output to logfile
|
||||
--output imperas.log
|
||||
|
@ -107,11 +107,5 @@
|
||||
#-override refRoot/cpu/cv/cover=basic
|
||||
#-override refRoot/cpu/cv/extensions=RV32I
|
||||
|
||||
# Add Imperas simulator application instruction tracing
|
||||
# uncomment these to provide tracing
|
||||
#--verbose --trace --tracechange --traceshowicount --tracemode -tracemem ASX --monitornetschange # --traceafter 300000000
|
||||
#--override cpu/debugflags=6 --override cpu/verbose=1
|
||||
#--override cpu/show_c_prefix=T
|
||||
|
||||
# Store simulator output to logfile
|
||||
--output imperas.log
|
||||
|
4
sim/imperas-verbose.ic
Normal file
4
sim/imperas-verbose.ic
Normal file
@ -0,0 +1,4 @@
|
||||
# Add Imperas simulator application instruction tracing
|
||||
--verbose --trace --tracechange --traceshowicount --tracemode -tracemem ASX --monitornetschange # --traceafter 300000000
|
||||
--override cpu/debugflags=6 --override cpu/verbose=1
|
||||
--override cpu/show_c_prefix=T
|
@ -73,7 +73,6 @@ set FCdefineCOVER_EXTS {}
|
||||
set lockstep 0
|
||||
set lockstepvlog ""
|
||||
set SVLib ""
|
||||
set OtherFlags ""
|
||||
|
||||
set GUI 0
|
||||
set accFlag ""
|
||||
@ -201,7 +200,7 @@ vlog -lint +nowarnRDGN -work ${WKDIR} {*}${INC_DIRS} {*}${FCvlog} {*}${FCdefineC
|
||||
# remove +acc flag for faster sim during regressions if there is no need to access internal signals
|
||||
vopt $accFlag wkdir/${CFG}_${TESTSUITE}.${TESTBENCH} -work ${WKDIR} {*}${ExpandedParamArgs} -o testbenchopt ${CoverageVoptArg}
|
||||
|
||||
vsim -lib ${WKDIR} testbenchopt +TEST=${TESTSUITE} {*}${PlusArgs} -fatal 7 {*}${SVLib} ${OtherFlags} {*}${FCvopt} -suppress 3829 ${CoverageVsimArg}
|
||||
vsim -lib ${WKDIR} testbenchopt +TEST=${TESTSUITE} {*}${PlusArgs} -fatal 7 {*}${SVLib} {*}${FCvopt} -suppress 3829 ${CoverageVsimArg}
|
||||
|
||||
# power add generates the logging necessary for saif generation.
|
||||
# power add -r /dut/core/*
|
||||
|
Loading…
Reference in New Issue
Block a user