Generate UVM register model from compiled SystemRDL input
Project description
PeakRDL-uvm
Generate UVM register model from compiled SystemRDL input.
For the command line tool, see the PeakRDL project.
Installing
Install from PyPi using pip:
python3 -m pip install peakrdl-uvm
Exporter Usage
Pass the elaborated output of the SystemRDL Compiler to the exporter.
import sys
from systemrdl import RDLCompiler, RDLCompileError
from peakrdl_uvm import UVMExporter
rdlc = RDLCompiler()
try:
rdlc.compile_file("path/to/my.rdl")
root = rdlc.elaborate()
except RDLCompileError:
sys.exit(1)
exporter = UVMExporter()
exporter.export(root, "test.sv")
Reference
UVMExporter(**kwargs)
Constructor for the UVM Exporter class
Optional Parameters
user_template_dir
- Path to a directory where user-defined template overrides are stored.
user_template_context
- Additional context variables to load into the template namespace.
UVMExporter.export(node, path, **kwargs)
Perform the export!
Parameters
node
- Top-level node to export. Can be the top-level
RootNode
or any internalAddrmapNode
.
- Top-level node to export. Can be the top-level
path
- Output file.
Optional Parameters
export_as_package
- If True (Default), UVM register model is exported as a SystemVerilog package. Package name is based on the output file name.
- If False, register model is exported as an includable header.
reuse_class_definitions
- If True (Default), exporter attempts to re-use class definitions where possible. Class names are based on the lexical scope of the original SystemRDL definitions.
- If False, class definitions are not reused. Class names are based on the instance's hierarchical path.
use_uvm_factory
- If True, class definitions and class instances are created using the UVM factory.
- If False (Default), UVM factory is disabled. Classes are created directly via new() constructors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
peakrdl-uvm-2.3.0.tar.gz
(23.5 kB
view details)
File details
Details for the file peakrdl-uvm-2.3.0.tar.gz
.
File metadata
- Download URL: peakrdl-uvm-2.3.0.tar.gz
- Upload date:
- Size: 23.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec18a4fc87d0201fe03ebe0de259a6b7f22be3de1d6908f80bce1e1416bc9cf2 |
|
MD5 | 4a7e6be9f5337f3931d05388b2e63c2b |
|
BLAKE2b-256 | 042b47e2a27147ae1117e9248e926a7d478b6b2e229b30fb2a0bca01870d5ebe |