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

@@ -220,9 +220,9 @@ class AxiLiteMasterWrite(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:
@@ -437,9 +437,9 @@ class AxiLiteMasterRead(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: