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.4.0.tar.gz
(12.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.4.0.tar.gz.
File metadata
- Download URL: rdlexporter-0.4.0.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c111eb51989aa1f0818422d88eb0ac54eda75661856e74cafa0721693931e775
|
|
| MD5 |
432ca162d7e17c120afbe27c708c8ce9
|
|
| BLAKE2b-256 |
4a1dd3833a2117ee2762d2fd8cc54ffd92f356704173231a03067becc0dcbd31
|
File details
Details for the file rdlexporter-0.4.0-py3-none-any.whl.
File metadata
- Download URL: rdlexporter-0.4.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
52f7208c2949addb981196fce24001f22cb4f8403c564e686510a962dae75592
|
|
| MD5 |
ac9c7eef2f0e4f2f6fc6ab180c3a8a60
|
|
| BLAKE2b-256 |
59762450215abd5e27303933028aca9a822a89656cf31871d81f4c5b2c274e4b
|