From 560cc12be9303341a9e896df774c82622fb275ef Mon Sep 17 00:00:00 2001 From: Cesar Strauss Date: Sat, 13 Jun 2020 20:51:14 -0300 Subject: [PATCH] Wait for all active rel signals to be high, and only then pulse go. It's the best we can do without parallel processes. --- src/soc/experiment/compldst_multi.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/soc/experiment/compldst_multi.py b/src/soc/experiment/compldst_multi.py index 045cc12a..21c3e314 100644 --- a/src/soc/experiment/compldst_multi.py +++ b/src/soc/experiment/compldst_multi.py @@ -534,12 +534,19 @@ def store(dut, src1, src2, src3, imm, imm_ok=True, update=False): yield dut.issue_i.eq(1) yield yield dut.issue_i.eq(0) - yield + if imm_ok: - yield dut.rd.go.eq(0b101) + active_rel = 0b101 else: - yield dut.rd.go.eq(0b111) - yield from wait_for(dut.rd.rel) + active_rel = 0b111 + # wait for all active rel signals to come up + while True: + rel = yield dut.rd.rel + if rel == active_rel: + break + yield + yield dut.rd.go.eq(active_rel) + yield yield dut.rd.go.eq(0) yield from wait_for(dut.adr_rel_o, False, test1st=True) -- 2.30.2