Metadata-Version: 2.4
Name: peakrdl-pyuvm
Version: 0.9.0
Summary: Generate pyuvm register model from SystemRDL
Author-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
Maintainer-email: Rasmus Grøndahl Olsen <simplhdl@gmail.com>
License: MIT License
        
        Copyright (c) 2025 Rasmus Olsen
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Source, https://github.com/RasmusGOlsen/peakrdl-pyuvm
Project-URL: Tracker, https://github.com/RasmusGOlsen/peakrdl-pyuvm/issues
Project-URL: Changelog, https://github.com/RasmusGOlsen/peakrdl-pyuvm/releases
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: systemrdl-compiler
Requires-Dist: jinja2
Requires-Dist: numpy
Requires-Dist: pyuvm>=5
Provides-Extra: cli
Requires-Dist: peakrdl; extra == "cli"
Dynamic: license-file

# peakrdl-pyuvm

[PeakRDL](https://peakrdl.readthedocs.io/) plugin that generates a [pyuvm] register
model from SystemRDL.

The generated output is a single Python module containing `pyuvm` register classes
that can be instantiated and used in any UVM-based Python testbench.

[pyuvm]: https://github.com/pyuvm/pyuvm

## Installation

```bash
pip install peakrdl-pyuvm
```

The PeakRDL host CLI is optional — install it with the `cli` extra if you want to
use the `peakrdl pyuvm` command:

```bash
pip install "peakrdl-pyuvm[cli]"
```

## Usage

Export a register model:

```bash
peakrdl pyuvm my_design.rdl -o my_ral.py
```

Use the generated module in your testbench:

```python
from my_ral import BAR0

block = BAR0("bar0")
block.build()
block.lock_model()

# Iterate registers
for reg in block.get_registers():
    print(reg.get_name())

# Write a field
block.ALU0.SRC.data0.write(0xFF)
```

The generated module contains one class per register, one class per register block,
and one top-level block class. All classes inherit from `pyuvm.uvm_reg_block` /
`pyuvm.uvm_reg`.
