Skip to content

Commit

Permalink
Per section 3.1.1 of the Privileged Spec (Machine ISA Register misa):…
Browse files Browse the repository at this point in the history
… F/D both should be disabled if F=0
  • Loading branch information
ahadali-10x authored and billmcspadden-riscv committed Sep 26, 2023
1 parent 24e3e68 commit dbea780
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 dbea780

Please sign in to comment.