Generate UVM register model from compiled SystemRDL input
Install from PyPi using pip:
python3 -m pip install ralbot-uvm
Pass the elaborated output of the SystemRDL Compiler to the exporter.
import sys
from systemrdl import RDLCompiler, RDLCompileError
from ralbot.uvmgen import uvmGenExporter
rdlc = RDLCompiler()
try:
rdlc.compile_file("path/to/my.rdl")
root = rdlc.elaborate()
except RDLCompileError:
sys.exit(1)
file = "test.svh"
exporter = uvmGenExporter()
exporter.export(root, file)
Constructor for the uvmGen exporter class
Optional Parameters
indentLvl
- Three spaces or four spaces. Default three space.
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. Can be (dir+filename without suffix. such as "output/test_uvmgen")