Merge pull request #949 from davidharrishmc/dev

Per-configuration support for multiple coverage extensions
This commit is contained in:
Rose Thompson 2024-09-08 15:04:15 -07:00 committed by GitHub
commit 15bbcb2578
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 31 additions and 13 deletions

View File

@ -292,7 +292,10 @@ def addTests(tests, sim):
def addLockstepTestsByDir(dir, config, sim):
sim_logdir = WALLY+ "/sim/" + sim + "/logs/"
cmdPrefix="wsim --lockstep --sim " + sim + " " + coverStr + " " + config
if (coverStr != ""): # use --fcov in place of --lockstep
cmdPrefix="wsim --sim " + sim + " " + coverStr + " " + config
else:
cmdPrefix="wsim --lockstep --sim " + sim + " " + config
if (os.path.isdir(dir)):
for dirpath, dirnames, filenames in os.walk(os.path.abspath(dir)):
for file in filenames:

View File

@ -0,0 +1,13 @@
// coverage.svh
// David_Harris@hmc.edu 7 September 2024
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
// This file is needed in the config subdirectory for each config supporting coverage.
// It defines which extensions are enabled for that config.
`define COVER_RV32I
`define COVER_RV32M
`define COVER_RV32F
`include "coverage/RV32I_coverage.svh"
`include "coverage/RV32M_coverage.svh"
`include "coverage/RV32F_coverage.svh"

View File

@ -0,0 +1,13 @@
// coverage.svh
// David_Harris@hmc.edu 7 September 2024
// SPDX-License-Identifier: Apache-2.0 WITH SHL-2.1
// This file is needed in the config subdirectory for each config supporting coverage.
// It defines which extensions are enabled for that config.
`define COVER_RV64I
`define COVER_RV64M
`define COVER_RV64F
`include "coverage/RV64I_coverage.svh"
`include "coverage/RV64M_coverage.svh"
`include "coverage/RV64F_coverage.svh"

View File

@ -141,21 +141,10 @@ if {[lcheck lst "--fcov"]} {
set FCvlog "+define+INCLUDE_TRACE2COV \
+define+IDV_INCLUDE_TRACE2COV \
+define+COVER_BASE_RV32I \
+define+COVER_LEVEL_DV_PR_EXT \
+incdir+$env(WALLY)/addins/riscvISACOV/source \
"
# +incdir+$env(WALLY)/addins/cvw-arch-verif/fcov/rv32 \
set FCvopt "+TRACE2COV_ENABLE=1 +IDV_TRACE2COV=1"
# Uncomment various cover statements below to control which extensions get functional coverage
lappend FCdefineCOVER_EXTS "+define+COVER_RV32I"
lappend FCdefineCOVER_EXTS "+define+COVER_RV32M"
#lappend FCdefineCOVER_EXTS "+define+COVER_RV64M"
#lappend FCdefineCOVER_EXTS "+define+COVER_RV64A"
#lappend FCdefineCOVER_EXTS "+define+COVER_RV64F"
#lappend FCdefineCOVER_EXTS "+define+COVER_RV64D"
#lappend FCdefineCOVER_EXTS "+define+COVER_RV64ZICSR"
#lappend FCdefineCOVER_EXTS "+define+COVER_RV64C"
}
# if --lockstep or --fcov found set flag and remove from list