From: Luke Kenneth Casson Leighton Date: Sat, 22 Aug 2020 14:11:25 +0000 (+0100) Subject: add andc and orc tests, failing because RB needs inversion not RA X-Git-Tag: semi_working_ecp5~272^2~28 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=93e99d0c34ac907aca63d6602eacbfc045119b7b;p=soc.git add andc and orc tests, failing because RB needs inversion not RA --- 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):