From e07f303353381350dea6465179deebfcd11a7875 Mon Sep 17 00:00:00 2001 From: Rose Thompson Date: Thu, 29 Aug 2024 15:29:04 -0700 Subject: [PATCH] Have basic rv32gc functional coverage running with open source riscvISACOV. --- bin/wsim | 10 ++++++---- sim/questa/wally.do | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bin/wsim b/bin/wsim index 9867f7524..757fac9bf 100755 --- a/bin/wsim +++ b/bin/wsim @@ -81,8 +81,13 @@ if (args.rvvi): # if lockstep is enabled, then we need to pass the Imperas lockstep arguments if(int(args.locksteplog) >= 1): EnableLog = 1 else: EnableLog = 0 -if (args.lockstep): +if((args.lockstep or args.fcov or args.fcov2) and args.sim == "questa"): prefix = "IMPERAS_TOOLS=" + WALLY + "/config/"+args.config+"/imperas.ic" + prefix = "MTI_VCO_MODE=64 " + prefix +else: + prefix = "" + +if (args.lockstep): if(args.locksteplog != 0): ImperasPlusArgs = " +IDV_TRACE2LOG=" + str(EnableLog) + " +IDV_TRACE2LOG_AFTER=" + str(args.locksteplog) else: ImperasPlusArgs = "" if(args.fcov): @@ -101,13 +106,10 @@ if (args.lockstep): CovEnableStr = "" suffix = "--lockstep" else: - prefix = "" ImperasPlusArgs = "" suffix = "" flags = suffix + " " + ImperasPlusArgs -if((args.lockstep or args.fcov) and args.sim == "questa"): - prefix = "MTI_VCO_MODE=64 " + prefix # other flags if (args.ccov): diff --git a/sim/questa/wally.do b/sim/questa/wally.do index 80a7bef76..1aa992a50 100644 --- a/sim/questa/wally.do +++ b/sim/questa/wally.do @@ -152,13 +152,13 @@ if {$FunctCoverageIndex >= 0} { set FunctCoverageIndex2 [lsearch -exact $lst "--fcov2"] if {$FunctCoverageIndex2 >= 0} { set FunctCoverage 1 - set riscvISACOVsrc +incdir+$env(IMPERAS_HOME)/ImpProprietary/source/host/riscvISACOV/source + set riscvISACOVsrc +incdir+$env(WALLY)/addins/riscvISACOV/source set FCdefineINCLUDE_TRACE2COV "+define+INCLUDE_TRACE2COV" - set FCdefineCOVER_BASE_RV64I "+define+COVER_BASE_RV64I" + set FCdefineCOVER_BASE_RV64I "+define+COVER_BASE_RV32I" set FCdefineCOVER_LEVEL_DV_PR_EXT "+define+COVER_LEVEL_DV_PR_EXT" # Uncomment various cover statements below to control which extensions get functional coverage - set FCdefineCOVER_RV64I "+define+COVER_RV64I" + set FCdefineCOVER_RV64I "+define+COVER_RV32I" #set FCdefineCOVER_RV64M "+define+COVER_RV64M" #set FCdefineCOVER_RV64A "+define+COVER_RV64A" #set FCdefineCOVER_RV64F "+define+COVER_RV64F"