6 Commits

Author SHA1 Message Date
80b4095d73 Change kill to cancel
Some checks failed
build / Build distributions (push) Successful in 7s
build / deploy (push) Has been skipped
build / Build distributions (release) Successful in 7s
build / deploy (release) Successful in 7s
Regression Tests / Python 3.10 (push) Has been cancelled
Regression Tests / Python 3.11 (push) Has been cancelled
Regression Tests / Python 3.12 (push) Has been cancelled
Regression Tests / Python 3.13 (push) Has been cancelled
Regression Tests / Python 3.8 (push) Has been cancelled
Regression Tests / Python 3.9 (push) Has been cancelled
2026-02-08 13:53:59 -08:00
9f8d271384 Fix some cocotb 2.0 warnings
Some checks failed
build / Build distributions (push) Successful in 8s
build / deploy (push) Has been skipped
Regression Tests / Python 3.10 (push) Has been cancelled
Regression Tests / Python 3.11 (push) Has been cancelled
Regression Tests / Python 3.12 (push) Has been cancelled
Regression Tests / Python 3.13 (push) Has been cancelled
Regression Tests / Python 3.8 (push) Has been cancelled
Regression Tests / Python 3.9 (push) Has been cancelled
2026-02-08 13:12:01 -08:00
aa3605a55c Remove extra wait which violated apb spec
Some checks failed
build / Build distributions (push) Successful in 31s
build / deploy (push) Has been skipped
build / Build distributions (release) Successful in 23s
build / deploy (release) Successful in 32s
Regression Tests / Python 3.10 (push) Has been cancelled
Regression Tests / Python 3.11 (push) Has been cancelled
Regression Tests / Python 3.12 (push) Has been cancelled
Regression Tests / Python 3.13 (push) Has been cancelled
Regression Tests / Python 3.8 (push) Has been cancelled
Regression Tests / Python 3.9 (push) Has been cancelled
2026-02-08 00:50:04 -08:00
0496147ddf Add deploy
Some checks failed
build / Build distributions (push) Successful in 38s
build / deploy (push) Has been skipped
build / Build distributions (release) Successful in 30s
build / deploy (release) Successful in 29s
Regression Tests / Python 3.10 (push) Has been cancelled
Regression Tests / Python 3.11 (push) Has been cancelled
Regression Tests / Python 3.12 (push) Has been cancelled
Regression Tests / Python 3.13 (push) Has been cancelled
Regression Tests / Python 3.8 (push) Has been cancelled
Regression Tests / Python 3.9 (push) Has been cancelled
2026-02-08 00:38:42 -08:00
Alex Forencich
3e1e7fc1ec Remove extraneous print
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2025-09-30 11:12:50 -07:00
Alex Forencich
698c29b05f Bump to dev version
Signed-off-by: Alex Forencich <alex@alexforencich.com>
2025-09-07 15:41:39 -07:00
10 changed files with 94 additions and 32 deletions

63
.github/workflows/build.yaml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: build
on:
push:
branches:
- master
- 'dev/**'
pull_request:
branches: [ master ]
release:
types:
- published
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
name: Build distributions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install build
- name: Build sdist
run: python -m build
- uses: actions/upload-artifact@v3
with:
name: dist
path: |
dist/*.tar.gz
dist/*.whl
#-------------------------------------------------------------------------------
deploy:
needs:
- build
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
# Only publish when a Gitea Release is created.
if: gitea.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- run: python3 -m pip install twine --user --break-system-packages
- run: python3 -m pip install -U packaging --user --break-system-packages
- run: TWINE_PASSWORD=${{ secrets.PYPI_PAT }} TWINE_USERNAME=bslathi19 python -m twine upload --repository-url ${{ vars.CI_API_URL }} dist/*

View File

@@ -108,7 +108,7 @@ class ApbPause:
def set_pause_generator(self, generator=None):
if self._pause_cr is not None:
self._pause_cr.kill()
self._pause_cr.cancel()
self._pause_cr = None
self._pause_generator = generator
@@ -146,6 +146,9 @@ class ApbMaster(ApbPause, Region, Reset):
self.command_queue.queue_occupancy_limit = 2
self.current_command = None
self.read_resp = None
self.write_resp = None
self.in_flight_operations = 0
self._idle = Event()
self._idle.set()
@@ -268,7 +271,7 @@ class ApbMaster(ApbPause, Region, Reset):
await self.command_queue.put(ApbWriteCmd(address, data, prot, event))
await event.wait()
return event.data
return self.write_resp
async def _write_wrapper(self, address, data, prot, event):
event.set(await self.write(address, data, prot))
@@ -294,7 +297,7 @@ class ApbMaster(ApbPause, Region, Reset):
await self.command_queue.put(ApbReadCmd(address, length, prot, event))
await event.wait()
return event.data
return self.read_resp
async def _read_wrapper(self, address, length, prot, event):
event.set(await self.read(address, length, prot))
@@ -307,7 +310,7 @@ class ApbMaster(ApbPause, Region, Reset):
self.bus.penable.value = False
if self._run_cr is not None:
self._run_cr.kill()
self._run_cr.cancel()
self._run_cr = None
def flush_cmd(cmd):
@@ -399,8 +402,6 @@ class ApbMaster(ApbPause, Region, Reset):
while self.pause:
await clock_edge_event
await clock_edge_event
if k == 0:
self.bus.paddr.value = cmd.address
else:
@@ -438,14 +439,14 @@ class ApbMaster(ApbPause, Region, Reset):
if pwrite:
self.log.info("Write complete addr: 0x%08x prot: %s resp: %s length: %d",
cmd.address, cmd.prot, resp, length)
write_resp = ApbWriteResp(cmd.address, length, resp)
cmd.event.set(write_resp)
self.write_resp = ApbWriteResp(cmd.address, length, resp)
cmd.event.set()
else:
if self.log.isEnabledFor(logging.INFO):
self.log.info("Read complete addr: 0x%08x prot: %s resp: %s data: %s",
cmd.address, cmd.prot, resp, ' '.join((f'{c:02x}' for c in read_data)))
read_resp = ApbReadResp(cmd.address, bytes(read_data), resp)
cmd.event.set(read_resp)
self.read_resp = ApbReadResp(cmd.address, bytes(read_data), resp)
cmd.event.set()
self.current_write_command = None
@@ -518,7 +519,7 @@ class ApbSlave(ApbPause, Reset):
self.bus.pready.value = False
if self._run_cr is not None:
self._run_cr.kill()
self._run_cr.cancel()
self._run_cr = None
else:
self.log.info("Reset de-asserted")
@@ -580,8 +581,6 @@ class ApbSlave(ApbPause, Reset):
if start_offset is not None and offset != start_offset:
write_ops.append((addr+start_offset, data[start_offset:offset]))
print(write_ops)
# perform writes
try:
for addr, data in write_ops:

View File

@@ -129,7 +129,7 @@ class TagContext:
def _flush(self):
flushed_cmds = []
if self._cr is not None:
self._cr.kill()
self._cr.cancel()
self._cr = None
self._manager._set_idle(self)
if self._current_cmd is not None:
@@ -431,10 +431,10 @@ class AxiMasterWrite(Region, Reset):
if state:
self.log.info("Reset asserted")
if self._process_write_cr is not None:
self._process_write_cr.kill()
self._process_write_cr.cancel()
self._process_write_cr = None
if self._process_write_resp_cr is not None:
self._process_write_resp_cr.kill()
self._process_write_resp_cr.cancel()
self._process_write_resp_cr = None
self.aw_channel.clear()
@@ -842,10 +842,10 @@ class AxiMasterRead(Region, Reset):
if state:
self.log.info("Reset asserted")
if self._process_read_cr is not None:
self._process_read_cr.kill()
self._process_read_cr.cancel()
self._process_read_cr = None
if self._process_read_resp_cr is not None:
self._process_read_resp_cr.kill()
self._process_read_resp_cr.cancel()
self._process_read_resp_cr = None
self.ar_channel.clear()

View File

@@ -99,7 +99,7 @@ class AxiSlaveWrite(Reset):
if state:
self.log.info("Reset asserted")
if self._process_write_cr is not None:
self._process_write_cr.kill()
self._process_write_cr.cancel()
self._process_write_cr = None
self.aw_channel.clear()
@@ -263,7 +263,7 @@ class AxiSlaveRead(Reset):
if state:
self.log.info("Reset asserted")
if self._process_read_cr is not None:
self._process_read_cr.kill()
self._process_read_cr.cancel()
self._process_read_cr = None
self.ar_channel.clear()

View File

@@ -211,10 +211,10 @@ class AxiLiteMasterWrite(Region, Reset):
if state:
self.log.info("Reset asserted")
if self._process_write_cr is not None:
self._process_write_cr.kill()
self._process_write_cr.cancel()
self._process_write_cr = None
if self._process_write_resp_cr is not None:
self._process_write_resp_cr.kill()
self._process_write_resp_cr.cancel()
self._process_write_resp_cr = None
self.aw_channel.clear()
@@ -463,10 +463,10 @@ class AxiLiteMasterRead(Region, Reset):
if state:
self.log.info("Reset asserted")
if self._process_read_cr is not None:
self._process_read_cr.kill()
self._process_read_cr.cancel()
self._process_read_cr = None
if self._process_read_resp_cr is not None:
self._process_read_resp_cr.kill()
self._process_read_resp_cr.cancel()
self._process_read_resp_cr = None
self.ar_channel.clear()

View File

@@ -93,7 +93,7 @@ class AxiLiteSlaveWrite(Reset):
if state:
self.log.info("Reset asserted")
if self._process_write_cr is not None:
self._process_write_cr.kill()
self._process_write_cr.cancel()
self._process_write_cr = None
self.aw_channel.clear()
@@ -212,7 +212,7 @@ class AxiLiteSlaveRead(Reset):
if state:
self.log.info("Reset asserted")
if self._process_read_cr is not None:
self._process_read_cr.kill()
self._process_read_cr.cancel()
self._process_read_cr = None
self.ar_channel.clear()

View File

@@ -369,7 +369,7 @@ class AxiStreamBase(Reset):
if state:
self.log.info("Reset asserted")
if self._run_cr is not None:
self._run_cr.kill()
self._run_cr.cancel()
self._run_cr = None
self.active = False
@@ -408,7 +408,7 @@ class AxiStreamPause:
def set_pause_generator(self, generator=None):
if self._pause_cr is not None:
self._pause_cr.kill()
self._pause_cr.cancel()
self._pause_cr = None
self._pause_generator = generator

View File

@@ -56,7 +56,7 @@ class Reset:
async def _run_reset(self, reset_signal, active_level):
while True:
await Edge(reset_signal)
await reset_signal.value_change
try:
level = bool(int(reset_signal.value))
except ValueError:

View File

@@ -153,7 +153,7 @@ class StreamBase(Reset):
if state:
self.log.info("Reset asserted")
if self._run_cr is not None:
self._run_cr.kill()
self._run_cr.cancel()
self._run_cr = None
self.active = False
@@ -192,7 +192,7 @@ class StreamPause:
def set_pause_generator(self, generator=None):
if self._pause_cr is not None:
self._pause_cr.kill()
self._pause_cr.cancel()
self._pause_cr = None
self._pause_generator = generator

View File

@@ -1 +1 @@
__version__ = "0.1.26"
__version__ = "0.1.30"