diff options
-rw-r--r-- | model/riscv_fetch.sail | 1 | ||||
-rw-r--r-- | model/riscv_step.sail | 7 |
2 files changed, 3 insertions, 5 deletions
diff --git a/model/riscv_fetch.sail b/model/riscv_fetch.sail index 9c9e06a..6fd6691 100644 --- a/model/riscv_fetch.sail +++ b/model/riscv_fetch.sail @@ -12,7 +12,6 @@ function isRVC(h : half) -> bool = not(h[1 .. 0] == 0b11) -val fetch : unit -> FetchResult function fetch() -> FetchResult = /* fetch PC check for extensions: extensions return a transformed PC to fetch, * but any exceptions use the untransformed PC. diff --git a/model/riscv_step.sail b/model/riscv_step.sail index 69d2b8c..5ff7e4b 100644 --- a/model/riscv_step.sail +++ b/model/riscv_step.sail @@ -33,8 +33,7 @@ function step(step_no : int) -> bool = { }, None() => { /* the extension hook interposes on the fetch result */ - let f : FetchResult = ext_fetch_hook(fetch()); - match f { + match ext_fetch_hook(fetch()) { /* extension error */ F_Ext_Error(e) => { ext_handle_fetch_check_error(e); @@ -58,10 +57,10 @@ function step(step_no : int) -> bool = { if haveRVC() then { nextPC = PC + 2; (execute(ast), true) - } else { + } else { handle_illegal(); (RETIRE_FAIL, true) - } + } }, F_Base(w) => { sail_instr_announce(w); |