mirror of
https://github.com/SpinalHDL/VexRiscv.git
synced 2025-01-03 03:43:39 -05:00
Fix CsrPlugin privilege crossing
This commit is contained in:
parent
d490f903ea
commit
4209dc2792
1 changed files with 5 additions and 1 deletions
|
@ -1136,7 +1136,11 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep
|
|||
}
|
||||
}
|
||||
|
||||
illegalAccess setWhen(privilege < csrAddress(9 downto 8).asUInt)
|
||||
when(privilege < csrAddress(9 downto 8).asUInt){
|
||||
illegalAccess := True
|
||||
readInstruction := False
|
||||
writeInstruction := False
|
||||
}
|
||||
illegalAccess clearWhen(!arbitration.isValid || !input(IS_CSR))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue