mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Fixed regression running; buildroot pending
This commit is contained in:
parent
9ee7544d3c
commit
347df26713
@ -232,15 +232,20 @@ def addTests(tests, sim):
|
|||||||
def search_log_for_text(text, logfile):
|
def search_log_for_text(text, logfile):
|
||||||
"""Search through the given log file for text, returning True if it is found or False if it is not"""
|
"""Search through the given log file for text, returning True if it is found or False if it is not"""
|
||||||
grepcmd = "grep -e '%s' '%s' > /dev/null" % (text, logfile)
|
grepcmd = "grep -e '%s' '%s' > /dev/null" % (text, logfile)
|
||||||
|
# print(" search_log_for_text invoking %s" % grepcmd)
|
||||||
return os.system(grepcmd) == 0
|
return os.system(grepcmd) == 0
|
||||||
|
|
||||||
def run_test_case(config):
|
def run_test_case(config):
|
||||||
"""Run the given test case, and return 0 if the test suceeds and 1 if it fails"""
|
"""Run the given test case, and return 0 if the test suceeds and 1 if it fails"""
|
||||||
logname = "$WALLY/sim/questa/logs/"+config.variant+"_"+config.name+".log"
|
logname = WALLY + "/sim/questa/logs/"+config.variant+"_"+config.name+".log" ### *** fix hardwiring to questa log
|
||||||
# cmd = config.cmd.format(logname)
|
#cmd = config.cmd + " > " + logname
|
||||||
|
if ("lint-wally" in config.cmd):
|
||||||
|
cmd = config.cmd + " | tee " + logname
|
||||||
|
else:
|
||||||
cmd = config.cmd + " > " + logname
|
cmd = config.cmd + " > " + logname
|
||||||
print(cmd)
|
print(cmd)
|
||||||
os.chdir(regressionDir)
|
os.chdir(regressionDir)
|
||||||
|
#print(" run_test_case invoking %s" % cmd)
|
||||||
os.system(cmd)
|
os.system(cmd)
|
||||||
if search_log_for_text(config.grepstr, logname):
|
if search_log_for_text(config.grepstr, logname):
|
||||||
print(f"{bcolors.OKGREEN}%s_%s: Success{bcolors.ENDC}" % (config.variant, config.name))
|
print(f"{bcolors.OKGREEN}%s_%s: Success{bcolors.ENDC}" % (config.variant, config.name))
|
||||||
@ -257,6 +262,8 @@ def run_test_case(config):
|
|||||||
regressionDir = os.path.dirname(os.path.abspath(__file__))
|
regressionDir = os.path.dirname(os.path.abspath(__file__))
|
||||||
os.chdir(regressionDir)
|
os.chdir(regressionDir)
|
||||||
|
|
||||||
|
WALLY = os.environ.get('WALLY')
|
||||||
|
|
||||||
coveragesim = "questa" # Questa is required for code/functional coverage
|
coveragesim = "questa" # Questa is required for code/functional coverage
|
||||||
defaultsim = "questa" # Default simulator for all other tests; change to Verilator when flow is ready
|
defaultsim = "questa" # Default simulator for all other tests; change to Verilator when flow is ready
|
||||||
|
|
||||||
@ -283,7 +290,7 @@ configs = [
|
|||||||
TestCase(
|
TestCase(
|
||||||
name="lints",
|
name="lints",
|
||||||
variant="all",
|
variant="all",
|
||||||
cmd="./lint-wally " + nightMode + " | tee {}",
|
cmd="lint-wally " + nightMode,
|
||||||
grepstr="lints run with no errors or warnings"
|
grepstr="lints run with no errors or warnings"
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
INSTR_LIMIT=0
|
|
||||||
INSTR_WAVEON=1
|
|
||||||
CHECKPOINT=0
|
|
||||||
|
|
||||||
# Arg Parsing
|
|
||||||
for i in "$@"; do
|
|
||||||
case $i in
|
|
||||||
--INSTR_LIMIT=*)
|
|
||||||
INSTR_LIMIT="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
--INSTR_WAVEON=*)
|
|
||||||
INSTR_WAVEON="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
--CHECKPOINT=*)
|
|
||||||
CHECKPOINT="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# unknown option
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "INSTR_LIMIT = ${INSTR_LIMIT}"
|
|
||||||
echo "INSTR_WAVEON = ${INSTR_WAVEON}"
|
|
||||||
echo "CHECKPOINT = ${CHECKPOINT}"
|
|
||||||
|
|
||||||
vsim -do "do ./wally.do buildroot buildroot $RISCV $INSTR_LIMIT $INSTR_WAVEON $CHECKPOINT"
|
|
@ -1,36 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Defaults
|
|
||||||
INSTR_LIMIT=0
|
|
||||||
INSTR_WAVEON=1
|
|
||||||
CHECKPOINT=0
|
|
||||||
|
|
||||||
# Arg Parsing
|
|
||||||
for i in "$@"; do
|
|
||||||
case $i in
|
|
||||||
--INSTR_LIMIT=*)
|
|
||||||
INSTR_LIMIT="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
--INSTR_WAVEON=*)
|
|
||||||
INSTR_WAVEON="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
--CHECKPOINT=*)
|
|
||||||
CHECKPOINT="${i#*=}"
|
|
||||||
shift # past argument=value
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
# unknown option
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "INSTR_LIMIT = ${INSTR_LIMIT}"
|
|
||||||
echo "INSTR_WAVEON = ${INSTR_WAVEON}"
|
|
||||||
echo "CHECKPOINT = ${CHECKPOINT}"
|
|
||||||
|
|
||||||
# *** change config from buildroot to rv64gc
|
|
||||||
vsim -c <<!
|
|
||||||
do wally-batch.do buildroot buildroot-no-trace $RISCV $INSTR_LIMIT $INSTR_WAVEON $CHECKPOINT
|
|
||||||
!
|
|
Loading…
Reference in New Issue
Block a user