peakrdl-cocotb-ralgen
A SystemRDL to raltest converter for cocotb.
This VIP confirms to sysrdl 1.2 and ral 1.0 format.
Installation
pip3 install peakrdl-cocotb-ralgen
Usage
peakrdl cocotb_ralgen <SystemRDL File> -o <output folder>
peakrdl python <SystemRDL File> -o <output folder>
Then in your cocotb test file
...
from peakrdl_cocotb_ralgen.callbacks.bsv import Callback
from peakrdl_cocotb_ralgen.testcases import rw_test, reset_test
from <AddrMap Name>_RAL import <AddrMap_Name>_RAL_Test as RAL
...
To read and check the value of all registers at Reset.
@cocotb.test
async def test_ral_reset(dut):
"""Ral test reset."""
env = Env(dut)
ral = RAL(env.reg, callback=Callback(dut))
env.start()
await FallingEdge(dut.rst_n)
await ReadOnly()
await reset_test.reset_test(ral, verbose=True)
To perform read write checks:
@cocotb.test
async def test_ral_readwrite(dut):
"""Ral test reset."""
env = Env(dut)
ral = RAL(env.reg, callback=Callback(dut))
await RisingEdge(dut.rst_n)
await ReadOnly()
await rw_test.rw_test(ral,
verbose=True
foreground_read=True,
foreground_write=False,
count=1,
verbose=True,
)
...
Supporting different RTL generators.
For interfacing your RTL Generator generated code, ralgen needs to know the pattern used by you for signal naming. You can provide this information by passing a Callback function which maps the signal from systemRDL to RTL and provides methods to read & write to it.
Adding new tests.
New tests can be added to the testcases folder.
Contribution
PR's for supporting different RTL generators or test strategies are welcome.
Example
For a complete working example check the tests folder.
Metadata
Release files for peakrdl-cocotb-ralgen 0.1.10
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 |
|---|---|---|---|---|
| peakrdl_cocotb_ralgen-0.1.10.tar.gz | 58.3 kB | Without provenance | Details for peakrdl_cocotb_ralgen-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| peakrdl_cocotb_ralgen-0.1.10-py3-none-any.whl | Python 3 | none | any | Details for peakrdl_cocotb_ralgen-0.1.10-py3-none-any.whl |
Total release size: 71.9 kB
Release files / peakrdl_cocotb_ralgen-0.1.10.tar.gz
| Download URL | peakrdl_cocotb_ralgen-0.1.10.tar.gz |
|---|---|
| Size | 58.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4fbdb474c7e0c8be8aacf4939d91865bb75ef373c76434949e50eeaeca3e1820
|
|
BLAKE2b-256 checksum How to use checksums |
53f531f13fb3e8358f923c56de63cee0d559e306fd61439b1188c79d13a7fb4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.26.6 CPython/3.12.3 Linux/6.14.0-1017-azure
|
Release files / peakrdl_cocotb_ralgen-0.1.10-py3-none-any.whl
| Download URL | peakrdl_cocotb_ralgen-0.1.10-py3-none-any.whl |
|---|---|
| Size | 13.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
301d9fc60dc420bf3a55086e63a2c9e2ee61f00e6408819d9bdf3f2065c50e35
|
|
BLAKE2b-256 checksum How to use checksums |
84034867d06b5a449eee00ee3be0b4c7437614b7811f4ee4972b374bd91507f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.26.6 CPython/3.12.3 Linux/6.14.0-1017-azure
|
Security for peakrdl-cocotb-ralgen 0.1.10
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.