PeakRDL importer plugin for CMSIS-SVD register description files
Project description
peakrdl-svd
A PeakRDL importer plugin that reads CMSIS-SVD (System View Description) register description files and compiles them into the SystemRDL register model.
Installation
pip install peakrdl-svd
Once installed, the plugin registers itself automatically under the svd
importer name, so PeakRDL picks it up with no extra configuration.
Usage
CLI
Import an SVD file and export to another format (e.g. IP-XACT):
peakrdl ipxact path/to/device.svd -o out/
Import only a single peripheral:
peakrdl ipxact path/to/device.svd --svd-peripheral UART0 -o out/
Python API
from systemrdl import RDLCompiler
from peakrdl_svd.importer import SVDImporter
rdlc = RDLCompiler()
imp = SVDImporter(rdlc, peripheral_filter="UART0") # omit filter for full device
imp.import_file("path/to/device.svd")
root = rdlc.elaborate()
for periph in root.children():
print(periph.inst_name)
Features
- Full device or single-peripheral import via
--svd-peripheral derivedFrom— peripherals, registers, clusters, and<enumeratedValues>- Register and cluster arrays via
<dim>/<dimIncrement> - Nested clusters mapped to nested
regfilecomponents - All three SVD bit-range notations:
bitOffset+bitWidth,lsb+msb,[msb:lsb] - Default inheritance —
size,access,resetValue,resetMaskpropagate from device → peripheral → cluster → register <enumeratedValues>mapped toUserEnumencoding propertiesmodifiedWriteValuesandreadActionmapped toonwrite/onread
Development
git clone https://github.com/gkvas/peakrdl-svd
cd peakrdl-svd
pip install -e ".[dev]"
pytest
License
MIT — see LICENSE.
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
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 peakrdl_svd-0.1.0.tar.gz.
File metadata
- Download URL: peakrdl_svd-0.1.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e83212ec16983f007691c5a689ccc7ecdac8e31ad614479c93739d0de41c7ec6
|
|
| MD5 |
d4e1a59165a342633a057804f4e0aadd
|
|
| BLAKE2b-256 |
3da9e3476805a12b6d9551636113362fb101f93900d072f567a5856c86e2f53b
|
Provenance
The following attestation bundles were made for peakrdl_svd-0.1.0.tar.gz:
Publisher:
publish.yml on gkvas/peakrdl-svd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peakrdl_svd-0.1.0.tar.gz -
Subject digest:
e83212ec16983f007691c5a689ccc7ecdac8e31ad614479c93739d0de41c7ec6 - Sigstore transparency entry: 1486725570
- Sigstore integration time:
-
Permalink:
gkvas/peakrdl-svd@be15fe45f9c532d08f4b11ca252b22d68939f93c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gkvas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be15fe45f9c532d08f4b11ca252b22d68939f93c -
Trigger Event:
push
-
Statement type:
File details
Details for the file peakrdl_svd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: peakrdl_svd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0caaba469d0049f615e668b469cae722b578863a3d9740588d0b0f0806a5633a
|
|
| MD5 |
66b5e30f04c54cd02839d55fb4a55b0d
|
|
| BLAKE2b-256 |
b4bc923eb12c48bdf78323adcac228efc33a8caae199a950cdffa5d5c4ae87e4
|
Provenance
The following attestation bundles were made for peakrdl_svd-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on gkvas/peakrdl-svd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
peakrdl_svd-0.1.0-py3-none-any.whl -
Subject digest:
0caaba469d0049f615e668b469cae722b578863a3d9740588d0b0f0806a5633a - Sigstore transparency entry: 1486725630
- Sigstore integration time:
-
Permalink:
gkvas/peakrdl-svd@be15fe45f9c532d08f4b11ca252b22d68939f93c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gkvas
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be15fe45f9c532d08f4b11ca252b22d68939f93c -
Trigger Event:
push
-
Statement type: