From: Luke Kenneth Casson Leighton Date: Sat, 6 Jun 2020 18:11:54 +0000 (+0100) Subject: wait a little for wr.rel to activate if wrmask is active X-Git-Tag: div_pipeline~525 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=147922a1c102af8d08dc2e5fe2f118b859df663a;p=soc.git wait a little for wr.rel to activate if wrmask is active --- diff --git a/src/soc/fu/compunits/test/test_compunit.py b/src/soc/fu/compunits/test/test_compunit.py index d35ad27d..b32f43da 100644 --- a/src/soc/fu/compunits/test/test_compunit.py +++ b/src/soc/fu/compunits/test/test_compunit.py @@ -74,6 +74,16 @@ def set_operand(cu, dec2, sim): def get_cu_outputs(cu, code): res = {} + wrmask = yield cu.wrmask + print ("get_cu_outputs", cu.n_dst, wrmask) + if not wrmask: # no point waiting (however really should doublecheck wr.rel) + return {} + # wait for at least one result + while True: + wr_rel_o = yield cu.wr.rel + if wr_rel_o: + break + yield for i in range(cu.n_dst): wr_rel_o = yield cu.wr.rel[i] if wr_rel_o: