Update test case_all_rb_close_to_ov
authorCole Poirier <colepoirier@gmail.com>
Thu, 6 Aug 2020 17:28:48 +0000 (10:28 -0700)
committerCole Poirier <colepoirier@gmail.com>
Thu, 6 Aug 2020 17:28:48 +0000 (10:28 -0700)
src/soc/fu/mul/test/test_pipe_caller.py

index f7e3c8681aea849a5ac80b8a7776203b121f8353..7addcaa9cd78fdb0a6da909a7802f6896d61640a 100644 (file)
@@ -271,18 +271,20 @@ class MulTestCase(TestAccumulatorBase):
             0xfffffffd
         ]
 
-        x = 0x7fffffff + random.randint(0, 1)
-        ra = random.randint(0, (1 << 64)-1)
-        rb = x // ra
+        for i in range(40):
+            for instr in instrs:
 
-        for instr in instrs:
-            l = [f"{instr} 3, 1, 2"]
-            initial_regs = [0] * 32
-            initial_regs[1] = ra
-            initial_regs[2] = rb
-            # use "with" so as to close the files used
-            with Program(l, bigendian) as prog:
-                self.add_case(prog, initial_regs)
+                x = 0x7fffffff + random.randint(0, 1)
+                ra = random.randint(0, (1 << 32)-1)
+                rb = x // ra
+
+                l = [f"{instr} 3, 1, 2"]
+                initial_regs = [0] * 32
+                initial_regs[1] = ra
+                initial_regs[2] = rb
+                # use "with" so as to close the files used
+                with Program(l, bigendian) as prog:
+                    self.add_case(prog, initial_regs)
 
     def case_mulli(self):