Library to export rdl files
Project description
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
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
rdlexporter-0.1.0.tar.gz
(11.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rdlexporter-0.1.0.tar.gz.
File metadata
- Download URL: rdlexporter-0.1.0.tar.gz
- Upload date:
- Size: 11.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.30
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
938635bf413ef36851a6c51539cafe895c1b561ea839337ee489cfabad4f0371
|
|
| MD5 |
1d00fffae1df941f27fc4efc91776955
|
|
| BLAKE2b-256 |
966588beaaee3c775cd079f6d85062446b1c6d4c9c0c4fc9640e751c62fb15f6
|
File details
Details for the file rdlexporter-0.1.0-py3-none-any.whl.
File metadata
- Download URL: rdlexporter-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.30
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d2a0e2d1d8b39d9e89653d560488c20144c19c2eca962a0a95e5f79888b7caa
|
|
| MD5 |
73f095c76a2d04b42b6131e2d6da3d2c
|
|
| BLAKE2b-256 |
48c202305bf11fbb5fd93d1eb94246cdd5bb62c5ea7dcf6a33c7b7d87e98eafd
|