From d144527855a050642dcf0644822bf6ec52382893 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 22 Jul 2019 09:50:09 +0100 Subject: [PATCH] fix div specialcases --- src/ieee754/fpdiv/specialcases.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ieee754/fpdiv/specialcases.py b/src/ieee754/fpdiv/specialcases.py index 4a73e435..5bbe5c40 100644 --- a/src/ieee754/fpdiv/specialcases.py +++ b/src/ieee754/fpdiv/specialcases.py @@ -66,12 +66,12 @@ class FPDIVSpecialCasesMod(Elaboratable): # if a is NaN or b is NaN return NaN with m.If(abnan): m.d.comb += self.o.out_do_z.eq(1) - m.d.comb += self.o.z.nan(1) + m.d.comb += self.o.z.nan(0) # if a is inf and b is Inf return NaN - with m.Elif(abnan): + with m.Elif(abinf): m.d.comb += self.o.out_do_z.eq(1) - m.d.comb += self.o.z.nan(1) + m.d.comb += self.o.z.nan(0) # if a is inf return inf with m.Elif(a1.is_inf): @@ -89,7 +89,7 @@ class FPDIVSpecialCasesMod(Elaboratable): m.d.comb += self.o.z.zero(sabx) # b is zero return NaN with m.If(b1.is_zero): - m.d.comb += self.o.z.nan(1) + m.d.comb += self.o.z.nan(0) # if b is zero return Inf with m.Elif(b1.is_zero): -- 2.30.2