Make test for bpermd exercise the module a bit more
authorMichael Nolan <mtnolan2640@gmail.com>
Wed, 20 May 2020 19:47:08 +0000 (15:47 -0400)
committerMichael Nolan <mtnolan2640@gmail.com>
Wed, 20 May 2020 19:47:08 +0000 (15:47 -0400)
src/soc/fu/logical/test/test_pipe_caller.py

index b3b46408fdbcc9da9bd8159d8d4cc931bb1ddd69..4a2c09f094a4dd6f49ff613837755c9a0799a262 100644 (file)
@@ -174,10 +174,11 @@ class LogicalTestCase(FHDLTestCase):
 
     def test_bpermd(self):
         lst = ["bpermd 3, 1, 2"]
-        initial_regs = [0] * 32
-        initial_regs[1] = 0xdeadbeefcafec0de
-        initial_regs[2] = 0xd0adb0000afec1de
-        self.run_tst_program(Program(lst), initial_regs)
+        for i in range(20):
+            initial_regs = [0] * 32
+            initial_regs[1] = 1<<random.randint(0,63)
+            initial_regs[2] = 0xdeadbeefcafec0de
+            self.run_tst_program(Program(lst), initial_regs)
 
     def test_ilang(self):
         rec = CompALUOpSubset()