From: Luke Kenneth Casson Leighton Date: Tue, 19 Feb 2019 07:41:35 +0000 (+0000) Subject: remove hard-coded width X-Git-Tag: ls180-24jan2020~1872 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4a692ce3c03f415d625ad9ffc05218db442e9b6;p=ieee754fpu.git remove hard-coded width --- diff --git a/src/add/nmigen_add_experiment.py b/src/add/nmigen_add_experiment.py index 38cd8d78..26c779ff 100644 --- a/src/add/nmigen_add_experiment.py +++ b/src/add/nmigen_add_experiment.py @@ -29,7 +29,7 @@ class FPADD(FPBase): b = FPNum(self.width) z = FPNum(self.width, False) - w = {32: 28, 64:57}[self.width] + w = z.m_width + 4 tot = Signal(w) # sticky/round/guard, {mantissa} result, 1 overflow of = Overflow()