add regression test, simulator is wrong
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 13 Jul 2020 12:03:28 +0000 (13:03 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Mon, 13 Jul 2020 12:03:28 +0000 (13:03 +0100)
src/soc/fu/shift_rot/test/test_pipe_caller.py

index 9c5701ee562897779676d1d9e67a72e589c243da..5a56f0176e477c89da7113254f3daac6819a3152 100644 (file)
@@ -141,7 +141,14 @@ class ShiftRotTestCase(FHDLTestCase):
         initial_regs[1] = random.randint(0, (1<<64)-1)
         self.run_tst_program(Program(lst, bigendian), initial_regs)
 
-    def test_extswsli(self):
+    def test_regression_extswsli(self):
+        sh = random.randint(0, 63)
+        lst = [f"extswsli 3, 1, 34"]
+        initial_regs = [0] * 32
+        initial_regs[1] = 0x5678
+        self.run_tst_program(Program(lst, bigendian), initial_regs)
+
+    def tst_extswsli(self):
         for i in range(40):
             sh = random.randint(0, 63)
             lst = [f"extswsli 3, 1, {sh}"]