From 7a5e225265d8fde80f150fe5ce1ce82b6af7efe3 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 21 Mar 2019 07:02:10 +0000 Subject: [PATCH] add FPPackData class, includes mid to be passed through --- src/add/nmigen_add_experiment.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index bb854ae3..0fa7fae5 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -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): -- 2.30.2