Use start_soon instead of fork

This commit is contained in:
Alex Forencich
2021-12-08 21:38:12 -08:00
parent 2b0b12c68d
commit 3f7193b77c
7 changed files with 18 additions and 18 deletions

View File

@@ -124,7 +124,7 @@ class TagContext:
def _start(self):
if self._cr is None:
self._cr = cocotb.fork(self._process_queue())
self._cr = cocotb.start_soon(self._process_queue())
def _flush(self):
flushed_cmds = []
@@ -392,9 +392,9 @@ class AxiMasterWrite(Region, Reset):
else:
self.log.info("Reset de-asserted")
if self._process_write_cr is None:
self._process_write_cr = cocotb.fork(self._process_write())
self._process_write_cr = cocotb.start_soon(self._process_write())
if self._process_write_resp_cr is None:
self._process_write_resp_cr = cocotb.fork(self._process_write_resp())
self._process_write_resp_cr = cocotb.start_soon(self._process_write_resp())
async def _process_write(self):
while True:
@@ -737,9 +737,9 @@ class AxiMasterRead(Region, Reset):
else:
self.log.info("Reset de-asserted")
if self._process_read_cr is None:
self._process_read_cr = cocotb.fork(self._process_read())
self._process_read_cr = cocotb.start_soon(self._process_read())
if self._process_read_resp_cr is None:
self._process_read_resp_cr = cocotb.fork(self._process_read_resp())
self._process_read_resp_cr = cocotb.start_soon(self._process_read_resp())
async def _process_read(self):
while True: