Registry / data / peakrdl-ipxact

peakrdl-ipxact

JSON →
library3.5.0pypypi✓ verified 83d ago

PeakRDL-IPXACT is a plugin for the systemrdl-compiler library, enabling the import and export of IP-XACT XML files to and from the SystemRDL register model. It provides functionality to parse IP-XACT descriptions into an RDL model and serialize an RDL model back into IP-XACT. The current version is 3.5.0, with a release cadence that includes frequent bug fixes and occasional minor feature updates.

pip install peakrdl-ipxact
INSTALL
IMPORT
SIG · PEAKRDL-IPXACT
P
peakrdl-ipxact
datapythonv3.5.0
Install
2.5s avg
Import
Disk
55MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 54.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.5s · import 0.000s · 59MB
55MB installed
● package 55MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

IPXACTImporter
from peakrdl_ipxact import IPXACTImporter
from systemrdl.ipxact.importer import IPXACTImporter
IPXACTExporter
from peakrdl_ipxact import IPXACTExporter
Standard
from peakrdl_ipxact import Standard

This example demonstrates how to create a simple RDL model, compile it, export it to an IP-XACT XML file, and then import that XML file back into an RDL model using PeakRDL-IPXACT's `IPXACTExporter` and `IPXACTImporter` classes. The example uses temporary files to ensure it's self-contained and runnable.

import os import tempfile from pathlib import Path from systemrdl.core import RDLCompiler from systemrdl.ipxact.exporter import IPXACTExporter from systemrdl.ipxact.importer import IPXACTImporter # Create a temporary directory for test files with tempfile.TemporaryDirectory() as tmpdir: tmp_path = Path(tmpdir) # 1. Create a dummy RDL file rdl_content = """ addrmap my_block { reg my_reg { field { sw=r; hw=w; } my_field[3:0] = 4'h0; } @0x0; }; """ rdl_file = tmp_path / "example.rdl" rdl_file.write_text(rdl_content) print(f"Created RDL file: {rdl_file}") # 2. Compile the RDL file compiler = RDLCompiler() compiler.compile_file(str(rdl_file)) root_component = compiler.top print(f"Compiled RDL, top component: {root_component.get_path()}") # 3. Export to IP-XACT XML exported_xml_file = tmp_path / "exported_ipxact.xml" exporter = IPXACTExporter() exporter.export(root_component, str(exported_xml_file)) print(f"Exported to IP-XACT XML: {exported_xml_file}") # 4. Import the IP-XACT XML importer = IPXACTImporter() imported_component = importer.import_file(str(exported_xml_file)) print(f"\nImported IP-XACT component name: {imported_component.name}") print(f"Accessing imported register: {imported_component.registers[0].name}") print("Quickstart example completed successfully.")
Debug
Known issues
breakingThe `peakrdl.ipxact` namespace was removed. All imports must now use `systemrdl.ipxact`.
fix
Update all import statements from `from peakrdl.ipxact...` to `from systemrdl.ipxact...`.
affects: >=3.4.0
breakingThe importer's mapping of IP-XACT names to SystemRDL type names was reworked to prevent namespace collisions. This changes how component/memoryMap names are concatenated.
fix
Review existing IP-XACT imports if they rely on specific generated RDL type names. Adapt downstream RDL processing or scripts to the new naming conventions (concatenated component/memoryMap names).
affects: >=3.3.0
gotchaWhen exporting, nodes marked with `ispresent=false` (e.g., fields, registers) are now discarded if the target IP-XACT standard does not explicitly support the `isPresent` tag.
fix
If you rely on `ispresent=false` nodes being present in the exported XML, ensure your target IP-XACT standard (or the exporter's configuration) supports the `isPresent` tag. Otherwise, these nodes will be omitted.
affects: >=3.5.0
Upgrade
Version history
3.5.0latest on PyPI · released Oct 15, 2024
Audit
Dependencies
systemrdl-compilerrequiredCore dependency for RDL model compilation and manipulation.
lxmlrequiredRequired for efficient XML parsing and serialization of IP-XACT files.
Agent activity
23 hits · last 30 days
node
22
Amazon
1
Resources
peakrdl-ipxact — pip install peakrdl-ipxact · libregistry