From 46aef022e04d7b87ec1a867612cbd2f90c51ad69 Mon Sep 17 00:00:00 2001 From: Muhammad Hammad Bashir <139617104+MuhammadHammad001@users.noreply.github.com> Date: Fri, 11 Oct 2024 15:37:10 +0500 Subject: [PATCH] Fix PMP NA4 region upper address calculation This was missed when changing the return value from bytes to words. --- model/riscv_pmp_control.sail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/riscv_pmp_control.sail b/model/riscv_pmp_control.sail index 9862b245d..433fd6606 100644 --- a/model/riscv_pmp_control.sail +++ b/model/riscv_pmp_control.sail @@ -19,7 +19,7 @@ function pmpAddrRange(cfg: Pmpcfg_ent, pmpaddr: xlenbits, prev_pmpaddr: xlenbits // NA4 is not selectable when the PMP grain G >= 1. See pmpWriteCfg(). assert(sys_pmp_grain() < 1, "NA4 cannot be selected when PMP grain G >= 1."); let lo = pmpaddr; - Some((lo, lo + 4)) + Some((lo, lo + 1)) }, NAPOT => { // Example pmpaddr: 0b00010101111