Skip to content

Commit 1278e23

Browse files
Merge pull request #275 from dherreravicioso/main
Excluded coverage for impossible cases in wficountreg and status.MPRV
2 parents 994a43a + c681789 commit 1278e23

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

sim/coverage-exclusions-rv64gc.do

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,8 @@ coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$lin
127127
set line [GetLineNum ../src/mmu/pmachecker.sv "WriteAccessM \\| ExecuteAccessF"]
128128
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line -item e 1 -fecexprrow 1-5
129129
set line [GetLineNum ../src/mmu/pmachecker.sv "ReadAccessM \\| ExecuteAccessF"]
130-
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line -item e 1 -fecexprrow 1-3
130+
coverage exclude -scope /dut/core/ifu/immu/immu/pmachecker -linerange $line-$line -item e 1 -fecexprrow 1-3
131+
132+
# Excluding reset and clear for impossible case in the wficountreg in privdec
133+
set line [GetLineNum ../src/generic/flop/floprc.sv "reset \\| clear"]
134+
coverage exclude -scope /dut/core/priv/priv/pmd/wfi/wficountreg -linerange $line-$line -item c 1 -feccondrow 2

src/privileged/csrsr.sv

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ module csrsr (
122122
logic [1:0] EndiannessPrivMode;
123123
always_comb begin
124124
if (SelHPTW) EndiannessPrivMode = `S_MODE;
125+
//coverage off -item c 1 -feccondrow 1
126+
// status.MPRV always gets reset upon leaving machine mode, so MPRV will never be high when out of machine mode
125127
else if (PrivilegeModeW == `M_MODE & STATUS_MPRV) EndiannessPrivMode = STATUS_MPP;
128+
//coverage on
126129
else EndiannessPrivMode = PrivilegeModeW;
127130

128131
case (EndiannessPrivMode)

0 commit comments

Comments
 (0)