AVL-APB - Apheleia Verification Library AMBA APB Verification Component
AVL-APB has been developed by experienced, industry professional verification engineers to provide a simple,
extensible verification component for the AMBA APB Bus
developed in Python and the AVL library.
AVL is built on the CocoTB framework, but aims to combine the best elements of
UVM in a more engineer friendly and efficient way.
CocoTB 2.0
AVL-APB now supports CocoTB2.0 https://docs.cocotb.org/en/development/upgrade-2.0.html. This was introduced in v0.2.0.
All older versions support v1.9.1 and will fail if run with CocoTB 2.0.
To upgrade follow the instructions given on the link above.
Protocol Features
| Version | Signal Name | Description | Driven By |
|---|---|---|---|
| APB2 | PCLK | APB clock signal; all APB transfers are synchronized to this clock. | Requester |
| APB2 | PRESETn | Asynchronous active-low reset for the APB interface. | Requester |
| APB2 | PADDR | Address bus; specifies the register address for the transfer. | Requester |
| APB2 | PSELx | Slave select; one per slave. High when the slave is selected. | Requester |
| APB2 | PENABLE | Indicates the second and subsequent cycles of an APB transfer. | Requester |
| APB2 | PWRITE | Write control signal; high for write, low for read. | Requester |
| APB2 | PWDATA | Write data bus from master to slave. | Requester |
| APB2 | PRDATA | Read data bus from slave to master. | Completer |
| APB3 | PREADY | Optional signal; indicates the slave is ready to complete the transfer. | Completer |
| APB3 | PSLVERR | Optional signal; indicates an error condition on the transfer. | Completer |
| APB4 | PPROT | Optional protection control signals for privilege, security, and instruction/data access. | Requester |
| APB4 | PSTRB | Optional byte lane strobe signals for write operations. | Requester |
| APB5 | PNSE | Optional signal; indicates whether the transfer is secure or non-secure. | Requester |
| APB5 | PWAKEUP | Optional wakeup signal from slave to master for low-power operation. | Completer |
| APB5 | PAUSER | Optional signal; specifies the user ID associated with the transfer for secure systems. | Requester |
| APB5 | PRUSER | Optional user-defined read data channel sideband signals. | Completer |
| APB5 | PWUSER | Optional user-defined write data channel sideband signals. | Requester |
| APB5 | PBUSER | Optional user-defined byte strobe channel sideband signals. | Requester |
Component Features
- All protocol features supported
- Simple RTL interface to interact with HDL and define parameter and configuration options
- Requester sequence, sequencer and driver with easy to control rate limiter and wakeup control
- Completer driver with vanilla, random and memory response patterns
- Monitor
- Bandwidth monitor generating bus activity plots over user defined windows during simulation
- Functional coverage including performance measurements
- Searchable trace file generation
📦 Installation
Using pip
# Standard build
pip install avl-apb
# Development build
pip install avl-apb[dev]
Install from Source
git clone https://github.com/projectapheleia/avl-apb.git
cd avl
# Standard build
pip install .
# Development build
pip install .[dev]
Alternatively if you want to create a virtual environment rather than install globally a script is provided. This will install, with edit privileges to local virtual environment.
This script assumes you have Graphviz and appropriate simulator installed, so all examples and documentation will build out of the box.
git clone https://github.com/projectapheleia/avl-apb.git
cd avl-apb
source avl-apb.sh
📖 Documentation
In order to build the documentation you must have installed the development build.
Build from Source
cd doc
make html
<browser> build/html/index.html
🏃 Examples
In order to run all the examples you must have installed the development build.
To run all examples:
cd examples
# To run
make -j 8 sim
# To clean
make -j 8 clean
To run an individual example:
cd examples/THE EXAMPLE YOU WANT
# To run
make sim
# To clean
make clean
The examples use the CocoTB Makefile and default to Verilator with all waveforms generated. This can be modified using the standard CocoTB build system.
🧹 Code Style & Linting
This project uses Ruff for linting and formatting.
Check code for issues:
ruff check .
Automatically fix common issues:
ruff check . --fix
📧 Contact
- Email: avl@projectapheleia.net
- GitHub: projectapheleia
Metadata
Release files for avl-apb 0.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| avl_apb-0.5.0.tar.gz | 16.5 kB | Without provenance | Details for avl_apb-0.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| avl_apb-0.5.0-py3-none-any.whl | Python 3 | none | any | Details for avl_apb-0.5.0-py3-none-any.whl |
Total release size: 38.9 kB
Release files / avl_apb-0.5.0.tar.gz
| Download URL | avl_apb-0.5.0.tar.gz |
|---|---|
| Size | 16.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35939c004f39aaa2e5334df09912245fdd6bf825de9ed59adaa7facad4d89e3e
|
|
BLAKE2b-256 checksum How to use checksums |
e834c647a2bb9d102af9220129e3cb427b126aef5382ec8f6faeabc9e402c6b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / avl_apb-0.5.0-py3-none-any.whl
| Download URL | avl_apb-0.5.0-py3-none-any.whl |
|---|---|
| Size | 22.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02e14d27095a99a67ecbe2045b9225137436bbc7835dd57882ca52767eb845ed
|
|
BLAKE2b-256 checksum How to use checksums |
617b78eea4912fd56618776971b024628771f52457fdbe42eb47668b274e43d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for avl-apb 0.5.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.