Skip to content

Commit

Permalink
Minor style fixes
Browse files Browse the repository at this point in the history
* Remove unnecessary `f` variable
* Remove redundant type delcaration for `fetch`.
* Indentation
  • Loading branch information
Timmmm committed May 15, 2024
1 parent e1242d8 commit 6c758e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion model/riscv_fetch.sail
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
7 changes: 3 additions & 4 deletions model/riscv_step.sail
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -57,10 +56,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) => {
instbits = zero_extend(w);
Expand Down

0 comments on commit 6c758e9

Please sign in to comment.