From: Luke Kenneth Casson Leighton Date: Mon, 18 Feb 2019 21:16:08 +0000 (+0000) Subject: use common run_corner_cases function X-Git-Tag: ls180-24jan2020~1883 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c58ae1a0dfee9150ba23d3ff8a997e463cc5eb0;p=ieee754fpu.git use common run_corner_cases function --- diff --git a/src/add/test_div.py b/src/add/test_div.py index 58bc714c..9f70b63d 100644 --- a/src/add/test_div.py +++ b/src/add/test_div.py @@ -11,7 +11,7 @@ from nmigen_div_experiment import FPDIV from unit_test_single import (get_mantissa, get_exponent, get_sign, is_nan, is_inf, is_pos_inf, is_neg_inf, match, get_case, check_case, run_test, - run_edge_cases) + run_edge_cases, run_corner_cases) def testbench(dut): @@ -37,14 +37,7 @@ def testbench(dut): count += len(stimulus_a) print (count, "vectors passed") - #corner cases - from itertools import permutations - stimulus_a = [i[0] for i in permutations([0x80000000, 0x00000000, 0x7f800000, 0xff800000, 0x7fc00000, 0xffc00000], 2)] - stimulus_b = [i[1] for i in permutations([0x80000000, 0x00000000, 0x7f800000, 0xff800000, 0x7fc00000, 0xffc00000], 2)] - yield from run_test(dut, stimulus_a, stimulus_b, truediv) - count += len(stimulus_a) - print (count, "vectors passed") - + yield from run_corner_cases(dut, count, truediv) yield from run_edge_cases(dut, count, truediv)