From c77114f8aad085a1b704e5bb830affa02f6dd7d8 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 28 Jul 2019 17:48:57 +0100 Subject: [PATCH] add NaN FP2int overflow --- src/ieee754/fcvt/pipeline.py | 5 ++++- src/ieee754/fcvt/test/test_fcvt_f2int_pipe.py | 5 ++++- src/ieee754/fpcommon/test/fpmux.py | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ieee754/fcvt/pipeline.py b/src/ieee754/fcvt/pipeline.py index f4c70d78..5a9eeddc 100644 --- a/src/ieee754/fcvt/pipeline.py +++ b/src/ieee754/fcvt/pipeline.py @@ -104,7 +104,10 @@ class FPCVTFloatToIntMod(Elaboratable): m.d.comb += signed.eq(self.i.ctx.op[0]) # special cases - with m.If(a1.exp_n127): + with m.If(a1.is_nan): + m.d.comb += self.o.z.eq((1<