From: Aleksandar Kostovic Date: Sun, 17 Feb 2019 15:36:51 +0000 (+0100) Subject: Translated more of the special cases to nmigen X-Git-Tag: ls180-24jan2020~1921 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e82a1942a48def173f8d3e3d4cdf67195482ecef;p=ieee754fpu.git Translated more of the special cases to nmigen --- diff --git a/src/add/fmul.py b/src/add/fmul.py index 3ad6ac4e..ba24e078 100644 --- a/src/add/fmul.py +++ b/src/add/fmul.py @@ -76,6 +76,13 @@ class FPMUL(FPBase): with m.Elif(b.is_inf()): m.next += "put_z" m.d.sync += z.inf(0) + #if a is zero return NaN + with m.If(a.is_zero()): + m.next += "put_z" + m.d.sync += z.nan(1) + with m.Elif(a.is_zero()): + m.next += "put_z" + m.d.sync += z.zero(0)