From dc968020c4b31836749569ab3f4ab4d2d5af54a6 Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Wed, 6 Jun 2018 15:20:37 +0200 Subject: [PATCH] Fix relaxedBusCmdValid pendingCmd overflow --- src/main/scala/vexriscv/plugin/IBusSimplePlugin.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/IBusSimplePlugin.scala b/src/main/scala/vexriscv/plugin/IBusSimplePlugin.scala index 9cef45c..3e914af 100644 --- a/src/main/scala/vexriscv/plugin/IBusSimplePlugin.scala +++ b/src/main/scala/vexriscv/plugin/IBusSimplePlugin.scala @@ -160,9 +160,10 @@ class IBusSimplePlugin(resetVector : BigInt, val pipFork = fork(1) output << pipFork - iBus.cmd.valid := busFork.valid && pendingCmd =/= pendingMax + val okBus = pendingCmd =/= pendingMax + iBus.cmd.valid := busFork.valid && okBus iBus.cmd.pc := busFork.payload(31 downto 2) @@ "00" - busFork.ready := iBus.cmd.ready + busFork.ready := iBus.cmd.ready && okBus } else new Area { def input = fetchPc.output def output = iBusRsp.input