Fix d$ invalidation when the mmu is enabled
This commit is contained in:
parent
15a665af53
commit
220b599c9a
|
@ -1063,16 +1063,18 @@ class DataCache(val p : DataCacheConfig, mmuParameter : MemoryTranslatorBusParam
|
||||||
}
|
}
|
||||||
|
|
||||||
//remove side effects on exceptions
|
//remove side effects on exceptions
|
||||||
when(consistancyHazard || mmuRsp.refilling || io.cpu.writeBack.accessError || io.cpu.writeBack.mmuException || io.cpu.writeBack.unalignedAccess){
|
when(io.cpu.writeBack.isValid) {
|
||||||
io.mem.cmd.valid := False
|
when(consistancyHazard || mmuRsp.refilling || io.cpu.writeBack.accessError || io.cpu.writeBack.mmuException || io.cpu.writeBack.unalignedAccess) {
|
||||||
tagsWriteCmd.valid := False
|
io.mem.cmd.valid := False
|
||||||
dataWriteCmd.valid := False
|
tagsWriteCmd.valid := False
|
||||||
loaderValid := False
|
dataWriteCmd.valid := False
|
||||||
io.cpu.writeBack.haltIt := False
|
loaderValid := False
|
||||||
if(withInternalLrSc) lrSc.reserved := lrSc.reserved
|
io.cpu.writeBack.haltIt := False
|
||||||
if(withExternalAmo) amo.external.state := LR_CMD
|
if (withInternalLrSc) lrSc.reserved := lrSc.reserved
|
||||||
|
if (withExternalAmo) amo.external.state := LR_CMD
|
||||||
|
}
|
||||||
|
io.cpu.redo setWhen((mmuRsp.refilling || consistancyHazard))
|
||||||
}
|
}
|
||||||
io.cpu.redo setWhen(io.cpu.writeBack.isValid && (mmuRsp.refilling || consistancyHazard))
|
|
||||||
|
|
||||||
assert(!(io.cpu.writeBack.isValid && !io.cpu.writeBack.haltIt && io.cpu.writeBack.isStuck), "writeBack stuck by another plugin is not allowed", ERROR)
|
assert(!(io.cpu.writeBack.isValid && !io.cpu.writeBack.haltIt && io.cpu.writeBack.isStuck), "writeBack stuck by another plugin is not allowed", ERROR)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue