Add section about queues to refcard
@@ -28,7 +28,7 @@ Reference Card
| Assign metavalue | ``dut.mysignal <= BinaryValue("X")`` |
+------------------------+-----------------------------------------------------------------+
| Read | | ``val = dut.mysignal.value`` |
-| | | (``mysig = dut.mysignal`` *creates an alias/reference)* |
+| | | (``mysig = dut.mysignal`` *creates an alias/reference*) |
+------------------------+-----------------------------------------------------------------+
| Bit slice | | ``mybit = dut.myarray[0].value`` |
| | | ``mybits = dut.mysignal.value[0]`` |
@@ -62,6 +62,21 @@ Reference Card
+------------------------+-----------------------------------------------------------------+
| |
+------------------------+-----------------------------------------------------------------+
+| Queue write | | ``await cocotb.queue.Queue.put(item)`` |
+| | | ``cocotb.queue.Queue.put_nowait(item)`` |
++------------------------+-----------------------------------------------------------------+
+| Queue read | | ``item = await cocotb.queue.Queue.get()`` |
+| | | ``item = cocotb.queue.Queue.get_nowait()`` |
++------------------------+-----------------------------------------------------------------+
+| Queue attributes | | ``queue.maxsize`` (``None`` *== unlimited*) |
+| | | ``queue.qsize()`` |
+| | | ``queue.empty()`` |
+| | | ``queue.full()`` |
++------------------------+-----------------------------------------------------------------+
+| Specialized queues | ``.PriorityQueue``, ``.LifoQueue`` |
++------------------------+-----------------------------------------------------------------+
+| |
++------------------------+-----------------------------------------------------------------+
| Set up event | ``e = cocotb.triggers.Event()`` |
+------------------------+-----------------------------------------------------------------+
| Wake up waiters | ``e.set()`` |
