forked from Github_Repos/cvw
regression cleanup; unable to run buildroot coverage because of different config file
This commit is contained in:
parent
0ccfdde30e
commit
a8661d139b
@ -18,7 +18,8 @@ all: riscoftests memfiles coveragetests
|
|||||||
coverage:
|
coverage:
|
||||||
#make -C ../tests/coverage --jobs
|
#make -C ../tests/coverage --jobs
|
||||||
#iter-elf.bash --cover --search ../tests/coverage
|
#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 merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb cov/buildroot_buildroot.ucdb riscv.ucdb -logfile cov/log
|
||||||
|
# vcover merge -out cov/cov.ucdb cov/rv64gc_arch64i.ucdb cov/rv64gc*.ucdb riscv.ucdb /home/rthompson/buildroot_buildroot-no-trace.ucdb -logfile cov/log
|
||||||
vcover report -details cov/cov.ucdb > cov/rv64gc_coverage_details.rpt
|
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/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/priv. > cov/rv64gc_coverage_priv.rpt
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
# Core settings
|
# Core settings
|
||||||
--override cpu/unaligned=F
|
--override cpu/unaligned=F
|
||||||
--override cpu/ignore_non_leaf_DAU=1
|
--override cpu/ignore_non_leaf_DAU=1
|
||||||
--override cpu/wfi_is_nop=T
|
#--override cpu/wfi_is_nop=T
|
||||||
--override cpu/mimpid=0x100
|
--override cpu/mimpid=0x100
|
||||||
--override cpu/misa_Extensions_mask=0x0
|
--override cpu/misa_Extensions_mask=0x0
|
||||||
|
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
# Add Imperas simulator application instruction tracing
|
# Add Imperas simulator application instruction tracing
|
||||||
--override cpu/show_c_prefix=T
|
--override cpu/show_c_prefix=T
|
||||||
--trace --tracechange --traceshowicount --tracemode -tracemem ASX --monitornetschange --traceafter 10500000
|
--trace --tracechange --traceshowicount --tracemode -tracemem ASX --monitornetschange --traceafter 800000
|
||||||
|
|
||||||
# Exceptions and pagetables debug
|
# Exceptions and pagetables debug
|
||||||
--override cpu/debugflags=6
|
--override cpu/debugflags=6
|
||||||
|
@ -49,7 +49,6 @@ configs = [
|
|||||||
]
|
]
|
||||||
def getBuildrootTC(boot):
|
def getBuildrootTC(boot):
|
||||||
INSTR_LIMIT = 4000000 # multiple of 100000; 4M is interesting because it gets into the kernel and enabling VM
|
INSTR_LIMIT = 4000000 # multiple of 100000; 4M is interesting because it gets into the kernel and enabling VM
|
||||||
# INSTR_LIMIT = 8000000 # multiple of 100000; 4M is interesting because it gets into the kernel and enabling VM
|
|
||||||
MAX_EXPECTED = 246000000 # *** TODO: replace this with a search for the login prompt.
|
MAX_EXPECTED = 246000000 # *** TODO: replace this with a search for the login prompt.
|
||||||
if boot:
|
if boot:
|
||||||
name="buildrootboot"
|
name="buildrootboot"
|
||||||
@ -182,8 +181,6 @@ def main():
|
|||||||
try:
|
try:
|
||||||
os.chdir(regressionDir)
|
os.chdir(regressionDir)
|
||||||
os.mkdir("logs")
|
os.mkdir("logs")
|
||||||
#print(os.getcwd())
|
|
||||||
#print(regressionDir)
|
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
@ -205,8 +202,10 @@ def main():
|
|||||||
configs=[getBuildrootTC(boot=True)]
|
configs=[getBuildrootTC(boot=True)]
|
||||||
elif '-coverage' in sys.argv:
|
elif '-coverage' in sys.argv:
|
||||||
TIMEOUT_DUR = 20*60 # seconds
|
TIMEOUT_DUR = 20*60 # seconds
|
||||||
configs.append(getBuildrootTC(boot=False))
|
# Presently don't run buildroot because it has a different config and can't be merged with the rv64gc coverage.
|
||||||
os.system('rm cov/*.ucdb')
|
# Also it is slow to run.
|
||||||
|
# configs.append(getBuildrootTC(boot=False))
|
||||||
|
os.system('rm -f cov/*.ucdb')
|
||||||
else:
|
else:
|
||||||
TIMEOUT_DUR = 10*60 # seconds
|
TIMEOUT_DUR = 10*60 # seconds
|
||||||
configs.append(getBuildrootTC(boot=False))
|
configs.append(getBuildrootTC(boot=False))
|
||||||
@ -228,12 +227,6 @@ def main():
|
|||||||
# Coverage report
|
# Coverage report
|
||||||
if coverage:
|
if coverage:
|
||||||
os.system('make coverage')
|
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
|
# Count the number of failures
|
||||||
if num_fail:
|
if num_fail:
|
||||||
print(f"{bcolors.FAIL}Regression failed with %s failed configurations{bcolors.ENDC}" % num_fail)
|
print(f"{bcolors.FAIL}Regression failed with %s failed configurations{bcolors.ENDC}" % num_fail)
|
||||||
|
@ -46,7 +46,7 @@ mkdir -p cov
|
|||||||
# Check if measuring coverage
|
# Check if measuring coverage
|
||||||
set coverage 0
|
set coverage 0
|
||||||
if {$argc >= 3} {
|
if {$argc >= 3} {
|
||||||
if {$3 eq "-coverage"} {
|
if {$3 eq "-coverage" || ($argc >= 7 && $7 eq "-coverage")} {
|
||||||
set coverage 1
|
set coverage 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -61,8 +61,14 @@ if {$argc >= 3} {
|
|||||||
if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
|
if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
|
||||||
vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench-linux.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583
|
vlog -lint -work wkdir/work_${1}_${2} +incdir+../config/$1 +incdir+../config/shared ../testbench/testbench-linux.sv ../testbench/common/*.sv ../src/*/*.sv ../src/*/*/*.sv -suppress 2583
|
||||||
# start and run simulation
|
# start and run simulation
|
||||||
|
if { $coverage } {
|
||||||
|
echo "wally-batch buildroot coverage"
|
||||||
|
vopt wkdir/work_${1}_${2}.testbench -work wkdir/work_${1}_${2} -G RISCV_DIR=$3 -G INSTR_LIMIT=$4 -G INSTR_WAVEON=$5 -G CHECKPOINT=$6 -o testbenchopt +cover=sbecf
|
||||||
|
vsim -lib wkdir/work_${1}_${2} testbenchopt -suppress 8852,12070,3084,3691,13286 -fatal 7 -cover
|
||||||
|
} else {
|
||||||
vopt wkdir/work_${1}_${2}.testbench -work wkdir/work_${1}_${2} -G RISCV_DIR=$3 -G INSTR_LIMIT=$4 -G INSTR_WAVEON=$5 -G CHECKPOINT=$6 -o testbenchopt
|
vopt wkdir/work_${1}_${2}.testbench -work wkdir/work_${1}_${2} -G RISCV_DIR=$3 -G INSTR_LIMIT=$4 -G INSTR_WAVEON=$5 -G CHECKPOINT=$6 -o testbenchopt
|
||||||
vsim -lib wkdir/work_${1}_${2} testbenchopt -suppress 8852,12070,3084,3691,13286 -fatal 7
|
vsim -lib wkdir/work_${1}_${2} testbenchopt -suppress 8852,12070,3084,3691,13286 -fatal 7
|
||||||
|
}
|
||||||
|
|
||||||
run -all
|
run -all
|
||||||
run -all
|
run -all
|
||||||
@ -139,6 +145,7 @@ if {$2 eq "buildroot" || $2 eq "buildroot-checkpoint"} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if {$coverage} {
|
if {$coverage} {
|
||||||
|
echo "Saving coverage to ${1}_${2}.ucdb"
|
||||||
do coverage-exclusions-rv64gc.do # beware: this assumes testing the rv64gc configuration
|
do coverage-exclusions-rv64gc.do # beware: this assumes testing the rv64gc configuration
|
||||||
coverage save -instance /testbench/dut/core cov/${1}_${2}.ucdb
|
coverage save -instance /testbench/dut/core cov/${1}_${2}.ucdb
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,11 @@
|
|||||||
|
|
||||||
main:
|
main:
|
||||||
|
|
||||||
|
# Division test (having trouble with buildroot)
|
||||||
|
li x11, 0x384000
|
||||||
|
li x12, 0x1c2000
|
||||||
|
divuw x9, x11, x12
|
||||||
|
|
||||||
# Test clz with all bits being 0
|
# Test clz with all bits being 0
|
||||||
li t0, 0
|
li t0, 0
|
||||||
clz t1, t0
|
clz t1, t0
|
||||||
@ -61,5 +66,6 @@ main:
|
|||||||
.word 0x6080101B // Illegal BMU similar to count word
|
.word 0x6080101B // Illegal BMU similar to count word
|
||||||
.word 0x6030101B // Illegal BMU similar to count word
|
.word 0x6030101B // Illegal BMU similar to count word
|
||||||
|
|
||||||
|
|
||||||
j done
|
j done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user