mirror of
https://github.com/openhwgroup/cvw
synced 2025-01-24 05:24:49 +00:00
Preliminary work to merge functional coverage into wally.do.
This commit is contained in:
parent
c9b59c8b99
commit
2985cfb7eb
@ -44,6 +44,20 @@ set coverage 0
|
||||
set CoverageVoptArg ""
|
||||
set CoverageVsimArg ""
|
||||
|
||||
set FunctCoverage 0
|
||||
set riscvISACOVsrc ""
|
||||
set FCdefineINCLUDE_TRACE2COV ""
|
||||
set FCdefineCOVER_BASE_RV64I ""
|
||||
set FCdefineCOVER_LEVEL_DV_PR_EXT ""
|
||||
set FCdefineCOVER_RV64I ""
|
||||
set FCdefineCOVER_RV64M ""
|
||||
set FCdefineCOVER_RV64A ""
|
||||
set FCdefineCOVER_RV64F ""
|
||||
set FCdefineCOVER_RV64D ""
|
||||
set FCdefineCOVER_RV64ZICSR ""
|
||||
set FCdefineCOVER_RV64C ""
|
||||
set FCdefineIDV_INCLUDE_TRACE2COV ""
|
||||
|
||||
set lockstep 0
|
||||
# ok this is annoying. vlog, vopt, and vsim are very picky about how arguments are passed.
|
||||
# unforunately it won't allow these to be grouped as one argument per command so they are broken
|
||||
@ -98,6 +112,27 @@ if {$CoverageIndex >= 0} {
|
||||
set lst [lreplace $lst $CoverageIndex $CoverageIndex]
|
||||
}
|
||||
|
||||
# if +coverage found set flag and remove from list
|
||||
set FunctCoverageIndex [lsearch -exact $lst "--fcov"]
|
||||
if {$FunctCoverageIndex >= 0} {
|
||||
set FunctCoverage 1
|
||||
set riscvISACOVsrc +incdir+$env(IMPERAS_HOME)/ImpProprietary/source/host/riscvISACOV/source
|
||||
|
||||
set FCdefineINCLUDE_TRACE2COV "+define+INCLUDE_TRACE2COV"
|
||||
set FCdefineCOVER_BASE_RV64I "+define+COVER_BASE_RV64I"
|
||||
set FCdefineCOVER_LEVEL_DV_PR_EXT "+define+COVER_LEVEL_DV_PR_EXT"
|
||||
set FCdefineCOVER_RV64I "+define+COVER_RV64I"
|
||||
set FCdefineCOVER_RV64M "+define+COVER_RV64M"
|
||||
set FCdefineCOVER_RV64A "+define+COVER_RV64A"
|
||||
set FCdefineCOVER_RV64F "+define+COVER_RV64F"
|
||||
set FCdefineCOVER_RV64D "+define+COVER_RV64D"
|
||||
set FCdefineCOVER_RV64ZICSR "+define+COVER_RV64ZICSR"
|
||||
set FCdefineCOVER_RV64C "+define+COVER_RV64C"
|
||||
set FCdefineIDV_INCLUDE_TRACE2COV "+define+IDV_INCLUDE_TRACE2COV"
|
||||
|
||||
set lst [lreplace $lst $FunctCoverageIndex $FunctCoverageIndex]
|
||||
}
|
||||
|
||||
set LockStepIndex [lsearch -exact $lst "--lockstep"]
|
||||
if {$LockStepIndex >= 0} {
|
||||
set lockstep 1
|
||||
@ -139,7 +174,7 @@ if {$DEBUG > 0} {
|
||||
# "Extra checking for conflicts with always_comb done at vopt time"
|
||||
# because vsim will run vopt
|
||||
|
||||
vlog -lint -work ${WKDIR} +incdir+${CONFIG}/${CFG} +incdir+${CONFIG}/deriv/${CFG} ${lockstepvoptstring} ${ImperasPubInc} ${ImperasPrivInc} +incdir+${CONFIG}/shared ${rvviFiles} ${idvFiles} ${SRC}/cvw.sv ${TB}/${TESTBENCH}.sv ${TB}/common/*.sv ${SRC}/*/*.sv ${SRC}/*/*/*.sv -suppress 2583 -suppress 7063,2596,13286
|
||||
vlog -lint -work ${WKDIR} +incdir+${CONFIG}/${CFG} +incdir+${CONFIG}/deriv/${CFG} ${lockstepvoptstring} ${ImperasPubInc} ${ImperasPrivInc} ${riscvISACOVsrc} ${FCdefineINCLUDE_TRACE2COV} ${FCdefineCOVER_BASE_RV64I} ${FCdefineCOVER_LEVEL_DV_PR_EXT} ${FCdefineCOVER_RV64I} ${FCdefineCOVER_RV64M} ${FCdefineCOVER_RV64A} ${FCdefineCOVER_RV64F} ${FCdefineCOVER_RV64D} ${FCdefineCOVER_RV64ZICSR} ${FCdefineCOVER_RV64C} ${FCdefineIDV_INCLUDE_TRACE2COV} +incdir+${CONFIG}/shared ${rvviFiles} ${idvFiles} ${SRC}/cvw.sv ${TB}/${TESTBENCH}.sv ${TB}/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
|
||||
|
Loading…
Reference in New Issue
Block a user