From 18cce053a33649c783371662c4150cef5e9f501d Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Wed, 27 May 2020 14:19:17 +0200 Subject: [PATCH] Improve SingleInstructionLimiterPlugin to also include fetch stages --- .../vexriscv/plugin/SingleInstructionLimiterPlugin.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/SingleInstructionLimiterPlugin.scala b/src/main/scala/vexriscv/plugin/SingleInstructionLimiterPlugin.scala index deae767..c6c9706 100644 --- a/src/main/scala/vexriscv/plugin/SingleInstructionLimiterPlugin.scala +++ b/src/main/scala/vexriscv/plugin/SingleInstructionLimiterPlugin.scala @@ -9,7 +9,9 @@ class SingleInstructionLimiterPlugin() extends Plugin[VexRiscv] { override def build(pipeline: VexRiscv): Unit = { import pipeline._ import pipeline.config._ - - decode.arbitration.haltByOther.setWhen(List(decode,execute,memory,writeBack).map(_.arbitration.isValid).orR) + val fetcher = pipeline.service(classOf[IBusFetcher]) + when(fetcher.incoming() || List(decode,execute,memory,writeBack).map(_.arbitration.isValid).orR) { + fetcher.haltIt() + } } }