Fix CsrPlugin privilege crossing

This commit is contained in:
Dolu1990 2020-10-28 12:57:20 +01:00
parent d490f903ea
commit 4209dc2792

View file

@ -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))
}
}