From: Luke Kenneth Casson Leighton Date: Thu, 21 Mar 2019 07:02:10 +0000 (+0000) Subject: add FPPackData class, includes mid to be passed through X-Git-Tag: ls180-24jan2020~1588 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7a5e225265d8fde80f150fe5ce1ce82b6af7efe3;p=ieee754fpu.git add FPPackData class, includes mid to be passed through --- 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):