Add some wait states in each process
authorCesar Strauss <cestrauss@gmail.com>
Sun, 5 Jul 2020 22:57:14 +0000 (19:57 -0300)
committerCesar Strauss <cestrauss@gmail.com>
Mon, 6 Jul 2020 08:35:40 +0000 (05:35 -0300)
src/soc/experiment/alu_hier.py

index 582020e21302ec9bbb1e078af4c5bf218845e5f8..4afc491ef096bd89b2c8823855e1027b5fbd70bf 100644 (file)
@@ -509,20 +509,31 @@ def test_alu_parallel():
 
     def producer():
         yield from send(5, 3, InternalOp.OP_ADD)
+        yield
+        yield
         yield from send(2, 3, InternalOp.OP_MUL_L64)
         yield from send(5, 3, InternalOp.OP_ADD, inv_a=1)
+        yield
         yield from send(5, 3, InternalOp.OP_NOP)
+        yield
+        yield
         yield from send(13, 2, InternalOp.OP_SHR)
 
     def consumer():
+        yield
         result = yield from receive()
         assert (result == 8)
         result = yield from receive()
         assert (result == 6)
+        yield
+        yield
         result = yield from receive()
         assert (result == 65533)
+        yield
         result = yield from receive()
         assert (result == 2)
+        yield
+        yield
         result = yield from receive()
         assert (result == 3)