aboutsummaryrefslogtreecommitdiff
path: root/model/riscv_fetch.sail
diff options
context:
space:
mode:
authorJames Clarke <jrtc27@jrtc27.com>2019-12-23 19:44:11 +0000
committerJames Clarke <jrtc27@jrtc27.com>2019-12-23 19:52:50 +0000
commitdd0f51d1d681b92348e56abe2e20aac11dfda130 (patch)
treee235cf442ddf0525d73409a6bb46d5497a5e7e26 /model/riscv_fetch.sail
parent9ebfc467a2f9251f165494ebbedb83e0cb432fa9 (diff)
downloadsail-riscv-dd0f51d1d681b92348e56abe2e20aac11dfda130.zip
sail-riscv-dd0f51d1d681b92348e56abe2e20aac11dfda130.tar.gz
sail-riscv-dd0f51d1d681b92348e56abe2e20aac11dfda130.tar.bz2
Remove hard-coded E_Fetch_Access_Fault now mem_read checks the type
Diffstat (limited to 'model/riscv_fetch.sail')
-rw-r--r--model/riscv_fetch.sail4
1 files changed, 2 insertions, 2 deletions
diff --git a/model/riscv_fetch.sail b/model/riscv_fetch.sail
index d091756..cdda96e 100644
--- a/model/riscv_fetch.sail
+++ b/model/riscv_fetch.sail
@@ -22,7 +22,7 @@ function fetch() -> FetchResult =
* exceptions.
*/
match mem_read(Execute(), ppclo, 2, false, false, false) {
- MemException(e) => F_Error(E_Fetch_Access_Fault(), PC),
+ MemException(e) => F_Error(e, PC),
MemValue(ilo) => {
if isRVC(ilo)
then F_RVC(ilo)
@@ -36,7 +36,7 @@ function fetch() -> FetchResult =
TR_Failure(e, _) => F_Error(e, PC_hi),
TR_Address(ppchi, _) => {
match mem_read(Execute(), ppchi, 2, false, false, false) {
- MemException(e) => F_Error(E_Fetch_Access_Fault(), PC_hi),
+ MemException(e) => F_Error(e, PC_hi),
MemValue(ihi) => F_Base(append(ihi, ilo))
}
}