From 05778a980c5d0e55cd7c8fc6630b49cafdc91298 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Mon, 8 Jul 2019 12:33:10 +0100 Subject: [PATCH] add fp16 mul (and some regression tests) --- src/ieee754/fpcommon/test/case_gen.py | 4 ++-- src/ieee754/fpmul/test/mul_data16.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 src/ieee754/fpmul/test/mul_data16.py diff --git a/src/ieee754/fpcommon/test/case_gen.py b/src/ieee754/fpcommon/test/case_gen.py index cbccd923..d667f340 100644 --- a/src/ieee754/fpcommon/test/case_gen.py +++ b/src/ieee754/fpcommon/test/case_gen.py @@ -113,13 +113,13 @@ class PipeFPCase: def run_pipe_fp(dut, width, name, mod, fmod, regressions, fpfn, count): pc = PipeFPCase(dut, name, mod, fmod, width, fpfn, count) + pc.run_regressions(regressions) + pc.run_cornercases() pc.run("rand1", get_rand1) pc.run("n127", get_n127) pc.run("noncan", get_nan_noncan) pc.run("nearlyzero", get_nearly_zero) pc.run("nearlyinf", get_nearly_inf) pc.run("corner_rand", get_corner_rand) - pc.run_cornercases() - pc.run_regressions(regressions) pc.run_random() diff --git a/src/ieee754/fpmul/test/mul_data16.py b/src/ieee754/fpmul/test/mul_data16.py new file mode 100644 index 00000000..fb13fbb9 --- /dev/null +++ b/src/ieee754/fpmul/test/mul_data16.py @@ -0,0 +1,5 @@ +def regressions(): + yield 0x0000, 0xfc00 + yield 0xe7bb, 0x81ce + yield 0xe225, 0x8181 + yield 0x0201, 0x4901 -- 2.30.2