Skip to content

Commit

Permalink
Update rv64_pmp.cgf
Browse files Browse the repository at this point in the history
Updated pmp_cfg_locked_write_unrelated coverpoint in rv64 to update a minor bug

Signed-off-by: Umer Shahid <[email protected]>
  • Loading branch information
UmerShahidengr authored Aug 2, 2024
1 parent a4ed357 commit ccfa08f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions coverage/rv64_pmp.cgf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ pmp_cfg_locked_write_unrelated:
"{csrrs, csrrw}" : 0
csr_comb:
# (Lock bit set) and (req) and (old_value_pmpcfg != 0)
(old("pmpaddr{0 ... 15}") ^ (pmpaddr$1) == 0x00) and (pmpcfg{0,2}{[$1/8]} >> {0, 8, 16, 24, 32, 40, 48, 56}{[$1%5]} & 0x80 == 0x80): 0
(pmpcfg{0, 2} >> {0, 8, 16, 24, 32, 40, 48, 56} & 0x80 == 0x80) and ((old("pmpcfg$1") & (0xFF << $2)) ^ (pmpcfg$1 & (0xFF << $2)) == 0x00) and old("pmpcfg$1") != 0: 0
(old("pmpaddr{0 ... 15}") ^ (pmpaddr$1) == 0x00) and (pmpcfg{0,2}{[$1/8]} >> {[($1%8)*8]} & 0x80 == 0x80): 0
(pmpcfg{0, 2} >> {[($1%8)*8]} & 0x80 == 0x80) and ((old("pmpcfg$1") & (0xFF << $2)) ^ (pmpcfg$1 & (0xFF << $2)) == 0x00) and old("pmpcfg$1") != 0: 0

#This coverpoint checks the coverage of pmp-CSR-access.cgf (PMP CSRs accesses in different modes)
#Checks pmpcgf and pmpaddr are only accessible in M mode and gets fault in S and U mode when accessed.
Expand Down Expand Up @@ -833,4 +833,4 @@ PMP_NA4_priority_rx_level_2:
#Check for store fault on sb , sh, sw, sd instruction
mnemonic == {'sb', 'sh', 'sw', 'sd'} and mode_change == {'M to M', 'U to M', 'S to M'} and (mcause == ${CAUSE_STORE_ACCESS}): 0
#Check the napot region is accessed at least once
'(mnemonic == {"ld", "lw", "lh", "lb", "sd", "sw", "sh", "sb"}) and ((pmpcfg0 >> 8) & 0x9F == 0x95) and ${NA4_PRIORITY_2_REGION_MATCH}': 0
'(mnemonic == {"ld", "lw", "lh", "lb", "sd", "sw", "sh", "sb"}) and ((pmpcfg0 >> 8) & 0x9F == 0x95) and ${NA4_PRIORITY_2_REGION_MATCH}': 0

0 comments on commit ccfa08f

Please sign in to comment.