From e82a1942a48def173f8d3e3d4cdf67195482ecef Mon Sep 17 00:00:00 2001 From: Aleksandar Kostovic Date: Sun, 17 Feb 2019 16:36:51 +0100 Subject: [PATCH] Translated more of the special cases to nmigen --- src/add/fmul.py | 7 +++++++ 1 file changed, 7 insertions(+) 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) -- 2.30.2