add regression test 8, DivPipeCore producing spurious result
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 25 Jul 2020 15:18:16 +0000 (16:18 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 25 Jul 2020 15:18:16 +0000 (16:18 +0100)
src/soc/fu/div/test/test_pipe_caller.py

index 9bb54e2389db5f0bc652844cca8eb28c9f9109ff..919c1859916f01a01b1d4954ba52fd5536ac962e 100644 (file)
@@ -103,6 +103,14 @@ class DivTestCases(unittest.TestCase):
         with Program(lst, bigendian) as prog:
             self.run_test_program(prog, initial_regs)
 
+    def test_8_regression(self):
+        lst = ["divwu. 3, 1, 2"]
+        initial_regs = [0] * 32
+        initial_regs[1] = 18
+        initial_regs[2] = 3
+        with Program(lst, bigendian) as prog:
+            self.run_test_program(prog, initial_regs)
+
     def test_divw_by_zero_1(self):
         lst = ["divw. 3, 1, 2"]
         initial_regs = [0] * 32