Generalize wsim gui flag and simplify questa launch command

This commit is contained in:
Jordan Carlin 2024-12-02 14:02:33 -08:00
parent edf96a7211
commit 479c6667fe
No known key found for this signature in database
2 changed files with 5 additions and 8 deletions

View file

@ -91,6 +91,8 @@ def prepSim(args, ElfFile):
flags += " --ccov"
if args.fcov:
flags += " --fcov"
if args.gui:
flags += " --gui"
prefix, suffix = lockstepSetup(args)
flags += suffix
return flags, prefix
@ -143,10 +145,7 @@ def runQuesta(args, flags, prefix):
args.params = f' --params \\"{args.params}\\"'
# Questa cannot accept more than 9 arguments. fcov implies lockstep
cmd = f"do wally.do {args.config} {args.testsuite} {args.tb} {args.args} {args.params} {flags}"
if (args.gui): # launch Questa with GUI; add +acc to keep variables accessible
cmd = f'cd $WALLY/sim/questa; {prefix} vsim -do "{cmd} +acc"'
else: # launch Questa in batch mode
cmd = f'cd $WALLY/sim/questa; {prefix} vsim -c -do "{cmd}"'
cmd = f'cd $WALLY/sim/questa; {prefix} vsim {"-c" if not args.gui else ""} -do "{cmd}"'
print(f"Running Questa with command: {cmd}")
os.system(cmd)
@ -156,8 +155,6 @@ def runVerilator(args, flags, prefix):
def runVCS(args, flags, prefix):
print(f"Running VCS on {args.config} {args.testsuite}")
# if (args.gui):
# flags += " --gui"
if (args.args != ""):
args.args = f' --args "{args.args}" '
if (args.params != ""):

View file

@ -8,7 +8,7 @@
#
# Takes 1:10 to run RV64IC tests using gui
# Usage: do wally.do <config> <testcases> <testbench> [--ccov] [--fcov] [+acc] [--args "any number of +value"] [--params "any number of VAR=VAL parameter overrides"]
# Usage: do wally.do <config> <testcases> <testbench> [--ccov] [--fcov] [--gui] [--args "any number of +value"] [--params "any number of VAR=VAL parameter overrides"]
# Example: do wally.do rv64gc arch64i testbench
# Use this wally.do file to run this example.
@ -91,7 +91,7 @@ echo "number of args = $argc"
echo "lst = $lst"
# if +acc found set flag and remove from list
if {[lcheck lst "+acc"]} {
if {[lcheck lst "--gui"]} {
set GUI 1
set accFlag "+acc"
}