Skip to content

Commit

Permalink
Fix PMP NA4 region upper address calculation
Browse files Browse the repository at this point in the history
This was missed when changing the return value from bytes to words.
  • Loading branch information
MuhammadHammad001 authored Oct 11, 2024
1 parent 89b8e0c commit 46aef02
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion model/riscv_pmp_control.sail
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 46aef02

Please sign in to comment.