From 78f0a7f13e05d8c5d84603105fd1c31a7d24677e Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Mon, 16 May 2022 10:36:21 +0200 Subject: [PATCH] Fix CfuPlugin/VfuPlugin fork duplication https://github.com/google/CFU-Playground/issues/582 --- src/main/scala/vexriscv/plugin/CfuPlugin.scala | 2 +- src/main/scala/vexriscv/plugin/VfuPlugin.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/CfuPlugin.scala b/src/main/scala/vexriscv/plugin/CfuPlugin.scala index de6daa1..9a93f6c 100644 --- a/src/main/scala/vexriscv/plugin/CfuPlugin.scala +++ b/src/main/scala/vexriscv/plugin/CfuPlugin.scala @@ -193,7 +193,7 @@ class CfuPlugin(val stageCount : Int, arbitration.haltItself setWhen(scheduleWish && hazard) val hold = RegInit(False) setWhen(schedule) clearWhen(bus.cmd.ready) - val fired = RegInit(False) setWhen(bus.cmd.fire) clearWhen(!arbitration.isStuckByOthers) + val fired = RegInit(False) setWhen(bus.cmd.fire) clearWhen(!arbitration.isStuck) insert(CFU_IN_FLIGHT) := schedule || hold || fired bus.cmd.valid := (schedule || hold) && !fired diff --git a/src/main/scala/vexriscv/plugin/VfuPlugin.scala b/src/main/scala/vexriscv/plugin/VfuPlugin.scala index c304827..a2c0930 100644 --- a/src/main/scala/vexriscv/plugin/VfuPlugin.scala +++ b/src/main/scala/vexriscv/plugin/VfuPlugin.scala @@ -100,7 +100,7 @@ class VfuPlugin(val stageCount : Int, arbitration.haltItself setWhen(scheduleWish && hazard) val hold = RegInit(False) setWhen(schedule) clearWhen(bus.cmd.ready) - val fired = RegInit(False) setWhen(bus.cmd.fire) clearWhen(!arbitration.isStuckByOthers) + val fired = RegInit(False) setWhen(bus.cmd.fire) clearWhen(!arbitration.isStuck) insert(VFU_IN_FLIGHT) := schedule || hold || fired bus.cmd.valid := (schedule || hold) && !fired