Allow iBusCached plugin to be used when no memory stage is present

This commit is contained in:
Dolu1990 2018-11-24 13:37:53 +01:00
parent 2d8d3d0566
commit c2b9544794
1 changed files with 3 additions and 5 deletions

View File

@ -182,15 +182,13 @@ class IBusCachedPlugin(resetVector : BigInt = 0x80000000l,
iBusRsp.output.pc := cacheRspArbitration.output.payload iBusRsp.output.pc := cacheRspArbitration.output.payload
val flushStage = if(memory != null) memory else execute
memory plug new Area { flushStage plug new Area {
import flushStage._
import memory._
cache.io.flush.cmd.valid := False cache.io.flush.cmd.valid := False
when(arbitration.isValid && input(FLUSH_ALL)) { when(arbitration.isValid && input(FLUSH_ALL)) {
cache.io.flush.cmd.valid := True cache.io.flush.cmd.valid := True
decode.arbitration.flushAll := True
when(!cache.io.flush.cmd.ready) { when(!cache.io.flush.cmd.ready) {
arbitration.haltItself := True arbitration.haltItself := True