GitHub repository: https://github.com/daxzio/cocotbext-apb
APB simulation models for cocotb.
Installation from pip (release version, stable):
$ pip install cocotbext-apb
Installation from git (latest development version, potentially unstable):
$ pip install https://github.com/daxzio/cocotbext-apb/archive/main.zip
Installation for active development:
$ git clone https://github.com/daxzio/cocotbext-apb
$ pip install -e cocotbext-apb
See the tests
directory for complete testbenches using these modules.
The APBBus
is used to map to a JTAG interface on the dut
. Class methods from_entity
and from_prefix
are provided to facilitate signal default name matching.
- psel
- pwrite
- paddr
- pwdata
- pready
- prdata
- pstrb
- pprot
- pslverr
The ApbMaster
class implement a APB driver and is capable of generating read and write operations against JTAG devices, either singularly or in a chain.
To use these modules, import the one you need and connect it to the DUT:
from cocotbext.apb import ApbMaster, ApbBus
bus = ApbBus.from_prefix(dut, "s_apb")
apb_driver = ApbMaster(bus, dut.clk)
The first argument to the constructor accepts an ApbBus
object. These objects are containers for the interface signals and include class methods to automate connections.
Once the module is instantiated, read and write operations can be initiated in a couple of different ways.