projects
/
ieee754fpu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
be982b6
)
replace ~bool() with all()
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 9 Feb 2020 18:35:35 +0000
(18:35 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Sun, 9 Feb 2020 18:35:35 +0000
(18:35 +0000)
src/ieee754/fcvt/downsize.py
patch
|
blob
|
history
diff --git
a/src/ieee754/fcvt/downsize.py
b/src/ieee754/fcvt/downsize.py
index 0ca477128aff70aca81d26696fb29ff63be9867d..cfc8a69e03c3fb9828aa2f5a200eeb028dc3a299 100644
(file)
--- 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:])