Optimise div iterative plugin done signal

This commit is contained in:
Dolu1990 2018-11-03 11:12:37 +01:00
parent c8ac214097
commit 978232fd63
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ class MulDivIterativePlugin(genMul : Boolean = true, genDiv : Boolean = true, mu
val needRevert = Reg(Bool) val needRevert = Reg(Bool)
val counter = Counter(32 / divUnrollFactor + 2) val counter = Counter(32 / divUnrollFactor + 2)
val done = counter.willOverflowIfInc val done = Reg(Bool) setWhen(counter === counter.end-1) clearWhen(!arbitration.isStuck)
val result = Reg(Bits(32 bits)) val result = Reg(Bits(32 bits))
when(arbitration.isValid && input(IS_DIV)){ when(arbitration.isValid && input(IS_DIV)){
when(!done){ when(!done){