From 1a15958b71dfe2c4113aaa7658da383b8f0a3d3d Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Wed, 20 Mar 2019 14:12:31 +0000 Subject: [PATCH] add FPNorm1Data class --- src/add/nmigen_add_experiment.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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 -- 2.30.2