class FPCorrectionsMod:
def __init__(self, width):
- self.in_z = FPNumOut(width, False)
- self.out_z = FPNumOut(width, False)
+ self.width = width
+ self.in_z = self.ispec()
+ self.out_z = self.ospec()
+
+ def ispec(self):
+ return FPNumOut(self.width, False)
+
+ def ospec(self):
+ return FPNumOut(self.width, False)
def setup(self, m, in_z):
""" links module to inputs and outputs
FPState.__init__(self, "corrections")
FPID.__init__(self, id_wid)
self.mod = FPCorrectionsMod(width)
- self.out_z = FPNumBase(width)
+ self.out_z = self.mod.ospec()
def setup(self, m, in_z, in_mid):
""" links module to inputs and outputs