From d80f53d8609798696e9cb31e6f4c675ccf63098b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 9 Feb 2020 18:35:35 +0000 Subject: [PATCH] replace ~bool() with all() --- src/ieee754/fcvt/downsize.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ieee754/fcvt/downsize.py b/src/ieee754/fcvt/downsize.py index 0ca47712..cfc8a69e 100644 --- a/src/ieee754/fcvt/downsize.py +++ b/src/ieee754/fcvt/downsize.py @@ -106,10 +106,10 @@ class FPCVTDownConvertMod(PipeModBase): mo = Signal(self.o.z.m_width-1) comb += mo.eq(a1.m[ms:me]) with m.If(self.o.of.roundz): - with m.If(((~mo).bool())): # mantissa-out is all 1s - comb += self.o.z.create(a1.s, a1.e, mo+1) - with m.Else(): + with m.If((mo.all())): # mantissa-out is all 1s comb += self.o.z.create(a1.s, a1.e+1, mo+1) + with m.Else(): + comb += self.o.z.create(a1.s, a1.e, mo+1) with m.Else(): comb += self.o.z.create(a1.s, a1.e, a1.m[-self.o.z.rmw-1:]) -- 2.30.2