Skip to content

Commit

Permalink
Fix #112 mstatus.tw
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Jul 3, 2024
1 parent 6f73692 commit bc18f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/naxriscv/execute/EnvCallPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class EnvCallPlugin(val euId : String)(var rescheduleAt : Int = 0) extends Plugi

setup.reschedule.valid := isValid && (
EBREAK || ECALL || XRET || FENCE_I || FLUSH_DATA || FENCE_VMA ||
WFI && (priv.logic.machine.mstatus.tw && !priv.isMachine() || priv.isUser())
WFI && !(priv.isMachine() || !priv.logic.machine.mstatus.tw && (Bool(!priv.p.withSupervisor) || priv.isSupervisor()))
)
setup.reschedule.robId := ROB.ID
setup.reschedule.tval := B(PC).andMask(EBREAK) //That's what spike do
Expand Down

0 comments on commit bc18f66

Please sign in to comment.