diff --git a/cocotbext/eth/eth_mac.py b/cocotbext/eth/eth_mac.py index dff1f56..d5575bd 100644 --- a/cocotbext/eth/eth_mac.py +++ b/cocotbext/eth/eth_mac.py @@ -262,9 +262,9 @@ class EthMacTx(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) if self._run_ts_cr is None and self.ptp_ts: - self._run_ts_cr = cocotb.fork(self._run_ts()) + self._run_ts_cr = cocotb.start_soon(self._run_ts()) async def _run(self): frame = None @@ -477,7 +477,7 @@ class EthMacRx(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None diff --git a/cocotbext/eth/gmii.py b/cocotbext/eth/gmii.py index 1338d5e..4377edf 100644 --- a/cocotbext/eth/gmii.py +++ b/cocotbext/eth/gmii.py @@ -254,7 +254,7 @@ class GmiiSource(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -424,7 +424,7 @@ class GmiiSink(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -521,12 +521,12 @@ class GmiiPhy: self._clock_cr.kill() if self.speed == 1000e6: - self._clock_cr = cocotb.fork(self._run_clocks(8*1e9/self.speed)) + self._clock_cr = cocotb.start_soon(self._run_clocks(8*1e9/self.speed)) self.tx.mii_mode = False self.rx.mii_mode = False self.tx.clock = self.gtx_clk else: - self._clock_cr = cocotb.fork(self._run_clocks(4*1e9/self.speed)) + self._clock_cr = cocotb.start_soon(self._run_clocks(4*1e9/self.speed)) self.tx.mii_mode = True self.rx.mii_mode = True self.tx.clock = self.tx_clk diff --git a/cocotbext/eth/mii.py b/cocotbext/eth/mii.py index 72e0692..2461b83 100644 --- a/cocotbext/eth/mii.py +++ b/cocotbext/eth/mii.py @@ -155,7 +155,7 @@ class MiiSource(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -315,7 +315,7 @@ class MiiSink(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -406,7 +406,7 @@ class MiiPhy: if self._clock_cr is not None: self._clock_cr.kill() - self._clock_cr = cocotb.fork(self._run_clocks(4*1e9/self.speed)) + self._clock_cr = cocotb.start_soon(self._run_clocks(4*1e9/self.speed)) async def _run_clocks(self, period): half_period = get_sim_steps(period / 2.0, 'ns') diff --git a/cocotbext/eth/ptp.py b/cocotbext/eth/ptp.py index c3ee456..6a86baa 100644 --- a/cocotbext/eth/ptp.py +++ b/cocotbext/eth/ptp.py @@ -205,7 +205,7 @@ class PtpClock(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): clock_edge_event = RisingEdge(self.clock) @@ -290,7 +290,7 @@ class PtpClockSimTime: if self.pps is not None: self.pps.value = 0 - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) def get_ts_96(self): return (self.ts_96_s << 48) | (self.ts_96_ns << 16) | self.ts_96_fns diff --git a/cocotbext/eth/reset.py b/cocotbext/eth/reset.py index dca90aa..dd5f59f 100644 --- a/cocotbext/eth/reset.py +++ b/cocotbext/eth/reset.py @@ -33,7 +33,7 @@ class Reset: self._reset_state = True if reset_signal is not None: - cocotb.fork(self._run_reset(reset_signal, bool(active_level))) + cocotb.start_soon(self._run_reset(reset_signal, bool(active_level))) self._update_reset() diff --git a/cocotbext/eth/rgmii.py b/cocotbext/eth/rgmii.py index 997e95c..98d68aa 100644 --- a/cocotbext/eth/rgmii.py +++ b/cocotbext/eth/rgmii.py @@ -153,7 +153,7 @@ class RgmiiSource(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -333,7 +333,7 @@ class RgmiiSink(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -440,11 +440,11 @@ class RgmiiPhy: self._clock_cr.kill() if self.speed == 1000e6: - self._clock_cr = cocotb.fork(self._run_clock(8*1e9/self.speed)) + self._clock_cr = cocotb.start_soon(self._run_clock(8*1e9/self.speed)) self.tx.mii_mode = False self.rx.mii_mode = False else: - self._clock_cr = cocotb.fork(self._run_clock(4*1e9/self.speed)) + self._clock_cr = cocotb.start_soon(self._run_clock(4*1e9/self.speed)) self.tx.mii_mode = True self.rx.mii_mode = True diff --git a/cocotbext/eth/xgmii.py b/cocotbext/eth/xgmii.py index c8fb120..4056b5b 100644 --- a/cocotbext/eth/xgmii.py +++ b/cocotbext/eth/xgmii.py @@ -263,7 +263,7 @@ class XgmiiSource(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None @@ -452,7 +452,7 @@ class XgmiiSink(Reset): else: self.log.info("Reset de-asserted") if self._run_cr is None: - self._run_cr = cocotb.fork(self._run()) + self._run_cr = cocotb.start_soon(self._run()) async def _run(self): frame = None diff --git a/tests/eth_mac/test_eth_mac.py b/tests/eth_mac/test_eth_mac.py index e9475d8..40fd5be 100644 --- a/tests/eth_mac/test_eth_mac.py +++ b/tests/eth_mac/test_eth_mac.py @@ -45,8 +45,8 @@ class TB: self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.tx_clk, 6.4, units="ns").start()) - cocotb.fork(Clock(dut.rx_clk, 6.4, units="ns").start()) + cocotb.start_soon(Clock(dut.tx_clk, 6.4, units="ns").start()) + cocotb.start_soon(Clock(dut.rx_clk, 6.4, units="ns").start()) self.mac = EthMac( tx_clk=dut.tx_clk, diff --git a/tests/gmii/test_gmii.py b/tests/gmii/test_gmii.py index f7d48ca..219e5a5 100644 --- a/tests/gmii/test_gmii.py +++ b/tests/gmii/test_gmii.py @@ -47,7 +47,7 @@ class TB: self._enable_generator = None self._enable_cr = None - cocotb.fork(Clock(dut.clk, 2, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 2, units="ns").start()) self.source = GmiiSource(dut.gmii_d, dut.gmii_er, dut.gmii_en, dut.clk, dut.rst, dut.gmii_clk_en, dut.gmii_mii_sel) @@ -76,7 +76,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.start_soon(self._run_enable()) def clear_enable_generator(self): self.set_enable_generator(None) diff --git a/tests/gmii_phy/test_gmii_phy.py b/tests/gmii_phy/test_gmii_phy.py index 2bdcf37..04f5ad7 100644 --- a/tests/gmii_phy/test_gmii_phy.py +++ b/tests/gmii_phy/test_gmii_phy.py @@ -44,7 +44,7 @@ class TB: self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.phy_gtx_clk, 8, units="ns").start()) + cocotb.start_soon(Clock(dut.phy_gtx_clk, 8, units="ns").start()) self.gmii_phy = GmiiPhy(dut.phy_txd, dut.phy_tx_er, dut.phy_tx_en, dut.phy_tx_clk, dut.phy_gtx_clk, dut.phy_rxd, dut.phy_rx_er, dut.phy_rx_dv, dut.phy_rx_clk, dut.phy_rst, speed=speed) diff --git a/tests/mii/test_mii.py b/tests/mii/test_mii.py index 73e0cf4..ba177f9 100644 --- a/tests/mii/test_mii.py +++ b/tests/mii/test_mii.py @@ -47,7 +47,7 @@ class TB: self._enable_generator = None self._enable_cr = None - cocotb.fork(Clock(dut.clk, 2, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 2, units="ns").start()) self.source = MiiSource(dut.mii_d, dut.mii_er, dut.mii_en, dut.clk, dut.rst, dut.mii_clk_en) @@ -75,7 +75,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.start_soon(self._run_enable()) def clear_enable_generator(self): self.set_enable_generator(None) diff --git a/tests/ptp_clock/test_ptp_clock.py b/tests/ptp_clock/test_ptp_clock.py index b8e7332..ca468e5 100644 --- a/tests/ptp_clock/test_ptp_clock.py +++ b/tests/ptp_clock/test_ptp_clock.py @@ -43,7 +43,7 @@ class TB: self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 6.4, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 6.4, units="ns").start()) self.ptp_clock = PtpClock( ts_96=dut.ts_96, diff --git a/tests/ptp_clock_sim_time/test_ptp_clock_sim_time.py b/tests/ptp_clock_sim_time/test_ptp_clock_sim_time.py index 02187a0..b07cf54 100644 --- a/tests/ptp_clock_sim_time/test_ptp_clock_sim_time.py +++ b/tests/ptp_clock_sim_time/test_ptp_clock_sim_time.py @@ -43,7 +43,7 @@ class TB: self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 6.4, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 6.4, units="ns").start()) self.ptp_clock = PtpClockSimTime( ts_96=dut.ts_96, diff --git a/tests/rgmii/test_rgmii.py b/tests/rgmii/test_rgmii.py index c4af6e9..1705904 100644 --- a/tests/rgmii/test_rgmii.py +++ b/tests/rgmii/test_rgmii.py @@ -47,7 +47,7 @@ class TB: self._enable_generator = None self._enable_cr = None - cocotb.fork(Clock(dut.clk, 2, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 2, units="ns").start()) self.source = RgmiiSource(dut.rgmii_d, dut.rgmii_ctl, dut.clk, dut.rst, dut.rgmii_clk_en, dut.rgmii_mii_sel) self.sink = RgmiiSink(dut.rgmii_d, dut.rgmii_ctl, dut.clk, dut.rst, dut.rgmii_clk_en, dut.rgmii_mii_sel) @@ -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.start_soon(self._run_enable()) def clear_enable_generator(self): self.set_enable_generator(None) diff --git a/tests/rgmii_phy/test_rgmii_phy.py b/tests/rgmii_phy/test_rgmii_phy.py index a85225d..bc281f7 100644 --- a/tests/rgmii_phy/test_rgmii_phy.py +++ b/tests/rgmii_phy/test_rgmii_phy.py @@ -45,11 +45,11 @@ class TB: self.log.setLevel(logging.DEBUG) if speed == 1000e6: - cocotb.fork(Clock(dut.phy_tx_clk, 8, units="ns").start()) + cocotb.start_soon(Clock(dut.phy_tx_clk, 8, units="ns").start()) elif speed == 100e6: - cocotb.fork(Clock(dut.phy_tx_clk, 40, units="ns").start()) + cocotb.start_soon(Clock(dut.phy_tx_clk, 40, units="ns").start()) elif speed == 10e6: - cocotb.fork(Clock(dut.phy_tx_clk, 400, units="ns").start()) + cocotb.start_soon(Clock(dut.phy_tx_clk, 400, units="ns").start()) self.rgmii_phy = RgmiiPhy(dut.phy_txd, dut.phy_tx_ctl, dut.phy_tx_clk, dut.phy_rxd, dut.phy_rx_ctl, dut.phy_rx_clk, dut.phy_rst, speed=speed) diff --git a/tests/xgmii/test_xgmii.py b/tests/xgmii/test_xgmii.py index 1a3dd30..5cfb625 100644 --- a/tests/xgmii/test_xgmii.py +++ b/tests/xgmii/test_xgmii.py @@ -48,7 +48,7 @@ class TB: self._enable_generator = None self._enable_cr = None - cocotb.fork(Clock(dut.clk, 2, units="ns").start()) + cocotb.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.start_soon(self._run_enable()) def clear_enable_generator(self): self.set_enable_generator(None)