update comments
[ieee754fpu.git] / src / add / fpcommon / pack.py
index 512be00008d3872968cf22c5983c07955dc16224..1464883cdeec57ed4fcc002ecb192b557f7db4fc 100644 (file)
@@ -2,28 +2,24 @@
 # Copyright (C) Jonathan P Dawson 2013
 # 2013-12-12
 
-from nmigen import Module, Signal
+from nmigen import Module, Signal, Elaboratable
 from nmigen.cli import main, verilog
 
 from fpbase import FPNumOut
 from fpbase import FPState
 from fpcommon.roundz import FPRoundData
+from singlepipe import Object
 
 
-class FPPackData:
+class FPPackData(Object):
 
     def __init__(self, width, id_wid):
+        Object.__init__(self)
         self.z = Signal(width, reset_less=True)
         self.mid = Signal(id_wid, reset_less=True)
 
-    def eq(self, i):
-        return [self.z.eq(i.z), self.mid.eq(i.mid)]
 
-    def ports(self):
-        return [self.z, self.mid]
-
-
-class FPPackMod:
+class FPPackMod(Elaboratable):
 
     def __init__(self, width, id_wid):
         self.width = width