From: Luke Kenneth Casson Leighton Date: Mon, 18 Feb 2019 12:08:55 +0000 (+0000) Subject: test case fail, 2 numbers exceeded -INF but +ve INF was returned X-Git-Tag: ls180-24jan2020~1911 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e41ed2689503aece121121c78171f696294bdd37;p=ieee754fpu.git test case fail, 2 numbers exceeded -INF but +ve INF was returned --- diff --git a/src/add/fpbase.py b/src/add/fpbase.py index e18df3a5..2d2fc29d 100644 --- a/src/add/fpbase.py +++ b/src/add/fpbase.py @@ -319,7 +319,7 @@ class FPBase: m.next = next_state # if overflow occurs, return inf with m.If(z.is_overflowed()): - m.d.sync += z.inf(0) + m.d.sync += z.inf(z.s) with m.Else(): m.d.sync += z.create(z.s, z.e, z.m) diff --git a/src/add/test_add.py b/src/add/test_add.py index 9a8ebe97..8e568526 100644 --- a/src/add/test_add.py +++ b/src/add/test_add.py @@ -120,6 +120,7 @@ def run_test(dut, stimulus_a, stimulus_b): sys.exit(0) def testbench(dut): + yield from check_case(dut, 0xfe34f995, 0xff5d59ad, 0xff800000) yield from check_case(dut, 0x82471f51, 0x243985f, 0x801c3790) yield from check_case(dut, 0, 0, 0) yield from check_case(dut, 0x40000000, 0xc0000000, 0x00000000)