Skip to main content

xactflow-archidesc

A XactFlow importer plugin that turns a design described in a Python script (which IPs it uses, and how they are connected) into an ipxact.Design object, built on ipxact-compiler's IEEE 1685-2022 object model.

IP-XACT design files are not made to be handwritten. With this package, a short script lists the IP instances, the bus connections between them, and any direct signal connections. The importer runs the script and returns the Design, which XactFlow's link() can then check against the IP-XACT rules.

The full description of the format is in doc/python-design-description.md. It describes the tool as it is meant to work once finished, so the current version can differ from it in small ways. The differences known today are listed in Known limitations.

Installation

pip install xactflow-archidesc

For local development, requirements-dev.txt overrides ipxact-compiler, xactflow and xactflow-design to local installations. It can be modified to adapt the paths or to keep any of them on PyPI.

pip install -r requirements-dev.txt -e .

Requires Python >= 3.9.

Usage

A design script builds a Design from an IP library and keeps it in a module-level variable named design:

from pathlib import Path

from xactflow import Library
from xactflow_archidesc import Design

library = Library.scan(Path(__file__).parent / "ip")
design = Design("example.org:soc:example:0.1", library)

cpu = design.add_ip("cpu", "example.org:ip:cpu:1.0", transforms=["tmrg"])
uart = design.add_ip("uart", "example.org:ip:uart:1.0", parameters={"BAUDRATE": 115200})
timer = design.add_ip("timer", "example.org:ip:timer:1.0")
debug = design.add_ip("debug", "example.org:ip:debug_module:1.0")
bus = design.add_ip("bus", "example.org:ip:interconnect:1.0")

design.connect_bus(cpu, bus)
design.connect_bus(bus.bus("m0"), uart, base_addr=0x4001_0000, size=0x1000)
design.connect_bus(bus, timer, base_addr=0x4002_0000, size=0x1000)

design.connect(debug.debug_req_o, cpu.debug_req_i)
design.connect(cpu.debug_resp_o, debug.debug_resp_i)

A runnable version of this script, with its IP library, is in tests/fixtures/soc.py.

In short:

  • add_ip(name, vlnv, ...) adds an IP instance, with optional parameters overrides and transforms.
  • connect_bus(a, b, ...) connects a bus interface of a to one of b. It picks them by itself, or uses the one named with instance.bus("name"). base_addr/size place a target in the address map.
  • connect(source, target) connects two ports. instance.some_port is short for instance.port("some_port").

Each call checks its arguments right away, so a mistake is reported on the line that made it. All the details are in the format description.

Once installed, the importer registers itself under the xactflow.importers entry point group as archidesc, so it runs as a XactFlow CLI command. With xactflow-design installed too, --then hands the result straight to that exporter. To try it on the example of this repo, create a virtual environment and install the package in it first. The xactflow command only exists inside that environment, so activate it again in each new terminal:

python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
xactflow archidesc tests/fixtures/soc.py --then design --output out/

This writes out/example.org_soc_example_0.1.xml, named after the design's VLNV.

Or as a library, for example to link the design first:

from pathlib import Path

from xactflow import Library, link
from xactflow_archidesc import ArchiDescImporter
from xactflow_design import DesignExporter

design = ArchiDescImporter().import_(Path("soc.py"))
linked = link(design, Library.scan("ip"))
DesignExporter().export(design, Path("out"))

The script runs like python soc.py would: a helper module next to it can be imported, and a relative path in it is read from the current folder. Path(__file__).parent gives paths that do not depend on where the command is run from. The importer takes no options.

Design notes

  • Vendor extensions. Two things this format records have no place in IP-XACT, so they are written as vendor extensions in the https://github.com/IP-XACT/XactFlow namespace: <xactflow:transforms> on a component instance, listing the transformations in order, and <xactflow:addressMapping baseAddr="..." size="..."/> on the target side of a bus connection (a target or mirrored initiator interface).
  • Transformations are not applied here. A separate tool, a transformer, reads <xactflow:transforms>, applies the transformations and returns the changed Design.
  • Parameter overrides follow the standard. Only a parameter with a parameterId and resolve="user" can be overridden. The standard says an immediate parameter (the default) cannot be changed through configuration.
  • Connection names are unique. A bus connection is named <a>_to_<b> and a port connection <instance>_<port>_to_<instance>_<port>. A number is added when a name is already taken, by any kind of connection.
  • Monitors. Connecting a monitor interface adds a monitorInterconnection. The interface it watches stays free for a normal connection.

Known limitations

  • connect_bus compares the bus VLNV of the two interfaces, but not the parameter values set on the bus type (a data width, for example). Comparing them needs XactFlow to evaluate those values first. This should be changed in a future update.
  • XactFlow's link() does not use the parameter overrides from add_ip yet. They are written to the design and exported, but not applied during linking.
  • connect checks direction only for wire ports. Two transactional or two structured ports are connected with no further check, only a mix of the two kinds is refused.
  • connect does not compare port widths.
  • A design describes one level only. Hierarchical designs, a real address mapping (instead of the addressMapping placeholder) and protocol bridges are not handled yet, see the open questions at the end of the format description.

Development

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt -e .
pytest

The tests use a small IP library in tests/fixtures/library. tests/test_end_to_end.py runs the example script through the importer, links the result, exports it with xactflow-design and reads the file back.

License

LGPL-3.0. See LICENSE.

Metadata

Release files for xactflow-archidesc 0.1.1

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

Source distribution (sdist)

Source distribution for xactflow-archidesc 0.1.1
File Size Uploaded Provenance Actions
xactflow_archidesc-0.1.1.tar.gz 22.2 kB With provenance Details for xactflow_archidesc-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xactflow-archidesc 0.1.1
File Interpreter ABI Platform Actions
xactflow_archidesc-0.1.1-py3-none-any.whl Python 3 none any Details for xactflow_archidesc-0.1.1-py3-none-any.whl

Total release size: 37.0 kB

Release files / xactflow_archidesc-0.1.1.tar.gz

Download URL xactflow_archidesc-0.1.1.tar.gz
Size 22.2 kB
Tags Source
SHA-256 checksum
How to use checksums
086cbb241d52193866efc0fc6a75da6f71722b65235e1d2c1f874c42687b7862
BLAKE2b-256 checksum
How to use checksums
aef01956d13eec02d729fdfda0255463dcabcb1a119a8dc1022a9becb5061a46
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / xactflow_archidesc-0.1.1-py3-none-any.whl

Download URL xactflow_archidesc-0.1.1-py3-none-any.whl
Size 14.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73150ef716a16bafc9fa94e2fb42945b52cb3c81116f54facd82743892d95517
BLAKE2b-256 checksum
How to use checksums
cb3018c75e6d2c41618588e5aca2a240d4a9e3e539eb1f388726254667ed1e52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for xactflow-archidesc 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xactflow_archidesc-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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