From: Luke Kenneth Casson Leighton Date: Wed, 20 Mar 2019 14:12:31 +0000 (+0000) Subject: add FPNorm1Data class X-Git-Tag: ls180-24jan2020~1599 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1a15958b71dfe2c4113aaa7658da383b8f0a3d3d;p=ieee754fpu.git add FPNorm1Data class --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 9711e13b..b1dfed17 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -992,6 +992,16 @@ class FPNormaliseModSingle: return m +class FPNorm1Data: + + def __init__(self, width): + + self.roundz = Signal(reset_less=True) + self.z = FPNumBase(width, False) + + def eq(self, i): + return [self.z.eq(i.z), self.roundz.eq(i.roundz)] + class FPNorm1ModSingle: @@ -1004,7 +1014,7 @@ class FPNorm1ModSingle: return FPAddStage1Data(self.width) def ospec(self): - return FPAddStage1Data(self.width) + return FPAddStage1Data(self.width) # XXX TODO: FPNorm1Data def setup(self, m, in_z, in_of, out_z): """ links module to inputs and outputs