yield needed for unit tests to work (has to go)
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 11 Jun 2020 10:53:00 +0000 (11:53 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 11 Jun 2020 10:53:00 +0000 (11:53 +0100)
src/soc/fu/compunits/test/test_compunit.py

index a62a469480faa2f09dbab0e87c6db70cbe52ee8e..ee3c6fce44905acb3dc4f1eec641b426c909f2d4 100644 (file)
@@ -199,12 +199,12 @@ class TestRunner(FHDLTestCase):
                     wr_rel_o = yield cu.wr.rel
                     print ("before inputs, rd_rel, wr_rel: ",
                             bin(rd_rel_o), bin(wr_rel_o))
-                    yield
                     assert wr_rel_o == 0, "wr.rel %s must be zero. "\
                                 "previous instr not written all regs\n"\
                                 "respec %s" % \
                                 (bin(wr_rel_o), cu.rwid[1])
                     yield from set_cu_inputs(cu, inp)
+                    yield
                     rd_rel_o = yield cu.rd.rel
                     wr_rel_o = yield cu.wr.rel
                     wrmask = yield cu.wrmask
@@ -219,6 +219,11 @@ class TestRunner(FHDLTestCase):
                     yield Settle()
                     # get all outputs (one by one, just "because")
                     res = yield from get_cu_outputs(cu, code)
+                    wrmask = yield cu.wrmask
+                    rd_rel_o = yield cu.rd.rel
+                    wr_rel_o = yield cu.wr.rel
+                    print ("after got outputs, rd_rel, wr_rel, wrmask: ",
+                            bin(rd_rel_o), bin(wr_rel_o), bin(wrmask))
 
                     # wait for busy to go low
                     while True: