From: Cole Poirier Date: Thu, 6 Aug 2020 17:28:48 +0000 (-0700) Subject: Update test case_all_rb_close_to_ov X-Git-Tag: semi_working_ecp5~431 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=69f706a1c0c5b39033db8f6640561d40ea750026;p=soc.git Update test case_all_rb_close_to_ov --- 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):