def __init__(self, in_pspec, out_pspec):
ControlBase.__init__(self)
self.pipe1 = FPCVTSpecialCasesDeNorm(in_pspec, out_pspec)
- self.pipe2 = FPNormToPack(out_pspec)
+ self.pipe2 = FPNormToPack(out_pspec, e_extra=True)
self._eqs = self.connect([self.pipe1, self.pipe2])
class FPNormToPack(FPState, SimpleHandshake):
- def __init__(self, pspec):
+ def __init__(self, pspec, e_extra=False):
FPState.__init__(self, "normalise_1")
print ("normtopack", pspec)
self.pspec = pspec
+ self.e_extra = e_extra
SimpleHandshake.__init__(self, self) # pipeline is its own stage
def ispec(self):
- return FPAddStage1Data(self.pspec)
+ return FPAddStage1Data(self.pspec, e_extra=self.e_extra)
def ospec(self):
return FPPackData(self.pspec) # FPPackMod
"""
# Normalisation, Rounding Corrections, Pack - in a chain
- nmod = FPNorm1ModSingle(self.pspec)
+ nmod = FPNorm1ModSingle(self.pspec, e_extra=self.e_extra)
rmod = FPRoundMod(self.pspec)
cmod = FPCorrectionsMod(self.pspec)
pmod = FPPackMod(self.pspec)
class FPNorm1ModSingle(Elaboratable):
- def __init__(self, pspec):
+ def __init__(self, pspec, e_extra=False):
self.pspec = pspec
+ self.e_extra = e_extra
self.i = self.ispec()
self.o = self.ospec()
def ispec(self):
- return FPAddStage1Data(self.pspec)
+ return FPAddStage1Data(self.pspec, e_extra=self.e_extra)
def ospec(self):
return FPNorm1Data(self.pspec)