From 69f706a1c0c5b39033db8f6640561d40ea750026 Mon Sep 17 00:00:00 2001 From: Cole Poirier Date: Thu, 6 Aug 2020 10:28:48 -0700 Subject: [PATCH] Update test case_all_rb_close_to_ov --- src/soc/fu/mul/test/test_pipe_caller.py | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/soc/fu/mul/test/test_pipe_caller.py b/src/soc/fu/mul/test/test_pipe_caller.py index f7e3c868..7addcaa9 100644 --- a/src/soc/fu/mul/test/test_pipe_caller.py +++ b/src/soc/fu/mul/test/test_pipe_caller.py @@ -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): -- 2.30.2