Consistently use await/async in quickstart
@@ -94,15 +94,15 @@ following:
from cocotb.triggers import Timer
@cocotb.test()
- def my_first_test(dut):
+ async def my_first_test(dut):
"""Try accessing the design."""
dut._log.info("Running test!")
for cycle in range(10):
dut.clk = 0
- yield Timer(1, units='ns')
+ await Timer(1, units='ns')
dut.clk = 1
- yield Timer(1, units='ns')
+ await Timer(1, units='ns')
dut._log.info("Running test!")
This will drive a square wave clock onto the ``clk`` port of the toplevel.
