add ospec function to SpecialCases Mod
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 20 Mar 2019 12:46:14 +0000 (12:46 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Wed, 20 Mar 2019 12:46:14 +0000 (12:46 +0000)
src/add/nmigen_add_experiment.py

index 0b46b39ff7752db1f627558bbf314f06060a7edd..aa046b91112c40c5e79ab29a4a10366eeddf333c 100644 (file)
@@ -264,12 +264,15 @@ class FPAddSpecialCasesMod:
     def __init__(self, width):
         self.width = width
         self.i = self.ispec()
-        self.out_z = FPNumOut(width, False)
+        self.out_z = self.ospec()
         self.out_do_z = Signal(reset_less=True)
 
     def ispec(self):
         return FPNumBase2Ops(self.width)
 
+    def ospec(self):
+        return FPNumOut(self.width, False)
+
     def setup(self, m, in_a, in_b, out_do_z):
         """ links module to inputs and outputs
         """