create ospec for FPADDBase
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 21 Mar 2019 18:21:44 +0000 (18:21 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 21 Mar 2019 18:21:44 +0000 (18:21 +0000)
src/add/nmigen_add_experiment.py

index 3e148fe45cd8b25c6af9fc605eb800230ce6fa19..8f5ce0407302355ba1df76336c6a1a9bd4afa79a 100644 (file)
@@ -1567,13 +1567,16 @@ class FPADDBaseMod(FPID):
 
         self.in_t = Trigger()
         self.i = self.ispec()
-        self.out_z = FPOp(width)
+        self.out_z = self.ospec()
 
         self.states = []
 
     def ispec(self):
         return FPADDBaseData(self.width, self.id_wid)
 
+    def ospec(self):
+        return FPOp(self.width)
+
     def add_state(self, state):
         self.states.append(state)
         return state
@@ -1694,6 +1697,9 @@ class FPADDBase(FPState, FPID):
     def ispec(self):
         return self.mod.ispec()
 
+    def ospec(self):
+        return self.mod.ospec()
+
     def setup(self, m, i, add_stb, in_mid, out_z, out_mid):
         self.out_z = out_z
         self.out_mid = out_mid