From b8b053e706a66d4baf936d42104db43eab4fbf21 Mon Sep 17 00:00:00 2001 From: Sean Cross Date: Fri, 20 Sep 2019 08:36:01 +0800 Subject: [PATCH] muldiviterative: fix build for short pipelines Signed-off-by: Sean Cross --- src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala b/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala index f366854..11af4ab 100644 --- a/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala +++ b/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala @@ -69,8 +69,9 @@ class MulDivIterativePlugin(genMul : Boolean = true, import pipeline.config._ if(!genMul && !genDiv) return - memory plug new Area { - import memory._ + val flushStage = if(memory != null) memory else execute + flushStage plug new Area { + import flushStage._ //Shared ressources val rs1 = Reg(UInt(33 bits))