From: Luke Kenneth Casson Leighton Date: Fri, 29 Mar 2019 19:37:37 +0000 (+0000) Subject: create e_match temporary X-Git-Tag: ls180-24jan2020~1370 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3ec651100ac1c59a2430970aa387d9bc3e0fe603;p=ieee754fpu.git create e_match temporary --- diff --git a/src/add/fpadd/specialcases.py b/src/add/fpadd/specialcases.py index a7855609..d1c1b1fc 100644 --- a/src/add/fpadd/specialcases.py +++ b/src/add/fpadd/specialcases.py @@ -55,12 +55,15 @@ class FPAddSpecialCasesMod: b1.decode(self.i.b), ] - s_nomatch = Signal() + s_nomatch = Signal(reset_less=True) m.d.comb += s_nomatch.eq(a1.s != b1.s) - m_match = Signal() + m_match = Signal(reset_less=True) m.d.comb += m_match.eq(a1.m == b1.m) + e_match = Signal(reset_less=True) + m.d.comb += m_match.eq(a1.e == b1.e) + # if a is NaN or b is NaN return NaN with m.If(a1.is_nan | b1.is_nan): m.d.comb += self.o.out_do_z.eq(1) @@ -118,7 +121,7 @@ class FPAddSpecialCasesMod: m.d.comb += self.o.z.create(a1.s, a1.e, a1.m[3:-1]) # if a equal to -b return zero (+ve zero) - with m.Elif(s_nomatch & m_match & (a1.e == b1.e)): + with m.Elif(s_nomatch & m_match & e_match): m.d.comb += self.o.out_do_z.eq(1) m.d.comb += self.o.z.zero(0)