From 52894524269b0ce4abb4a56fc7b4502f260cf68a Mon Sep 17 00:00:00 2001 From: Tim Hutt Date: Thu, 1 Feb 2024 20:29:08 +0000 Subject: [PATCH] Fix PMP grain assertion Co-authored-by: Alexander Richardson Signed-off-by: Tim Hutt --- 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 d839dcd69..24b279dbb 100644 --- a/model/riscv_pmp_control.sail +++ b/model/riscv_pmp_control.sail @@ -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)) },