From 505d0b700a3897ddbb4a6d3c60d449d796d80730 Mon Sep 17 00:00:00 2001 From: Charles Papon Date: Wed, 4 Mar 2020 19:58:50 +0100 Subject: [PATCH] MulDivPlugin now give names to div stages --- src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala b/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala index eafa4da..da3738d 100644 --- a/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala +++ b/src/main/scala/vexriscv/plugin/MulDivIterativePlugin.scala @@ -108,7 +108,7 @@ class MulDivIterativePlugin(genMul : Boolean = true, val div = ifGen(genDiv) (new Area{ assert(isPow2(divUnrollFactor)) - + def area = this //register allocation def numerator = rs1(31 downto 0) def denominator = rs2 @@ -130,13 +130,13 @@ class MulDivIterativePlugin(genMul : Boolean = true, numerator := inNumerator remainder := inRemainder } - case _ => { + case _ => new Area { val remainderShifted = (inRemainder ## inNumerator.msb).asUInt val remainderMinusDenominator = remainderShifted - denominator val outRemainder = !remainderMinusDenominator.msb ? remainderMinusDenominator.resize(32 bits) | remainderShifted.resize(32 bits) val outNumerator = (inNumerator ## !remainderMinusDenominator.msb).asUInt.resize(32 bits) stages(outNumerator, outRemainder, stage - 1) - } + }.setCompositeName(area, "stage_" + (divUnrollFactor-stage)) } stages(numerator, remainder, divUnrollFactor)