extra check on rd.req in test_alu_compunit
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 28 May 2020 12:26:21 +0000 (13:26 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 28 May 2020 20:29:05 +0000 (21:29 +0100)
src/soc/fu/compunits/test/test_alu_compunit.py

index 3b2dc1ec6de689b315efb3b8b3597616f5eef8b3..1be45181c9ee0ef25d55750cfc5a14fb8b2e6582 100644 (file)
@@ -19,12 +19,18 @@ def set_cu_input(cu, idx, data):
     yield cu.src_i[idx].eq(data)
     while True:
         rd_rel_o = yield cu.rd.rel[idx]
-        print ("rd_rel %d wait" % idx, rd_rel_o)
+        print ("rd_rel %d wait HI" % idx, rd_rel_o)
         if rd_rel_o:
             break
         yield
     yield cu.rd.go[idx].eq(1)
-    yield
+    while True:
+        yield
+        rd_rel_o = yield cu.rd.rel[idx]
+        if rd_rel_o:
+            break
+        print ("rd_rel %d wait HI" % idx, rd_rel_o)
+        yield
     yield cu.rd.go[idx].eq(0)