add extra random div unit test cases
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 16 Feb 2019 17:19:28 +0000 (17:19 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 16 Feb 2019 17:19:28 +0000 (17:19 +0000)
src/add/test_div.py

index f0cacd3465ff3fce961f308126cd54d99da6fe0a..cc0b2202475392c9bf8e5ed7c4d0c209d3950ed4 100644 (file)
@@ -51,6 +51,10 @@ def testbench(dut):
     yield from check_case(dut, 0x3F800000, 0x40400000, 0x3EAAAAAB)
     yield from check_case(dut, 0x40400000, 0x41F80000, 0x3DC6318C)
     yield from check_case(dut, 0x41F9EB4D, 0x429A4C70, 0x3ECF52B2)
+    yield from check_case(dut, 0x7F7FFFFE, 0x70033181, 0x4EF9C4C8)
+    yield from check_case(dut, 0x7F7FFFFE, 0x70000001, 0x4EFFFFFC)
+    yield from check_case(dut, 0x7F7FFCFF, 0x70200201, 0x4ECCC7D5)
+    yield from check_case(dut, 0x70200201, 0x7F7FFCFF, 0x302003E2)
 
 if __name__ == '__main__':
     dut = FPDIV(width=32)