Skip to main content

Generate eUVM register model from compiled SystemRDL input

Project description

build PyPI - Python Version

PeakRDL-euvm

Generate eUVM 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-euvm

Exporter Usage

Pass the elaborated output of the SystemRDL Compiler to the exporter.

import sys
from systemrdl import RDLCompiler, RDLCompileError
from peakrdl_euvm import eUVMExporter

rdlc = RDLCompiler()

try:
    rdlc.compile_file("path/to/my.rdl")
    root = rdlc.elaborate()
except RDLCompileError:
    sys.exit(1)

exporter = eUVMExporter()
exporter.export(root, "test.sv")

Reference

eUVMExporter(**kwargs)

Constructor for the eUVM 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.

eUVMExporter.export(node, path, **kwargs)

Perform the export!

Parameters

  • node
    • Top-level node to export. Can be the top-level RootNode or any internal AddrmapNode.
  • path
    • Output file.

Optional Parameters

  • export_as_package
    • If True (Default), eUVM 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

peakrdl-euvm-1.0.tar.gz (89.8 kB view details)

Uploaded Source

File details

Details for the file peakrdl-euvm-1.0.tar.gz.

File metadata

  • Download URL: peakrdl-euvm-1.0.tar.gz
  • Upload date:
  • Size: 89.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for peakrdl-euvm-1.0.tar.gz
Algorithm Hash digest
SHA256 70bacfaf80df1ca7af8f4397b51782cbf889b3d85bb20e88cace0898c3ccb79f
MD5 1b9ff9ce6113b77a52a2c8978f2f99f2
BLAKE2b-256 0016987a7bb88311dc3996325ba84145c1ff73ecf088f85fd969b250a0b1f8e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page