muldiviterative: fix build for short pipelines

Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
Sean Cross 2019-09-20 08:36:01 +08:00
parent fdc95debef
commit b8b053e706
1 changed files with 3 additions and 2 deletions

View File

@ -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))