From 260625df9309f8f35541207cab431dd8dba90c5a Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Sat, 23 May 2020 19:52:08 -0300 Subject: [PATCH] Add a few test cases with zero_a set, in combination with imm_ok --- src/soc/experiment/compalu_multi.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index 23652c45..d2952acc 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -389,6 +389,13 @@ def scoreboard_sim(dut): result = yield from op_sim(dut, 5, 2, InternalOp.OP_ADD, inv_a=1) assert result == 65532 + result = yield from op_sim(dut, 5, 2, InternalOp.OP_ADD, zero_a=1, + imm=8, imm_ok=1) + assert result == 8 + + result = yield from op_sim(dut, 5, 2, InternalOp.OP_ADD, zero_a=1) + assert result == 2 + def test_compunit(): from alu_hier import ALU -- 2.30.2