remove debug prints
[ieee754fpu.git] / src / ieee754 / fpcommon / normtopack.py
index 9cba72550d9366018fcb1cb0e08c9afc91c77162..b90d02321cfa1988fafe910a54ca0d4f03364656 100644 (file)
@@ -16,27 +16,28 @@ from .pack import FPPackData, FPPackMod
 
 class FPNormToPack(FPState, SimpleHandshake):
 
-    def __init__(self, width, id_wid):
+    def __init__(self, pspec, e_extra=False):
         FPState.__init__(self, "normalise_1")
-        self.id_wid = id_wid
-        self.width = width
+        #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.width, self.id_wid) # Norm1ModSingle ispec
+        return FPAddStage1Data(self.pspec, e_extra=self.e_extra)
 
     def ospec(self):
-        return FPPackData(self.width, self.id_wid) # FPPackMod ospec
+        return FPPackData(self.pspec) # FPPackMod
 
     def setup(self, m, i):
         """ links module to inputs and outputs
         """
 
         # Normalisation, Rounding Corrections, Pack - in a chain
-        nmod = FPNorm1ModSingle(self.width, self.id_wid)
-        rmod = FPRoundMod(self.width, self.id_wid)
-        cmod = FPCorrectionsMod(self.width, self.id_wid)
-        pmod = FPPackMod(self.width, self.id_wid)
+        nmod = FPNorm1ModSingle(self.pspec, e_extra=self.e_extra)
+        rmod = FPRoundMod(self.pspec)
+        cmod = FPCorrectionsMod(self.pspec)
+        pmod = FPPackMod(self.pspec)
         stages = [nmod, rmod, cmod, pmod]
         chain = StageChain(stages)
         chain.setup(m, i)