aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_mem.sail
diff options
context:
space:
mode:
Diffstat (limited to 'model/riscv_mem.sail')
-rw-r--r--model/riscv_mem.sail4
1 files changed, 2 insertions, 2 deletions
diff --git a/model/riscv_mem.sail b/model/riscv_mem.sail
index 2df6192..5224938 100644
--- a/model/riscv_mem.sail
+++ b/model/riscv_mem.sail
@@ -144,7 +144,7 @@ function checked_mem_read forall 'n, 0 < 'n <= max_mem_access . (t : AccessType(
/* PMP checks if enabled */
function pmp_mem_read forall 'n, 0 < 'n <= max_mem_access . (t : AccessType(ext_access_type), p : Privilege, paddr : xlenbits, width : atom('n), aq : bool, rl : bool, res: bool, meta : bool) -> MemoryOpResult((bits(8 * 'n), mem_meta)) =
- if not(plat_enable_pmp())
+ if sys_pmp_count() == 0
then checked_mem_read(t, paddr, width, aq, rl, res, meta)
else {
match pmpCheck(paddr, width, t, p) {
@@ -272,7 +272,7 @@ function checked_mem_write forall 'n, 0 < 'n <= max_mem_access . (wk : write_kin
/* PMP checks if enabled */
function pmp_mem_write forall 'n, 0 < 'n <= max_mem_access . (wk: write_kind, paddr : xlenbits, width : atom('n), data: bits(8 * 'n), typ: AccessType(ext_access_type), priv: Privilege, meta: mem_meta) -> MemoryOpResult(bool) =
- if not(plat_enable_pmp())
+ if sys_pmp_count() == 0
then checked_mem_write(wk, paddr, width, data, meta)
else {
match pmpCheck(paddr, width, typ, priv) {