From 93e99d0c34ac907aca63d6602eacbfc045119b7b Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sat, 22 Aug 2020 15:11:25 +0100 Subject: [PATCH] add andc and orc tests, failing because RB needs inversion not RA --- src/soc/fu/logical/test/test_pipe_caller.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/soc/fu/logical/test/test_pipe_caller.py b/src/soc/fu/logical/test/test_pipe_caller.py index 725cf306..9172cb09 100644 --- a/src/soc/fu/logical/test/test_pipe_caller.py +++ b/src/soc/fu/logical/test/test_pipe_caller.py @@ -61,6 +61,16 @@ def set_alu_inputs(alu, dec2, sim): class LogicalTestCase(TestAccumulatorBase): + def case_complement(self): + insns = ["andc", "orc"] + for i in range(40): + choice = random.choice(insns) + lst = [f"{choice} 3, 1, 2"] + initial_regs = [0] * 32 + initial_regs[1] = random.randint(0, (1 << 64)-1) + initial_regs[2] = random.randint(0, (1 << 64)-1) + self.add_case(Program(lst, bigendian), initial_regs) + def case_rand(self): insns = ["and", "or", "xor"] for i in range(40): -- 2.30.2