Skip to content

Commit

Permalink
F/D both should be disabled if F=0
Browse files Browse the repository at this point in the history
  • Loading branch information
ahadali-10x committed Aug 30, 2023
1 parent 861bd6f commit 7123a7b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions model/riscv_sys_regs.sail
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ function legalize_misa(m : Misa, v : xlenbits) -> Misa = {
else {
/* Suppress enabling C if C was disabled at boot (i.e. not supported) */
let m = if not(sys_enable_rvc()) then m else update_C(m, v.C());
/* Handle updates for F/D. */
if not(sys_enable_fdext()) | (v.D() == 0b1 & v.F() == 0b0)
/* Suppress updates to misa.{f,d} if disabled at boot */
if not(sys_enable_fdext())
then m
else update_D(update_F(m, v.F()), v.D())
else update_D(update_F(m, v.F()), v.D() & v.F())
}
}

Expand Down

0 comments on commit 7123a7b

Please sign in to comment.