Registry / testing / cocotbext-axi

cocotbext-axi

JSON →
library0.1.28pypypi✓ verified 85d ago

AXI, AXI lite, and AXI stream modules for cocotb. Current version 0.1.28, requires Python >=3.6. Follows cocotb's release cadence.

pip install cocotbext-axi
INSTALL
IMPORT
SIG · COCOTBEXT-AXI
C
cocotbext-axi
testingpythonv0.1.28
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AxiMaster
from cocotbext.axi import AxiMaster
AxiLiteMaster
from cocotbext.axi import AxiLiteMaster
AxiStreamMaster
from cocotbext.axi import AxiStreamMaster

Basic test using AXI Lite master to write to an address.

import cocotb from cocotb.triggers import ClockCycles from cocotbext.axi import AxiLiteMaster @cocotb.test() async def test_axilite(dut): cocotb.start_soon(Clock(dut.clk, 10, units='ns').start()) axi_master = AxiLiteMaster(dut, "s_axilite", dut.clk) await axi_master.write(0x00, 0xDEADBEEF) await ClockCycles(dut.clk, 10)
Debug
Known issues
breakingMajor version 0.x breaking changes: import path changed from cocotbext-axi to cocotbext.axi after cocotb 1.0.
fix
Use `from cocotbext.axi import ...` instead of `from cocotbext_axi import ...`.
affects: >=0.1.0
gotchaMust call `cocotb.start_soon(Clock(...).start())` before using AXI master, otherwise simulation may hang.
fix
Always start the clock coroutine before creating the master.
affects: all
gotchaAXI master write/read expects data as int; passing strings causes type errors.
fix
Convert data to int: e.g., `0xDEADBEEF`.
affects: all
Errors
Common errors & fixes
AttributeError: module 'cocotbext' has no attribute 'axi'
Cocotb extension package not installed or import path wrong (using old style).
fix
Install cocotbext-axi and use `from cocotbext.axi import ...`
ImportError: cannot import name 'AxiLiteMaster' from 'cocotbext'
Using incorrect import path (e.g., `from cocotbext import AxiLiteMaster`).
fix
Use `from cocotbext.axi import AxiLiteMaster`
TypeError: a bytes-like object is required, not 'int'
Passing integer where bytes expected (e.g., in AXI stream).
fix
Use `bytes(data)` or `data.to_bytes(length, 'big')`.
Upgrade
Version history
0.1.28latest on PyPI · released Mar 12, 2026
Audit
Dependencies
cocotbrequiredRequired; AXI modules depend on cocotb
Agent activity
10 hits · last 30 days
node
8
OpenAI (training)
1
Resources
cocotbext-axi — pip install cocotbext-axi · libregistry