sort out FPNorm1Single, conform to ispec/ospec API
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Mar 2019 09:59:55 +0000 (09:59 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Mar 2019 09:59:55 +0000 (09:59 +0000)
src/add/nmigen_add_experiment.py

index 6cd891dd1e77b041b1a2d7c4ae366fc23ec21427..f340897fdcd9ed8de6c981db22446c01d942c6ff 100644 (file)
@@ -1174,15 +1174,20 @@ class FPNorm1Single(FPState):
     def __init__(self, width, id_wid, single_cycle=True):
         FPState.__init__(self, "normalise_1")
         self.mod = FPNorm1ModSingle(width)
+        self.o = self.ospec()
         self.out_z = FPNumBase(width, False)
         self.out_roundz = Signal(reset_less=True)
 
+    def ispec(self):
+        return self.mod.ispec()
+
+    def ospec(self):
+        return self.mod.ospec()
+
     def setup(self, m, i):
         """ links module to inputs and outputs
         """
-        self.mod.setup(m, i, self.out_z)
-
-        m.d.sync += self.out_roundz.eq(self.mod.out_of.roundz)
+        self.mod.setup(m, i)
 
     def action(self, m):
         m.next = "round"