mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Testbench improvements for coverage reporting and running Imperas suite to raise test coverage
This commit is contained in:
parent
a1eccf37dc
commit
f6bc499f34
23
sim/Makefile
23
sim/Makefile
@ -1,3 +1,26 @@
|
||||
coverage:
|
||||
#make -C ../tests/coverage --jobs
|
||||
#iter-elf.bash --cover --search ../tests/coverage
|
||||
vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb riscv.ucdb -logfile cov/log
|
||||
vcover report -details cov/cov.ucdb > cov/rv64gc_coverage_details.rpt
|
||||
vcover report cov/cov.ucdb -details -instance=/core/ebu. > cov/rv64gc_coverage_ebu.rpt
|
||||
vcover report cov/cov.ucdb -details -instance=/core/priv. > cov/rv64gc_coverage_priv.rpt
|
||||
vcover report cov/cov.ucdb -details -instance=/core/ifu. > cov/rv64gc_coverage_ifu.rpt
|
||||
vcover report cov/cov.ucdb -details -instance=/core/lsu. > cov/rv64gc_coverage_lsu.rpt
|
||||
vcover report cov/cov.ucdb -details -instance=/core/fpu. > cov/rv64gc_coverage_fpu.rpt
|
||||
vcover report cov/cov.ucdb -details -instance=/core/ieu. > cov/rv64gc_coverage_ieu.rpt
|
||||
vcover report cov/cov.ucdb -below 100 -details -instance=/core/ebu. > cov/rv64gc_uncovered_ebu.rpt
|
||||
vcover report cov/cov.ucdb -below 100 -details -instance=/core/priv. > cov/rv64gc_uncovered_priv.rpt
|
||||
vcover report cov/cov.ucdb -below 100 -details -instance=/core/ifu. > cov/rv64gc_uncovered_ifu.rpt
|
||||
vcover report cov/cov.ucdb -below 100 -details -instance=/core/lsu. > cov/rv64gc_uncovered_lsu.rpt
|
||||
vcover report cov/cov.ucdb -below 100 -details -instance=/core/fpu. > cov/rv64gc_uncovered_fpu.rpt
|
||||
vcover report cov/cov.ucdb -below 100 -details -instance=/core/ieu. > cov/rv64gc_uncovered_ieu.rpt
|
||||
vcover report -hierarchical cov/cov.ucdb > cov/rv64gc_coverage_hierarchical.rpt
|
||||
vcover report -below 100 -hierarchical cov/cov.ucdb > cov/rv64gc_uncovered_hierarchical.rpt
|
||||
# vcover report -below 100 cov/cov.ucdb > cov/rv64gc_coverage.rpt
|
||||
# vcover report -recursive cov/cov.ucdb > cov/rv64gc_recursive.rpt
|
||||
vcover report -details -threshH 100 -html cov/cov.ucdb
|
||||
|
||||
all: riscoftests memfiles
|
||||
# *** Build old tests/imperas-riscv-tests for now;
|
||||
# Delete this part when the privileged tests transition over to tests/wally-riscv-arch-test
|
||||
|
@ -130,6 +130,8 @@ for test in ahbTests:
|
||||
tests64gc = ["arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv"]
|
||||
if (coverage): # delete all but 64gc tests when running coverage
|
||||
configs = []
|
||||
tests64gc = ["arch64f", "arch64d", "arch64i", "arch64priv", "arch64c", "arch64m", "arch64zi", "wally64a", "wally64periph", "wally64priv", "imperas64f", "imperas64d", "imperas64c", "imperas64i"]
|
||||
# tests64gc.append(["imperas64f", "imperas64d", "imperas64c", "imperas64i"])
|
||||
coverStr = '-coverage'
|
||||
else:
|
||||
coverStr = ''
|
||||
@ -216,12 +218,13 @@ def main():
|
||||
|
||||
# Coverage report
|
||||
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_details.rpt')
|
||||
os.system('vcover report -below 100 cov/cov.ucdb > cov/rv64gc_coverage.rpt')
|
||||
os.system('vcover report -recursive cov/cov.ucdb > cov/rv64gc_recursive.rpt')
|
||||
os.system('vcover report -details -threshH 100 -html cov/cov.ucdb')
|
||||
os.system('make 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_details.rpt')
|
||||
#os.system('vcover report -below 100 cov/cov.ucdb > cov/rv64gc_coverage.rpt')
|
||||
#os.system('vcover report -recursive cov/cov.ucdb > cov/rv64gc_recursive.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)
|
||||
|
@ -34,7 +34,7 @@
|
||||
// *** remove MYIMPERASTEST cases when ported
|
||||
|
||||
string tvpaths[] = '{
|
||||
"../addins/imperas-riscv-tests/work/",
|
||||
"$RISCV/imperas-riscv-tests/work/",
|
||||
"../tests/riscof/work/riscv-arch-test/",
|
||||
"../tests/riscof/work/wally-riscv-arch-test/",
|
||||
"../tests/imperas-riscv-tests/work/",
|
||||
|
Loading…
Reference in New Issue
Block a user