Improve SingleInstructionLimiterPlugin to also include fetch stages

This commit is contained in:
Dolu1990 2020-05-27 14:19:17 +02:00
parent a64fd9cf3b
commit 18cce053a3
1 changed files with 4 additions and 2 deletions

View File

@ -9,7 +9,9 @@ class SingleInstructionLimiterPlugin() extends Plugin[VexRiscv] {
override def build(pipeline: VexRiscv): Unit = { override def build(pipeline: VexRiscv): Unit = {
import pipeline._ import pipeline._
import pipeline.config._ import pipeline.config._
val fetcher = pipeline.service(classOf[IBusFetcher])
decode.arbitration.haltByOther.setWhen(List(decode,execute,memory,writeBack).map(_.arbitration.isValid).orR) when(fetcher.incoming() || List(decode,execute,memory,writeBack).map(_.arbitration.isValid).orR) {
fetcher.haltIt()
}
} }
} }