diff options
author | Alasdair <alasdair.armstrong@cl.cam.ac.uk> | 2024-03-01 19:57:18 +0000 |
---|---|---|
committer | Bill McSpadden <bill@riscv.org> | 2024-04-24 08:38:22 -0500 |
commit | a39a1ac64e8e716c5bb588f11809dec661ae0f1d (patch) | |
tree | 55eec6165217f110d1dcf3b403f2e935f70cfda0 /model/riscv_sys_control.sail | |
parent | 16077e126b634c006590b02cb758d48a3882528a (diff) | |
download | sail-riscv-a39a1ac64e8e716c5bb588f11809dec661ae0f1d.zip sail-riscv-a39a1ac64e8e716c5bb588f11809dec661ae0f1d.tar.gz sail-riscv-a39a1ac64e8e716c5bb588f11809dec661ae0f1d.tar.bz2 |
Add read-only CSR MCONFIGPTR
CSR MCONFIGPTR is defined in RISCV priv spec 1.12 but is missing from the
RISC-V SAIL model. This commit adds the read-only CSR MCONFIGPTR.
Co-authored-by: Dan Smathers <dan.smathers@seagate.com>
Diffstat (limited to 'model/riscv_sys_control.sail')
-rw-r--r-- | model/riscv_sys_control.sail | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/model/riscv_sys_control.sail b/model/riscv_sys_control.sail index ecc53ae..1baa337 100644 --- a/model/riscv_sys_control.sail +++ b/model/riscv_sys_control.sail @@ -21,6 +21,7 @@ function is_CSR_defined (csr : csreg, p : Privilege) -> bool = 0xf12 => p == Machine, // marchdid 0xf13 => p == Machine, // mimpid 0xf14 => p == Machine, // mhartid + 0xf15 => p == Machine, // mconfigptr /* machine mode: trap setup */ 0x300 => p == Machine, // mstatus 0x301 => p == Machine, // misa @@ -477,6 +478,7 @@ function init_sys() -> unit = { cur_privilege = Machine; mhartid = zero_extend(0b0); + mconfigptr = zero_extend(0b0); misa[MXL] = arch_to_bits(if sizeof(xlen) == 32 then RV32 else RV64); misa[A] = 0b1; /* atomics */ |