From: Luke Kenneth Casson Leighton Date: Sun, 9 Feb 2020 18:35:35 +0000 (+0000) Subject: replace ~bool() with all() X-Git-Tag: ls180-24jan2020~214 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d80f53d8609798696e9cb31e6f4c675ccf63098b;p=ieee754fpu.git replace ~bool() with all() --- 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:])