diff options
author | Scott Johnson <scott.johnson@arilinc.com> | 2020-05-27 15:57:49 -0700 |
---|---|---|
committer | Scott Johnson <scott.johnson@arilinc.com> | 2020-05-27 16:04:30 -0700 |
commit | f2a065acfc9bbab02f3d6aea54e354a26e9bd120 (patch) | |
tree | c2c1f94acb16b68c7820fe41145581979fef3ee6 /model/riscv_insts_base.sail | |
parent | d062f8c28b6e92d654c7574624294c13f6ea672f (diff) | |
download | sail-riscv-f2a065acfc9bbab02f3d6aea54e354a26e9bd120.zip sail-riscv-f2a065acfc9bbab02f3d6aea54e354a26e9bd120.tar.gz sail-riscv-f2a065acfc9bbab02f3d6aea54e354a26e9bd120.tar.bz2 |
Fix bug: mtval (and [su]tval) should get vaddr, not paddr
Diffstat (limited to 'model/riscv_insts_base.sail')
-rw-r--r-- | model/riscv_insts_base.sail | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/model/riscv_insts_base.sail b/model/riscv_insts_base.sail index 6189161..9c3db85 100644 --- a/model/riscv_insts_base.sail +++ b/model/riscv_insts_base.sail @@ -388,7 +388,7 @@ function clause execute (STORE(imm, rs2, rs1, width, aq, rl)) = { DOUBLE => mem_write_ea(paddr, 8, aq, rl, false) }; match (eares) { - MemException(e) => { handle_mem_exception(paddr, e); RETIRE_FAIL }, + MemException(e) => { handle_mem_exception(vaddr, e); RETIRE_FAIL }, MemValue(_) => { let rs2_val = X(rs2); let res : MemoryOpResult(bool) = match (width, sizeof(xlen)) { @@ -400,7 +400,7 @@ function clause execute (STORE(imm, rs2, rs1, width, aq, rl)) = { match (res) { MemValue(true) => RETIRE_SUCCESS, MemValue(false) => internal_error("store got false from mem_write_value"), - MemException(e) => { handle_mem_exception(paddr, e); RETIRE_FAIL } + MemException(e) => { handle_mem_exception(vaddr, e); RETIRE_FAIL } } } } |