From 2227dae093fe5de9ad403729c690c39e44163313 Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Sat, 23 May 2020 19:39:29 -0300 Subject: [PATCH] Allow zero_a to be set when simulating an operation --- src/soc/experiment/compalu_multi.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/soc/experiment/compalu_multi.py b/src/soc/experiment/compalu_multi.py index db8ece43..23652c45 100644 --- a/src/soc/experiment/compalu_multi.py +++ b/src/soc/experiment/compalu_multi.py @@ -336,7 +336,7 @@ class MultiCompUnit(RegSpecALUAPI, Elaboratable): return list(self) -def op_sim(dut, a, b, op, inv_a=0, imm=0, imm_ok=0): +def op_sim(dut, a, b, op, inv_a=0, imm=0, imm_ok=0, zero_a=0): yield dut.issue_i.eq(0) yield yield dut.src_i[0].eq(a) @@ -345,6 +345,7 @@ def op_sim(dut, a, b, op, inv_a=0, imm=0, imm_ok=0): yield dut.oper_i.invert_a.eq(inv_a) yield dut.oper_i.imm_data.imm.eq(imm) yield dut.oper_i.imm_data.imm_ok.eq(imm_ok) + yield dut.oper_i.zero_a.eq(zero_a) yield dut.issue_i.eq(1) yield yield dut.issue_i.eq(0) -- 2.30.2