From 8107f585c8d6f02582dca98e001e4ed4a9af06f7 Mon Sep 17 00:00:00 2001 From: David Harris Date: Fri, 10 Mar 2023 13:10:28 -0800 Subject: [PATCH] Fixed crash with wrong number of arguments for coverage in regression-wally --- sim/regression-wally | 1 + sim/wally-batch.do | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sim/regression-wally b/sim/regression-wally index ce9387b6..e7ce0d30 100755 --- a/sim/regression-wally +++ b/sim/regression-wally @@ -219,6 +219,7 @@ def main(): print('Generating coverage report') os.system('vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb -logfile cov/log') os.system('vcover report -details cov/cov.ucdb > cov/rv64gc_coverage.rpt') + os.system('vcover report -html cov/cov.ucdb') # Count the number of failures if num_fail: print(f"{bcolors.FAIL}Regression failed with %s failed configurations{bcolors.ENDC}" % num_fail) diff --git a/sim/wally-batch.do b/sim/wally-batch.do index 2adc917e..19951de9 100644 --- a/sim/wally-batch.do +++ b/sim/wally-batch.do @@ -115,7 +115,7 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} { vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583 -suppress 7063,2596,13286 # start and run simulation # remove +acc flag for faster sim during regressions if there is no need to access internal signals - if {$3 eq "-coverage"} { + if {$argc >= 3} { vopt wkdir/work_${1}_${2}.testbench -work wkdir/work_${1}_${2} -G TEST=$2 -o testbenchopt +cover=sbectf vsim -lib wkdir/work_${1}_${2} testbenchopt -fatal 7 -suppress 3829 -coverage } else { @@ -129,9 +129,11 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} { # power off -r /dut/core/* } -if {$3 eq "-coverage"} { - do coverage-exclusions.do - coverage save -instance /testbench/dut cov/${1}_${2}.ucdb +if {$argc >= 3) {} + if ($3 eq "-coverage"} { + do coverage-exclusions.do + coverage save -instance /testbench/dut cov/${1}_${2}.ucdb + } } # These aren't doing anything helpful