From 347df26713319407e6c85516b329cdc2e49835a3 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sat, 6 Apr 2024 09:46:56 -0700 Subject: [PATCH] Fixed regression running; buildroot pending --- bin/regression-wally | 15 ++++++++++---- sim/questa/sim-buildroot | 33 ------------------------------- sim/questa/sim-buildroot-batch | 36 ---------------------------------- 3 files changed, 11 insertions(+), 73 deletions(-) delete mode 100755 sim/questa/sim-buildroot delete mode 100755 sim/questa/sim-buildroot-batch diff --git a/bin/regression-wally b/bin/regression-wally index 58a8384c9..32a88e77d 100755 --- a/bin/regression-wally +++ b/bin/regression-wally @@ -232,15 +232,20 @@ def addTests(tests, sim): 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""" grepcmd = "grep -e '%s' '%s' > /dev/null" % (text, logfile) +# print(" search_log_for_text invoking %s" % grepcmd) return os.system(grepcmd) == 0 def run_test_case(config): """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" -# cmd = config.cmd.format(logname) - cmd = config.cmd + " > " + logname + logname = WALLY + "/sim/questa/logs/"+config.variant+"_"+config.name+".log" ### *** fix hardwiring to questa log + #cmd = config.cmd + " > " + logname + if ("lint-wally" in config.cmd): + cmd = config.cmd + " | tee " + logname + else: + cmd = config.cmd + " > " + logname print(cmd) os.chdir(regressionDir) + #print(" run_test_case invoking %s" % cmd) os.system(cmd) if search_log_for_text(config.grepstr, logname): 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__)) os.chdir(regressionDir) +WALLY = os.environ.get('WALLY') + coveragesim = "questa" # Questa is required for code/functional coverage defaultsim = "questa" # Default simulator for all other tests; change to Verilator when flow is ready @@ -283,7 +290,7 @@ configs = [ TestCase( name="lints", variant="all", - cmd="./lint-wally " + nightMode + " | tee {}", + cmd="lint-wally " + nightMode, grepstr="lints run with no errors or warnings" ) ] diff --git a/sim/questa/sim-buildroot b/sim/questa/sim-buildroot deleted file mode 100755 index 530e33386..000000000 --- a/sim/questa/sim-buildroot +++ /dev/null @@ -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" diff --git a/sim/questa/sim-buildroot-batch b/sim/questa/sim-buildroot-batch deleted file mode 100755 index 81a6fac1e..000000000 --- a/sim/questa/sim-buildroot-batch +++ /dev/null @@ -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 <