Skip to content

Commit

Permalink
Fix PMP grain assertion
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Richardson <mail@alexrichardson.me>
Signed-off-by: Tim Hutt <tdhutt@gmail.com>
  • Loading branch information
Timmmm and arichardson authored Feb 1, 2024
1 parent 8133fc1 commit 5289452
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 @@ -81,7 +81,7 @@ function pmpAddrRange(cfg: Pmpcfg_ent, pmpaddr: xlenbits, prev_pmpaddr: xlenbits
TOR => { Some ((prev_pmpaddr << 2, pmpaddr << 2)) },
NA4 => {
// 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.");
assert(sys_pmp_grain() < 1, "NA4 cannot be selected when PMP grain G >= 1.");
let lo = pmpaddr << 2;
Some((lo, lo + 4))
},
Expand Down

0 comments on commit 5289452

Please sign in to comment.