CSR access enables are also impacted by the MMU memory access

This commit is contained in:
Charles Papon 2019-09-21 10:28:52 +02:00
parent 88eb8e4e47
commit be18d8fa5a
1 changed files with 2 additions and 7 deletions

View File

@ -945,14 +945,9 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep
val readData = B(0, 32 bits) val readData = B(0, 32 bits)
val writeInstruction = arbitration.isValid && input(IS_CSR) && input(CSR_WRITE_OPCODE) val writeInstruction = arbitration.isValid && input(IS_CSR) && input(CSR_WRITE_OPCODE)
val readInstruction = arbitration.isValid && input(IS_CSR) && input(CSR_READ_OPCODE) val readInstruction = arbitration.isValid && input(IS_CSR) && input(CSR_READ_OPCODE)
val writeEnable = writeInstruction && ! blockedBySideEffects // && readDataRegValid val writeEnable = writeInstruction && ! blockedBySideEffects && !arbitration.isStuckByOthers// && readDataRegValid
val readEnable = readInstruction && ! blockedBySideEffects // && !readDataRegValid val readEnable = readInstruction && ! blockedBySideEffects && !arbitration.isStuckByOthers// && !readDataRegValid
//arbitration.isStuckByOthers, in case of the hazardPlugin is in the executeStage //arbitration.isStuckByOthers, in case of the hazardPlugin is in the executeStage
val hazardStage = service(classOf[RegFileService]).readStage()
if(hazardStage == execute) when (arbitration.isStuckByOthers){
writeEnable := False
readEnable := False
}
// def readDataReg = memory.input(REGFILE_WRITE_DATA) //PIPE OPT // def readDataReg = memory.input(REGFILE_WRITE_DATA) //PIPE OPT