From ccfa08f1b2102e3d92d5a872a94b40e3f4f6a9cd Mon Sep 17 00:00:00 2001 From: Umer Shahid Date: Fri, 2 Aug 2024 10:07:41 +0500 Subject: [PATCH] Update rv64_pmp.cgf Updated pmp_cfg_locked_write_unrelated coverpoint in rv64 to update a minor bug Signed-off-by: Umer Shahid --- coverage/rv64_pmp.cgf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coverage/rv64_pmp.cgf b/coverage/rv64_pmp.cgf index 32535dbe7..616dbad5f 100644 --- a/coverage/rv64_pmp.cgf +++ b/coverage/rv64_pmp.cgf @@ -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. @@ -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 \ No newline at end of file + '(mnemonic == {"ld", "lw", "lh", "lb", "sd", "sw", "sh", "sb"}) and ((pmpcfg0 >> 8) & 0x9F == 0x95) and ${NA4_PRIORITY_2_REGION_MATCH}': 0