Use start_soon instead of fork

This commit is contained in:
Alex Forencich
2021-03-21 12:22:51 -07:00
parent 2b030f120d
commit 78bc288812
11 changed files with 24 additions and 24 deletions

View File

@@ -48,7 +48,7 @@ class TB:
self._enable_generator = None
self._enable_cr = None
cocotb.fork(Clock(dut.clk, 2, units="ns").start())
cocotb.scheduler.start_soon(Clock(dut.clk, 2, units="ns").start())
self.source = XgmiiSource(dut.xgmii_d, dut.xgmii_c, dut.clk, dut.rst, dut.xgmii_clk_en)
self.sink = XgmiiSink(dut.xgmii_d, dut.xgmii_c, dut.clk, dut.rst, dut.xgmii_clk_en)
@@ -74,7 +74,7 @@ class TB:
self._enable_generator = generator
if self._enable_generator is not None:
self._enable_cr = cocotb.fork(self._run_enable())
self._enable_cr = cocotb.scheduler.start_soon(self._run_enable())
def clear_enable_generator(self):
self.set_enable_generator(None)