You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# addTestsByDir(f"{WALLY}/tests/riscof/work/riscv-arch-test/rv32i_m/pmp32", "rv32gc", coveragesim, coverStr, configs, lockstepMode=1) TODO: Add when working in lockstep
logic ReadNoAmoAccessM; // Read that is not part of atomic operation causes Load faults. Otherwise StoreAmo faults
76
76
logic [1:0] PBMemoryType; // PBMT field of PTE during TLB hit, or 00 otherwise
77
77
logic AtomicMisalignedCausesAccessFaultM; // Misaligned atomics are not handled by hardware even with ZICCLSM, so it throws an access fault instead of misaligned with ZICCLSM
78
+
logic [1:0] EffectivePrivilegeModeW; // Effective privilege mode accounting for MPRV
78
79
80
+
81
+
// Get Effective Privilege Mode
82
+
// for DLB, when mstatus.MPRV=1, use mstatus.MPP rather than the current privilege mode
assign PMPTop1 ={PMPAdr,2'b00}| NAMask; // top of the pmp region. All 1s in the lower bits. Used to check the address doesn't pass the top
87
+
// PMP should match but fail if the size is too big (8-byte accesses spanning to TOR or NA4 region)
88
+
assign PMPTopTOR ={PMPAdr-1, 2'b11}; // TOR goes to (pmpaddr << 2) - 1
89
+
assign PMPTopNaturallyAligned ={PMPAdr,2'b00}| NAMask; // top of the pmp region for NA4 and NAPOT. All 1s in the lower bits. Used to check the address doesn't pass the top
assign PMPCBOMAccessFault = EnforcePMP & (|CMOpM[2:0]) &~MatchingR ; // checking R is sufficient because W implies R in PMP // exclusion-tag: immu-pmpcbom
0 commit comments