From d4a692ce3c03f415d625ad9ffc05218db442e9b6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 19 Feb 2019 07:41:35 +0000 Subject: [PATCH] remove hard-coded width --- src/add/nmigen_add_experiment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.30.2