aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_pmp_regs.sail
diff options
context:
space:
mode:
authorPrashanth Mundkur <prashanth.mundkur@gmail.com>2020-04-01 09:05:03 -0700
committerPrashanth Mundkur <prashanth.mundkur@gmail.com>2020-04-01 09:05:03 -0700
commit695d8e56cf9d4f1b6153f22be5bb046026b00287 (patch)
tree2bfdbc5e6bf4885f0414eb168cbee8fbfc801fa4 /model/riscv_pmp_regs.sail
parent17e7dca08ad90d839c162e6f700de28172393e5f (diff)
downloadsail-riscv-695d8e56cf9d4f1b6153f22be5bb046026b00287.zip
sail-riscv-695d8e56cf9d4f1b6153f22be5bb046026b00287.tar.gz
sail-riscv-695d8e56cf9d4f1b6153f22be5bb046026b00287.tar.bz2
Add clarifying comment.
Diffstat (limited to 'model/riscv_pmp_regs.sail')
-rw-r--r--model/riscv_pmp_regs.sail2
1 files changed, 1 insertions, 1 deletions
diff --git a/model/riscv_pmp_regs.sail b/model/riscv_pmp_regs.sail
index 5d3772e..f51ab8b 100644
--- a/model/riscv_pmp_regs.sail
+++ b/model/riscv_pmp_regs.sail
@@ -93,7 +93,7 @@ function pmpTORLocked(cfg: Pmpcfg_ent) -> bool =
(cfg.L() == 0b1) & (pmpAddrMatchType_of_bits(cfg.A()) == TOR)
function pmpWriteCfg(cfg: Pmpcfg_ent, v: bits(8)) -> Pmpcfg_ent =
- if pmpLocked(cfg) then cfg else Mk_Pmpcfg_ent(v & 0x9f)
+ if pmpLocked(cfg) then cfg else Mk_Pmpcfg_ent(v & 0x9f) // 0x9f masks reserved bits.
val pmpWriteCfgReg : forall 'n, 0 <= 'n < 4 . (atom('n), xlenbits) -> unit effect {rreg, wreg}
function pmpWriteCfgReg(n, v) = {