add FPPackData class, includes mid to be passed through
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 21 Mar 2019 07:02:10 +0000 (07:02 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 21 Mar 2019 07:02:10 +0000 (07:02 +0000)
src/add/nmigen_add_experiment.py

index bb854ae36d23f2b4be7f975143efaf01f76fdfcc..0fa7fae5a31820d332af26ed6f1850a5678a9402 100644 (file)
@@ -1417,6 +1417,15 @@ class FPPackMod:
         return m
 
 
+class FPPackData:
+    def __init__(self, width, id_wid):
+        self.z = FPNumOut(width, False)
+        self.mid = Signal(id_wid, reset_less=True)
+
+    def eq(self, i):
+        return [self.z.eq(i.z), self.mid.eq(i.mid)]
+
+
 class FPPack(FPState, FPID):
 
     def __init__(self, width, id_wid):