diff options
author | Prashanth Mundkur <prashanth.mundkur@gmail.com> | 2020-06-05 14:21:47 -0700 |
---|---|---|
committer | Prashanth Mundkur <prashanth.mundkur@gmail.com> | 2020-06-05 14:21:47 -0700 |
commit | 091c03fb644e4b6ea8a53606893a2a37a07a156e (patch) | |
tree | c89fb5366812fb7360a4de89b522fda77d846261 /model/riscv_pmp_control.sail | |
parent | c6a5ea4db88c01024f26982a5b3a1692cae7c6a6 (diff) | |
download | sail-riscv-091c03fb644e4b6ea8a53606893a2a37a07a156e.zip sail-riscv-091c03fb644e4b6ea8a53606893a2a37a07a156e.tar.gz sail-riscv-091c03fb644e4b6ea8a53606893a2a37a07a156e.tar.bz2 |
Avoid relying on ext_access_type values in PMP, to be compatible with extensions.
Diffstat (limited to 'model/riscv_pmp_control.sail')
-rw-r--r-- | model/riscv_pmp_control.sail | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/model/riscv_pmp_control.sail b/model/riscv_pmp_control.sail index 1970afc..996dbd7 100644 --- a/model/riscv_pmp_control.sail +++ b/model/riscv_pmp_control.sail @@ -29,10 +29,10 @@ function pmpAddrRange(cfg: Pmpcfg_ent, pmpaddr: xlenbits, prev_pmpaddr: xlenbits val pmpCheckRWX: (Pmpcfg_ent, AccessType(ext_access_type)) -> bool function pmpCheckRWX(ent, acc) = { match acc { - Read(Data) => ent.R() == 0b1, - Write(Data) => ent.W() == 0b1, - ReadWrite(Data) => ent.R() == 0b1 & ent.W() == 0b1, - Execute() => ent.X() == 0b1 + Read(_) => ent.R() == 0b1, + Write(_) => ent.W() == 0b1, + ReadWrite(_) => ent.R() == 0b1 & ent.W() == 0b1, + Execute() => ent.X() == 0b1 } } @@ -158,10 +158,10 @@ function pmpCheck forall 'n, 'n > 0. (addr: xlenbits, width: atom('n), acc: Acce if check then None() else match acc { - Read(Data) => Some(E_Load_Access_Fault()), - Write(Data) => Some(E_SAMO_Access_Fault()), - ReadWrite(Data) => Some(E_SAMO_Access_Fault()), - Execute() => Some(E_Fetch_Access_Fault()) + Read(_) => Some(E_Load_Access_Fault()), + Write(_) => Some(E_SAMO_Access_Fault()), + ReadWrite(_) => Some(E_SAMO_Access_Fault()), + Execute() => Some(E_Fetch_Access_Fault()) } } |