From bdc52097b6a107ea40beb62dfdec1e06cd2c8a58 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Thu, 4 Mar 2021 20:15:01 +0100 Subject: [PATCH] CFU ensure that CFU_IN_FLIGHT do not produce false positive when the pipeline is stuck --- src/main/scala/vexriscv/plugin/CfuPlugin.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/vexriscv/plugin/CfuPlugin.scala b/src/main/scala/vexriscv/plugin/CfuPlugin.scala index 60dd95b..0fb03b4 100644 --- a/src/main/scala/vexriscv/plugin/CfuPlugin.scala +++ b/src/main/scala/vexriscv/plugin/CfuPlugin.scala @@ -223,6 +223,7 @@ class CfuPlugin(val stageCount : Int, } } + pipeline.stages.dropRight(1).foreach(s => s.output(CFU_IN_FLIGHT) clearWhen(s.arbitration.isStuck)) addPrePopTask(() => stages.dropWhile(_ != memory).reverse.dropWhile(_ != joinStage).foreach(s => s.input(CFU_IN_FLIGHT).init(False))) } }