Skip to content

Commit 1330f78

Browse files
Merge pull request #1312 from jordancarlin/ccov
Code coverage fixes
2 parents e03fa43 + 825d3dd commit 1330f78

File tree

4 files changed

+7
-12
lines changed

4 files changed

+7
-12
lines changed

bin/regression-wally

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def main(args):
514514

515515
# Coverage report
516516
if args.ccov:
517-
os.system(f"make -C {regressionDir}/QuestaCodeCoverage")
517+
os.system(f"make -C {regressionDir} QuestaCodeCoverage")
518518
if args.fcov or args.breker:
519519
os.system(f"make -C {archVerifDir} merge")
520520
# Count the number of failures

bin/wsim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def validateArgs(args):
4141
if not args.testsuite and not args.elf:
4242
print("Error: Missing test suite or ELF file")
4343
sys.exit(1)
44-
if (args.lockstep or args.lockstepverbose) and not (args.testsuite.endswith(".elf") or args.elf) and args.testsuite != "buildroot":
44+
if (args.lockstep or args.lockstepverbose) and not ((args.testsuite and args.testsuite.endswith(".elf")) or args.elf) and args.testsuite != "buildroot":
4545
print(f"Invalid Options. Cannot run a testsuite, {args.testsuite} with lockstep. Must run a single elf or buildroot.")
4646
sys.exit(1)
4747
elif any([args.gui, args.ccov, args.fcov, args.lockstep, args.lockstepverbose]) and args.sim not in ["questa", "vcs"]:

sim/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,14 @@ QuestaCodeCoverage:
3939
vcover report questa/ucdb/cov.ucdb -details -instance=/core/lsu. > questa/cov/rv64gc_coverage_lsu.rpt
4040
vcover report questa/ucdb/cov.ucdb -details -instance=/core/fpu. > questa/cov/rv64gc_coverage_fpu.rpt
4141
vcover report questa/ucdb/cov.ucdb -details -instance=/core/ieu. > questa/cov/rv64gc_coverage_ieu.rpt
42+
vcover report questa/ucdb/cov.ucdb -details -instance=/core/hzu. > questa/cov/rv64gc_coverage_hzu.rpt
4243
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/ebu. > questa/cov/rv64gc_uncovered_ebu.rpt
4344
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/priv. > questa/cov/rv64gc_uncovered_priv.rpt
4445
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/ifu. > questa/cov/rv64gc_uncovered_ifu.rpt
4546
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/lsu. > questa/cov/rv64gc_uncovered_lsu.rpt
4647
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/fpu. > questa/cov/rv64gc_uncovered_fpu.rpt
4748
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/ieu. > questa/cov/rv64gc_uncovered_ieu.rpt
49+
vcover report questa/ucdb/cov.ucdb -below 100 -details -instance=/core/hzu. > questa/cov/rv64gc_uncovered_hzu.rpt
4850
vcover report -hierarchical questa/ucdb/cov.ucdb > questa/cov/rv64gc_coverage_hierarchical.rpt
4951
vcover report -below 100 -hierarchical questa/ucdb/cov.ucdb > questa/cov/rv64gc_uncovered_hierarchical.rpt
5052
# vcover report -below 100 questa/ucdb/cov.ucdb > questa/cov/rv64gc_coverage.rpt

testbench/testbench.sv

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -693,7 +693,7 @@ module testbench;
693693
// track the current function or global label
694694
if (DEBUG > 0 | ((PrintHPMCounters | BPRED_LOGGER) & P.ZICNTR_SUPPORTED)) begin : functionName
695695
functionName #(P) functionName(.reset(reset_ext | TestBenchReset),
696-
.clk(clk), .ProgramAddrMapFile(ProgramAddrMapFile), .ProgramLabelMapFile(ProgramLabelMapFile));
696+
.clk(clk), .ProgramAddrMapFile(ProgramAddrMapFile), .ProgramLabelMapFile(ProgramLabelMapFile));
697697
end
698698

699699
// Append UART output to file for tests
@@ -758,9 +758,9 @@ end
758758
trace2api #(.CMP_PC (1),
759759
.CMP_INS (1),
760760
.CMP_GPR (1),
761-
.CMP_FPR (1),
761+
.CMP_FPR (P.F_SUPPORTED),
762762
.CMP_VR (0),
763-
.CMP_CSR (1)
763+
.CMP_CSR (P.ZICSR_SUPPORTED)
764764
) idv_trace2api(rvvi);
765765

766766
string filename;
@@ -894,13 +894,6 @@ end
894894
void'(rvviRefMemorySetVolatile(P.SPI_BASE, (P.SPI_BASE + P.SPI_RANGE)));
895895
end
896896

897-
if(P.XLEN==32) begin
898-
void'(rvviRefCsrSetVolatile(0, 32'hC80)); // CYCLEH
899-
void'(rvviRefCsrSetVolatile(0, 32'hB80)); // MCYCLEH
900-
void'(rvviRefCsrSetVolatile(0, 32'hC82)); // INSTRETH
901-
void'(rvviRefCsrSetVolatile(0, 32'hB82)); // MINSTRETH
902-
end
903-
904897
void'(rvviRefCsrSetVolatile(0, 32'h104)); // SIE - Temporary!!!!
905898

906899
end

0 commit comments

Comments
 (0)