mirror of
https://github.com/SpinalHDL/VexRiscv.git
synced 2025-04-24 05:57:07 -04:00
Fix WFI. Not sensitive anymore to global interrupt enables, delegation and privilege
This commit is contained in:
parent
64e8919e89
commit
56f7c27d18
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue