Skip to main content

rdlexporter

A library to generate SystemRDL files from the Hierarchical Register Model.

How to use it:

uv pip install rdlexporter

Example:

from rdlexporter import RdlExporter
from systemrdl import RDLCompiler, RDLImporter
from systemrdl.rdltypes import AccessType

rdlc = RDLCompiler()

imp = RDLImporter(rdlc)
imp.default_src_ref = None

addrmap = imp.create_addrmap_definition("generic")

field_en = imp.create_field_definition("EN")
field_en = imp.instantiate_field(field_en, "EN", 0, 1)
imp.assign_property(field_en, "reset", 0x00)
imp.assign_property(field_en, "swmod", value=True)
imp.assign_property(field_en, "desc", "Enable the ip")

imp.assign_property(field_mode, "reset", 0x7)
imp.assign_property(field_mode, "desc", "Define the mode.")
imp.assign_property(field_mode, "sw", AccessType.rw)

reg = imp.create_reg_definition("CTRL")
imp.add_child(reg, field_en)
imp.add_child(reg, field_mode)

reg = imp.instantiate_reg(reg, "CTRL", 0x04, [4], 0x04)
imp.add_child(addrmap, reg)

imp.register_root_component(addrmap)
RdlExporter(rdlc).export("./generic.rdl")

Contributing

How to run tests

cd rdlexporter
uv run pytest

How to build the package and install it locally

Install dev dependencies

uv sync --all-extras 

Build package

uv build --all

Install the package locally

uv pip install dist/rdlexporter-0.1.0-py3-none-any.whl

Release files for rdlexporter 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rdlexporter 0.4.0
File Size Uploaded
rdlexporter-0.4.0.tar.gz 12.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for rdlexporter 0.4.0
File Interpreter ABI Platform
rdlexporter-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size:16.9 kB

Release files / rdlexporter-0.4.0.tar.gz

Download URL rdlexporter-0.4.0.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c111eb51989aa1f0818422d88eb0ac54eda75661856e74cafa0721693931e775
BLAKE2b-256 checksum
How to use checksums
4a1dd3833a2117ee2762d2fd8cc54ffd92f356704173231a03067becc0dcbd31
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.22

Release files / rdlexporter-0.4.0-py3-none-any.whl

Download URL rdlexporter-0.4.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52f7208c2949addb981196fce24001f22cb4f8403c564e686510a962dae75592
BLAKE2b-256 checksum
How to use checksums
59762450215abd5e27303933028aca9a822a89656cf31871d81f4c5b2c274e4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.22

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page