Install & Compatibility
Where this runs
tested against v2.4.0 · 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
muslpy 3.10–3.940 runs
installs and imports cleanly · install 0.0s · import 0.351s · 68MB
glibcpy 3.10–3.940 runs
installs and imports cleanly · install 3.2s · import 0.343s · 72MB
69MB installed
● package 69MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
UVMExporter
✓ from peakrdl_uvm import UVMExporter
✗ from peakrdl.uvm import UVMExporter
The `peakrdl.uvm` namespace package was deprecated in v2.1.0 and completely removed in v2.3.0. Always use `from peakrdl_uvm import UVMExporter`.
This quickstart demonstrates how to use the `UVMExporter` class programmatically to compile a SystemRDL file and generate a UVM register model. It first creates a dummy RDL file, compiles it using `systemrdl-compiler`, elaborates the design, and then uses `PeakRDL-uvm` to export the UVM package.
import sys
import os
from systemrdl import RDLCompiler, RDLCompileError
from peakrdl_uvm import UVMExporter
# Create a dummy RDL file for demonstration
rdl_content = """
addrmap my_design {
reg {
field { sw = w; hw = r; } foo;
} bar at 0x0;
};
"""
with open("my_design.rdl", "w") as f:
f.write(rdl_content)
# Compile the SystemRDL file
rdlc = RDLCompiler()
try:
rdlc.compile_file("my_design.rdl")
root = rdlc.elaborate()
except RDLCompileError:
print("RDL Compilation Error!")
sys.exit(1)
# Export the UVM register model
exporter = UVMExporter()
output_path = "my_design_uvm_pkg.sv"
exporter.export(node=root, path=output_path)
print(f"UVM register model generated to {output_path}")
# Clean up dummy files
os.remove("my_design.rdl")
os.remove(output_path)
peakrdl-uvm --version
Errors
Common errors & fixes
ImportError: No module named 'peakrdl.uvm'
Attempting to import from the deprecated `peakrdl.uvm` namespace after it was removed in v2.3.0 (deprecated since v2.1.0).
fixUpdate your import statements to `from peakrdl_uvm import UVMExporter`.
AttributeError: 'UVMExporter' object has no attribute 'old_method_name'
Major API refactoring occurred in v2.0.0, causing methods and properties from older versions to become unavailable.
fixRefer to the documentation or release notes for v2.0.0 to understand the new API. You will need to rewrite parts of your exporter logic.
TypeError: UVMExporter.__init__() got an unexpected keyword argument 'user_template_dir'
Configuration option `user_template_dir` was added in v2.4.0. Using it with older versions of the library will result in an error.
fixUpgrade `peakrdl-uvm` to version 2.4.0 or newer to use the `user_template_dir` option. Alternatively, remove the `user_template_dir` argument if not strictly needed.
Upgrade
Version history
2.4.0latest on PyPI · released Nov 25, 2025
Audit
Dependencies
systemrdl-compilerrequiredRequired to compile SystemRDL input files into an elaboratable model.
jinja2requiredUsed as the templating engine for generating the UVM output.
peakrdlrequiredProvides the 'peakrdl' command-line interface, which simplifies the use of PeakRDL-uvm and other PeakRDL plugins. While not a direct library dependency for API usage, it's the easiest and recommended way to use the tool.