From 3377dce425b9a7dbeecef3cffd6b5e306cf9d893 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Tue, 11 Mar 2025 13:59:52 -0700 Subject: [PATCH] Code coverage fixes --- bin/regression-wally | 2 +- bin/wsim | 2 +- sim/Makefile | 1 + testbench/testbench.sv | 9 +-------- 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/bin/regression-wally b/bin/regression-wally index d195a7878..0ecfcfced 100755 --- a/bin/regression-wally +++ b/bin/regression-wally @@ -514,7 +514,7 @@ def main(args): # Coverage report if args.ccov: - os.system(f"make -C {regressionDir}/QuestaCodeCoverage") + os.system(f"make -C {regressionDir} QuestaCodeCoverage") if args.fcov or args.breker: os.system(f"make -C {archVerifDir} merge") # Count the number of failures diff --git a/bin/wsim b/bin/wsim index 499a18c2a..12196f2f4 100755 --- a/bin/wsim +++ b/bin/wsim @@ -41,7 +41,7 @@ def validateArgs(args): if not args.testsuite and not args.elf: print("Error: Missing test suite or ELF file") sys.exit(1) - if (args.lockstep or args.lockstepverbose) and not (args.testsuite.endswith(".elf") or args.elf) and args.testsuite != "buildroot": + if (args.lockstep or args.lockstepverbose) and not ((args.testsuite and args.testsuite.endswith(".elf")) or args.elf) and args.testsuite != "buildroot": print(f"Invalid Options. Cannot run a testsuite, {args.testsuite} with lockstep. Must run a single elf or buildroot.") sys.exit(1) elif any([args.gui, args.ccov, args.fcov, args.lockstep, args.lockstepverbose]) and args.sim not in ["questa", "vcs"]: diff --git a/sim/Makefile b/sim/Makefile index d4a94112e..eb4e6f342 100644 --- a/sim/Makefile +++ b/sim/Makefile @@ -45,6 +45,7 @@ QuestaCodeCoverage: vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/lsu. > questa/cov/rv64gc_uncovered_lsu.rpt vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/fpu. > questa/cov/rv64gc_uncovered_fpu.rpt vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/ieu. > questa/cov/rv64gc_uncovered_ieu.rpt + vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/hzu. > questa/cov/rv64gc_uncovered_hzu.rpt vcover report -hierarchical questa/ucdb/cov.ucdb > questa/cov/rv64gc_coverage_hierarchical.rpt vcover report -below 100 -hierarchical questa/ucdb/cov.ucdb > questa/cov/rv64gc_uncovered_hierarchical.rpt # vcover report -below 100 questa/ucdb/cov.ucdb > questa/cov/rv64gc_coverage.rpt diff --git a/testbench/testbench.sv b/testbench/testbench.sv index 8e00f1655..44a113a6f 100644 --- a/testbench/testbench.sv +++ b/testbench/testbench.sv @@ -758,7 +758,7 @@ end trace2api #(.CMP_PC (1), .CMP_INS (1), .CMP_GPR (1), - .CMP_FPR (1), + .CMP_FPR (P.F_SUPPORTED), .CMP_VR (0), .CMP_CSR (1) ) idv_trace2api(rvvi); @@ -894,13 +894,6 @@ end void'(rvviRefMemorySetVolatile(P.SPI_BASE, (P.SPI_BASE + P.SPI_RANGE))); end - if(P.XLEN==32) begin - void'(rvviRefCsrSetVolatile(0, 32'hC80)); // CYCLEH - void'(rvviRefCsrSetVolatile(0, 32'hB80)); // MCYCLEH - void'(rvviRefCsrSetVolatile(0, 32'hC82)); // INSTRETH - void'(rvviRefCsrSetVolatile(0, 32'hB82)); // MINSTRETH - end - void'(rvviRefCsrSetVolatile(0, 32'h104)); // SIE - Temporary!!!! end