peakrdl-python
Generate Python Register Access Layer (RAL) from SystemRDL
What it is and what it does
peakrdl-python is a code generator that transforms SystemRDL register specifications into Python classes representing a Register Access Layer. It reads a SystemRDL file (a standard hardware description format for registers) and outputs a Python package with typed classes for each register, field, and memory region, plus a built-in simulator for testing without real hardware.
The generated code provides callback-based read and write access, allowing you to plug in your own hardware communication layer or use the included simulator. It handles register arrays, memory entries, field enumerations, and other SystemRDL constructs. Recent versions (2.0+) optimize generated code size by deduplicating identical classes, and version 3.0+ refactored test generation to reduce code bloat and improve performance.
Use it for:
- Generate type-safe Python register models from SystemRDL specs for hardware verification and testing.
- Build a simulator-based test harness for register behavior without connecting to real hardware.
- Create a Python-based firmware interface layer that abstracts hardware register access behind generated classes.
- Validate register specifications by generating executable Python code and running test suites.
- Integrate hardware register definitions into Python-based design automation or verification workflows.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates a Python Register Access Layer (RAL) from SystemRDL specifications, enabling programmatic access to hardware registers through Python classes and a built-in simulator.
Yes, if you work with SystemRDL and need Python register access. The package is actively maintained, supports modern Python versions (3.9 through 3.14), has no known vulnerabilities, and low install friction. LGPLv3 is permissive for library use. The main consideration is whether your workflow already uses SystemRDL; if not, the value depends on adopting that specification format.
Install
peakrdl-python on PyPI
pip
pip install peakrdl-pythonuv
uv add peakrdl-pythonpoetry
poetry add peakrdl-pythonInstalling peakrdl-python
Before you install
Low friction installation with a pure Python wheel. Actively maintained with a recent release; last commit on 2026-07-26. Supports Python 3.9 through 3.14.
License in practice
Licensed under LGPLv3 (copyleft). You may use and modify the library freely, but any modifications to peakrdl-python itself must be shared under the same license; applications that use it as a library are not subject to this requirement.
Quickstart
pip install peakrdl-python
import peakrdl_python
from jinja2 import Template
from systemrdl_compiler import RDLCompiler
# Compile SystemRDL and generate RAL
Requires a SystemRDL file as input; optionally install peakrdl CLI tool for command-line code generation.
Verify before relying
- Whether generated code is suitable for production hardware access or primarily for simulation and testing.
- Performance characteristics when working with large or complex register models.
- Compatibility with specific hardware platforms or simulation frameworks beyond the built-in simulator.
- Details on how callbacks integrate with real hardware communication layers.
Package facts
| License | GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this… (full text in the JSON record) (copyleft) |
| Python support | supports the current Python release (>=3.9.2) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — systemrdl-compiler, jinja2, typing-extensions, more_itertools |
| Maintenance | actively maintained — 82 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 118,891/month — #12,101 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: peakrdl_python-3.1.2-py3-none-any.whl
Keywords: SystemRDL, PeakRDL, CSR, compiler, tool, registers, generator, Python
Tags
More Electronic Design Automation (EDA) packages
Parses and elaborates SystemRDL 2.0 register…
permissive · top 15,000 on PyPI
planarityTests whether a graph is planar, computes…
permissive · top 15,000 on PyPI
cocotbcocotb is a Python framework for writing…
permissive · top 15,000 on PyPI
pyslangpyslang provides Python bindings to parse,…
permissive · top 15,000 on PyPI
peakrdl-ipxactConverts between SystemRDL register…
copyleft · top 15,000 on PyPI
klayoutKLayout is a Python package for layout viewing,…
copyleft · top 15,000 on PyPI
peakrdl-cheaderGenerates C header files from SystemRDL…
copyleft · top 15,000 on PyPI
peakrdl-regblockCompiles SystemRDL register descriptions into…
copyleft · top 15,000 on PyPI
peakrdl-cliPeakRDL is a command-line tool that generates…
copyleft · top 15,000 on PyPI
peakrdl-systemrdlExports a compiled register model into…
copyleft · top 15,000 on PyPI
peakrdlPeakRDL is a control and status register (CSR)…
copyleft · top 15,000 on PyPI
peakrdl-htmlGenerates HTML documentation for register…
copyleft · top 15,000 on PyPI
peakrdl-uvmGenerates UVM (Universal Verification…
copyleft · top 15,000 on PyPI
spidevProvides Python bindings to interact with SPI…
permissive · top 15,000 on PyPI