From 4df34f134453d84c909b5d75eb52bc27c6964f9f Mon Sep 17 00:00:00 2001 From: Alex Forencich Date: Fri, 10 Dec 2021 18:16:38 -0800 Subject: [PATCH] Use start_soon instead of fork --- tb/axis_adapter/test_axis_adapter.py | 2 +- tb/axis_arb_mux/test_axis_arb_mux.py | 2 +- tb/axis_async_fifo/test_axis_async_fifo.py | 4 ++-- tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py | 4 ++-- tb/axis_broadcast/test_axis_broadcast.py | 2 +- tb/axis_cobs_decode/test_axis_cobs_decode.py | 2 +- tb/axis_cobs_encode/test_axis_cobs_encode.py | 2 +- tb/axis_demux/test_axis_demux.py | 2 +- tb/axis_fifo/test_axis_fifo.py | 2 +- tb/axis_fifo_adapter/test_axis_fifo_adapter.py | 2 +- tb/axis_frame_length_adjust/test_axis_frame_length_adjust.py | 2 +- .../test_axis_frame_length_adjust_fifo.py | 2 +- tb/axis_mux/test_axis_mux.py | 2 +- tb/axis_pipeline_fifo/test_axis_pipeline_fifo.py | 2 +- tb/axis_pipeline_register/test_axis_pipeline_register.py | 2 +- tb/axis_ram_switch/test_axis_ram_switch.py | 2 +- tb/axis_rate_limit/test_axis_rate_limit.py | 2 +- tb/axis_register/test_axis_register.py | 2 +- tb/axis_srl_fifo/test_axis_srl_fifo.py | 2 +- tb/axis_srl_register/test_axis_srl_register.py | 2 +- tb/axis_switch/test_axis_switch.py | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tb/axis_adapter/test_axis_adapter.py b/tb/axis_adapter/test_axis_adapter.py index 486ac879c..addc72745 100644 --- a/tb/axis_adapter/test_axis_adapter.py +++ b/tb/axis_adapter/test_axis_adapter.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_arb_mux/test_axis_arb_mux.py b/tb/axis_arb_mux/test_axis_arb_mux.py index dfe264b94..ec23a41c7 100644 --- a/tb/axis_arb_mux/test_axis_arb_mux.py +++ b/tb/axis_arb_mux/test_axis_arb_mux.py @@ -49,7 +49,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = [AxiStreamSource(AxiStreamBus.from_prefix(dut, f"s{k:02d}_axis"), dut.clk, dut.rst) for k in range(ports)] self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_async_fifo/test_axis_async_fifo.py b/tb/axis_async_fifo/test_axis_async_fifo.py index e064f98b4..223a7e36c 100644 --- a/tb/axis_async_fifo/test_axis_async_fifo.py +++ b/tb/axis_async_fifo/test_axis_async_fifo.py @@ -49,8 +49,8 @@ class TB(object): s_clk = int(os.getenv("S_CLK", "10")) m_clk = int(os.getenv("M_CLK", "11")) - cocotb.fork(Clock(dut.s_clk, s_clk, units="ns").start()) - cocotb.fork(Clock(dut.m_clk, m_clk, units="ns").start()) + cocotb.start_soon(Clock(dut.s_clk, s_clk, units="ns").start()) + cocotb.start_soon(Clock(dut.m_clk, m_clk, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.s_clk, dut.s_rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.m_clk, dut.m_rst) diff --git a/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py b/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py index e97504f99..6ff2ac88d 100644 --- a/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py +++ b/tb/axis_async_fifo_adapter/test_axis_async_fifo_adapter.py @@ -46,8 +46,8 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.s_clk, 10, units="ns").start()) - cocotb.fork(Clock(dut.m_clk, 11, units="ns").start()) + cocotb.start_soon(Clock(dut.s_clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.m_clk, 11, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.s_clk, dut.s_rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.m_clk, dut.m_rst) diff --git a/tb/axis_broadcast/test_axis_broadcast.py b/tb/axis_broadcast/test_axis_broadcast.py index 7099e51fd..8bc7ac9a9 100644 --- a/tb/axis_broadcast/test_axis_broadcast.py +++ b/tb/axis_broadcast/test_axis_broadcast.py @@ -48,7 +48,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = [AxiStreamSink(AxiStreamBus.from_prefix(dut, f"m{k:02d}_axis"), dut.clk, dut.rst) for k in range(ports)] diff --git a/tb/axis_cobs_decode/test_axis_cobs_decode.py b/tb/axis_cobs_decode/test_axis_cobs_decode.py index 54fe33ef1..cd8aead03 100644 --- a/tb/axis_cobs_decode/test_axis_cobs_decode.py +++ b/tb/axis_cobs_decode/test_axis_cobs_decode.py @@ -112,7 +112,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_cobs_encode/test_axis_cobs_encode.py b/tb/axis_cobs_encode/test_axis_cobs_encode.py index ad9a7b6ab..8bc01dfc5 100644 --- a/tb/axis_cobs_encode/test_axis_cobs_encode.py +++ b/tb/axis_cobs_encode/test_axis_cobs_encode.py @@ -113,7 +113,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_demux/test_axis_demux.py b/tb/axis_demux/test_axis_demux.py index 355eac808..832b02118 100644 --- a/tb/axis_demux/test_axis_demux.py +++ b/tb/axis_demux/test_axis_demux.py @@ -48,7 +48,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = [AxiStreamSink(AxiStreamBus.from_prefix(dut, f"m{k:02d}_axis"), dut.clk, dut.rst) for k in range(ports)] diff --git a/tb/axis_fifo/test_axis_fifo.py b/tb/axis_fifo/test_axis_fifo.py index d4bcf3ee4..61b5351de 100644 --- a/tb/axis_fifo/test_axis_fifo.py +++ b/tb/axis_fifo/test_axis_fifo.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_fifo_adapter/test_axis_fifo_adapter.py b/tb/axis_fifo_adapter/test_axis_fifo_adapter.py index e5575b44e..6ff21ca98 100644 --- a/tb/axis_fifo_adapter/test_axis_fifo_adapter.py +++ b/tb/axis_fifo_adapter/test_axis_fifo_adapter.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_frame_length_adjust/test_axis_frame_length_adjust.py b/tb/axis_frame_length_adjust/test_axis_frame_length_adjust.py index 43d7d2f59..5817f5c0d 100644 --- a/tb/axis_frame_length_adjust/test_axis_frame_length_adjust.py +++ b/tb/axis_frame_length_adjust/test_axis_frame_length_adjust.py @@ -51,7 +51,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_frame_length_adjust_fifo/test_axis_frame_length_adjust_fifo.py b/tb/axis_frame_length_adjust_fifo/test_axis_frame_length_adjust_fifo.py index 5bc902db7..b3403cd00 100644 --- a/tb/axis_frame_length_adjust_fifo/test_axis_frame_length_adjust_fifo.py +++ b/tb/axis_frame_length_adjust_fifo/test_axis_frame_length_adjust_fifo.py @@ -51,7 +51,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_mux/test_axis_mux.py b/tb/axis_mux/test_axis_mux.py index 1f04e10b4..217b03ce6 100644 --- a/tb/axis_mux/test_axis_mux.py +++ b/tb/axis_mux/test_axis_mux.py @@ -48,7 +48,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = [AxiStreamSource(AxiStreamBus.from_prefix(dut, f"s{k:02d}_axis"), dut.clk, dut.rst) for k in range(ports)] self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_pipeline_fifo/test_axis_pipeline_fifo.py b/tb/axis_pipeline_fifo/test_axis_pipeline_fifo.py index 4ed2fb885..830b03376 100644 --- a/tb/axis_pipeline_fifo/test_axis_pipeline_fifo.py +++ b/tb/axis_pipeline_fifo/test_axis_pipeline_fifo.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_pipeline_register/test_axis_pipeline_register.py b/tb/axis_pipeline_register/test_axis_pipeline_register.py index cbb3c01ab..a971e8e19 100644 --- a/tb/axis_pipeline_register/test_axis_pipeline_register.py +++ b/tb/axis_pipeline_register/test_axis_pipeline_register.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_ram_switch/test_axis_ram_switch.py b/tb/axis_ram_switch/test_axis_ram_switch.py index e0071deb9..422fcd843 100644 --- a/tb/axis_ram_switch/test_axis_ram_switch.py +++ b/tb/axis_ram_switch/test_axis_ram_switch.py @@ -50,7 +50,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = [AxiStreamSource(AxiStreamBus.from_prefix(dut, f"s{k:02d}_axis"), dut.clk, dut.rst) for k in range(s_count)] self.sink = [AxiStreamSink(AxiStreamBus.from_prefix(dut, f"m{k:02d}_axis"), dut.clk, dut.rst) for k in range(m_count)] diff --git a/tb/axis_rate_limit/test_axis_rate_limit.py b/tb/axis_rate_limit/test_axis_rate_limit.py index 00dd0a3c7..170419df2 100644 --- a/tb/axis_rate_limit/test_axis_rate_limit.py +++ b/tb/axis_rate_limit/test_axis_rate_limit.py @@ -45,7 +45,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_register/test_axis_register.py b/tb/axis_register/test_axis_register.py index 87a5e0234..bd9e3e794 100644 --- a/tb/axis_register/test_axis_register.py +++ b/tb/axis_register/test_axis_register.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_srl_fifo/test_axis_srl_fifo.py b/tb/axis_srl_fifo/test_axis_srl_fifo.py index 634ad73bf..e18fd8a88 100644 --- a/tb/axis_srl_fifo/test_axis_srl_fifo.py +++ b/tb/axis_srl_fifo/test_axis_srl_fifo.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_srl_register/test_axis_srl_register.py b/tb/axis_srl_register/test_axis_srl_register.py index d9128c8df..4dd1c0c37 100644 --- a/tb/axis_srl_register/test_axis_srl_register.py +++ b/tb/axis_srl_register/test_axis_srl_register.py @@ -46,7 +46,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = AxiStreamSource(AxiStreamBus.from_prefix(dut, "s_axis"), dut.clk, dut.rst) self.sink = AxiStreamSink(AxiStreamBus.from_prefix(dut, "m_axis"), dut.clk, dut.rst) diff --git a/tb/axis_switch/test_axis_switch.py b/tb/axis_switch/test_axis_switch.py index 6bc84d1a7..9e250e333 100644 --- a/tb/axis_switch/test_axis_switch.py +++ b/tb/axis_switch/test_axis_switch.py @@ -50,7 +50,7 @@ class TB(object): self.log = logging.getLogger("cocotb.tb") self.log.setLevel(logging.DEBUG) - cocotb.fork(Clock(dut.clk, 10, units="ns").start()) + cocotb.start_soon(Clock(dut.clk, 10, units="ns").start()) self.source = [AxiStreamSource(AxiStreamBus.from_prefix(dut, f"s{k:02d}_axis"), dut.clk, dut.rst) for k in range(s_count)] self.sink = [AxiStreamSink(AxiStreamBus.from_prefix(dut, f"m{k:02d}_axis"), dut.clk, dut.rst) for k in range(m_count)]