Registry / serialization / peakrdl-systemrdl

peakrdl-systemrdl

JSON →
library1.0.1pypypi✓ verified 82d ago

PeakRDL-systemrdl is a plugin for the PeakRDL compiler that allows users to export an in-memory register model to a SystemRDL file. It currently supports version 1.0.1 and generally releases new versions based on new features, bug fixes, or compatibility updates with the main PeakRDL library.

pip install peakrdl-systemrdl
INSTALL
IMPORT
SIG · PEAKRDL-SYSTEMRDL
P
peakrdl-systemrdl
serializationpythonv1.0.1
Install
2.6s avg
Import
Disk
56MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 55.2MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.6s · import 0.000s · 59MB
56MB installed
● package 56MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SystemRDLExporter
from peakrdl_systemrdl import SystemRDLExporter
from peakrdl_systemrdl import SystemRDLConverter

This quickstart demonstrates how to use `peakrdl-systemrdl` as an exporter plugin for the `PeakRDL` compiler. It compiles a simple RDL string into an in-memory model and then exports it to a `.systemrdl` file. Ensure `peakrdl` is also installed (e.g., `pip install peakrdl`).

import peakrdl from peakrdl_systemrdl import SystemRDLConverter from pathlib import Path import os # Create a simple RDL content string for demonstration rdl_content = """ addrmap my_block { reg { field { hw = r; sw = w; reset = 0; accesswidth = 32; } my_field[32]; } my_reg; } """ # Initialize the PeakRDL compiler compiler = peakrdl.RDLCompiler() # Compile the RDL content from a string (or a file: compiler.compile(Path("my_design.rdl"))) compiler.compile_string(rdl_content, "my_design.rdl") # Define the output path for the SystemRDL file output_path = Path("my_design.systemrdl") # Export the compiled RDL model using the SystemRDLConverter compiler.export(SystemRDLConverter, output_path) print(f"RDL model successfully exported to {output_path.name}") # Optional: Clean up the generated file # os.remove(output_path)
peakrdl --version
Debug
Known issues
breakingPython 3.6 support was officially dropped in version 1.0.0. Users on Python 3.6 or older must upgrade their Python environment to 3.7+ or remain on `peakrdl-systemrdl` < 1.0.0.
fix
Upgrade Python to 3.7 or newer. If unable to upgrade, pin `peakrdl-systemrdl<1.0.0` in your dependencies.
affects: < 1.0.0
gotchaTo enable the command-line interface (CLI) functionality provided by `peakrdl-systemrdl`, you must install the library with the `[cli]` extra: `pip install peakrdl-systemrdl[cli]`.
fix
Reinstall the package using the extra: `pip install peakrdl-systemrdl[cli]`.
affects: >= 1.0.1
gotchaIdentifiers in RDL models that happen to be SystemRDL keywords could lead to parsing errors in downstream tools due to improper escaping. Version 1.0.1 introduced keyword filtering to correctly escape such identifiers.
fix
Upgrade to `peakrdl-systemrdl >= 1.0.1` to automatically handle keyword escaping. Alternatively, rename your identifiers to avoid conflicts with SystemRDL keywords.
affects: < 1.0.1
gotchaVersions prior to 1.0.1 could generate an illegal external field instantiation in the resulting SystemRDL output, leading to invalid RDL files that fail to parse with other tools.
fix
Upgrade to `peakrdl-systemrdl >= 1.0.1` to ensure correct and legal external field instantiation in the exported SystemRDL.
affects: < 1.0.1
Upgrade
Version history
1.0.1latest on PyPI · released Nov 7, 2025
Audit
Dependencies
peakrdlrequiredThis library is a plugin for PeakRDL and requires it to compile and export RDL models.
Agent activity
6 hits · last 30 days
node
4
Resources
peakrdl-systemrdl — pip install peakrdl-systemrdl · libregistry