From adbdc44f7b473ddf4d72af038041d8ba2b67c4b0 Mon Sep 17 00:00:00 2001 From: David Harris Date: Sun, 19 Mar 2023 10:24:35 -0700 Subject: [PATCH] Improved coverage reporting --- .gitignore | 8 +++++++- sim/regression-wally | 6 ++++-- sim/wally-batch.do | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index acaab4b01..ef7ed8f28 100644 --- a/.gitignore +++ b/.gitignore @@ -103,4 +103,10 @@ external sim/results tests/wally-riscv-arch-test/riscv-test-suite/rv*i_m/I/src/*.S tests/wally-riscv-arch-test/riscv-test-suite/rv*i_m/I/Makefrag - +sim/branch_BP_GSHARE10.log +sim/branch_BP_GSHARE16.log +sim/cov/ +sim/covhtmlreport/ +sim/imperas.log +sim/results-error/ +sim/test1.rep diff --git a/sim/regression-wally b/sim/regression-wally index 560f7795b..3a9744b74 100755 --- a/sim/regression-wally +++ b/sim/regression-wally @@ -126,6 +126,7 @@ for test in ahbTests: grepstr="All tests ran without failures") configs.append(tc) +#tests64gc = ["arch64i", "arch64c", "arch64m"] tests64gc = ["arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv"] if (coverage): # delete all but 64gc tests when running coverage configs = [] @@ -217,8 +218,9 @@ def main(): if coverage: 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') + os.system('vcover report -details cov/cov.ucdb > cov/rv64gc_coverage_details.rpt') + os.system('vcover report -below 100 cov/cov.ucdb > cov/rv64gc_coverage.rpt') + os.system('vcover report -details -threshH 100 -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 830538999..ae7125934 100644 --- a/sim/wally-batch.do +++ b/sim/wally-batch.do @@ -138,8 +138,8 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} { } if {$coverage} { - do coverage-exclusions.do - coverage save -instance /testbench/dut cov/${1}_${2}.ucdb + do coverage-exclusions-rv64gc.do # beware: this assumes testing the rv64gc configuration + coverage save -instance /testbench/dut/core cov/${1}_${2}.ucdb } # These aren't doing anything helpful