Fix WFI. Not sensitive anymore to global interrupt enables, delegation and privilege
This commit is contained in:
parent
64e8919e89
commit
56f7c27d18
|
@ -879,9 +879,10 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep
|
|||
import execute._
|
||||
//Manage WFI instructions
|
||||
val inWfi = False.addTag(Verilator.public)
|
||||
val wfiWake = RegNext(interruptSpecs.map(_.cond).orR) init(False)
|
||||
if(wfiGenAsWait) when(arbitration.isValid && input(ENV_CTRL) === EnvCtrlEnum.WFI){
|
||||
inWfi := True
|
||||
when(!interrupt){
|
||||
when(!wfiWake){
|
||||
arbitration.haltItself := True
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue