From dbbaddbe9cf7d131f0775ba5fd714e4501617880 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 22 Jul 2019 13:06:42 +0100 Subject: [PATCH] add twin MSB alignment / denormalisation (from FPMUL) --- src/ieee754/fpdiv/specialcases.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ieee754/fpdiv/specialcases.py b/src/ieee754/fpdiv/specialcases.py index 5bbe5c40..22656314 100644 --- a/src/ieee754/fpdiv/specialcases.py +++ b/src/ieee754/fpdiv/specialcases.py @@ -10,6 +10,7 @@ from nmutil.singlepipe import SimpleHandshake, StageChain from ieee754.fpcommon.fpbase import FPState, FPID from ieee754.fpcommon.getop import FPADDBaseData from ieee754.fpcommon.denorm import (FPSCData, FPAddDeNormMod) +from ieee754.fpmul.align import FPAlignModSingle class FPDIVSpecialCasesMod(Elaboratable): @@ -147,21 +148,22 @@ class FPDIVSpecialCasesDeNorm(FPState, SimpleHandshake): return FPADDBaseData(self.pspec) # SpecialCases ispec def ospec(self): - return FPSCData(self.pspec, False) # DeNorm ospec + return FPSCData(self.pspec, False) # Align ospec def setup(self, m, i): """ links module to inputs and outputs """ smod = FPDIVSpecialCasesMod(self.pspec) dmod = FPAddDeNormMod(self.pspec, False) + amod = FPAlignModSingle(self.pspec, False) - chain = StageChain([smod, dmod]) + chain = StageChain([smod, dmod, amod]) chain.setup(m, i) # only needed for break-out (early-out) # self.out_do_z = smod.o.out_do_z - self.o = dmod.o + self.o = amod.o def process(self, i): return self.o -- 2.30.2