rtlgen
A XactFlow exporter plugin that generates a SystemVerilog top-level module from an IEEE 1685-2022 (IP-XACT) design.
It is being written step by step. Steps 1 to 10 are done: the plugin is registered with
XactFlow as the rtl subcommand, links the design against its library, names the module from
the component that holds the design, and writes the module with that component's ports and
one instance per subcomponent, each named after the module its component gives, with its
module parameters and their values in this design. Instances are wired to each other and to
the top ports through the design's ad hoc connections: one wire per net between instances,
and a net that reaches a top port, or a slice of one, is that port or slice. Bus
interconnections between two instances are wired too: one wire per logical port that both
ends map, named <interconnection>_<logical port> and numbered like the logical port. Ports
may be connected in parts (written as concatenations), tied to constants (tiedValue) or left
open; an input that only one end of a bus maps takes the abstraction definition's default
value. A hierarchical subcomponent gets a module of its own, generated from its design in the
same run by the same rules, and a bus interface of the top (hierInterface) is wired straight
to the instance's ports. Where the input gives no module name, the module is named after the
component's VLNV name. A module parameter's value may be a SystemVerilog package name
(pkg::NAME), written as it stands; ports of a packed struct type are declared with that type
and connected whole to a top port; and an output on several bus nets, or on a bus net and in an
ad hoc connection, drives the other nets with assigns. A module whose instances include
decoders, components described as transparent bridges, also gets <module>_addr_map_pkg.sv
with each window's base, size and end; a decoder takes its table from its own component's
expression, and a value wider than 32 bits is written as sized hex. With these, it generates the
standard top of the Triglav SoC and its address-map packages from standard IP-XACT.
Use
pip install xactflow-rtlgen # or, from a clone: pip install -e .
xactflow rtl <design.xml> --lib <dir> [--lib <dir> ...] --output <dir>
It writes <module>.sv into the output folder, and one more file for each hierarchical
subcomponent. It can also take a design straight from an
importer, with no XML file in between:
xactflow archidesc design.py --lib <dir> [--lib <dir> ...] --then rtl --output <dir>
Since XactFlow 0.5.0 this also writes the importer's IP-XACT XML into the same folder; add
--no-xml to get <module>.sv only.
rtlgen refuses, with a message, anything it does not handle yet (see docs/decisions.md):
- options, design configurations, a library that reports errors, a design that does not link, a module name it cannot find;
- an address window it cannot read: an opaque bridge (
subspaceMap), a bridge to an interface that is not an initiator, an initiator with no address space orbaseAddress,addressUnitBitsother than 8, a base or range that is not a whole number, a negative base or a range of 0; and in the package, a constant name that is not an identifier or that two windows share, an end past 64 bits, or a package named like a module; - a virtual subcomponent, one in a language other than SystemVerilog, an override naming no
parameter of the component, a module parameter that is not typed or whose value cannot be
worked out (a package name is passed on only as the whole value, and refused with a
minimumormaximum), a negative value wider than 32 bits, parameters on the top or on any generated module; - a hierarchical subcomponent it cannot generate: one that reaches its design only through a design configuration, has views referencing different designs or also a view naming only an RTL module, is given parameter values, or whose design is missing or does not link; two components that give one module name, a generated module named like a leaf module, or a hierarchy that loops;
- a top port it cannot declare: a transactional or array port, one with several vectors, or one named like an instance;
- a structured port it cannot write: anything but a packed struct
inoroutwith no sub-ports or vectors and one type definition named[pkg::]name[...]; one in anything but an ad hoc connection joining it whole to one top port of the same type and direction; a structured input that nothing reaches; - an instance port it cannot leave open: an input that nothing reaches, or bits of one, and a
bus interface with
connectionRequiredthat no interconnection uses; - an ad hoc connection it cannot wire yet: whole ports of different widths, opposite bit orders, a phantom, array or transactional port, a sub-port, a part select it cannot take (indices, outside the port, against it, partly overlapping another), a net that joins two top ports or slices, an instance output driving a top input, a top output or bits of one that nothing drives, or a connection name that clashes with an instance or a top port or is used twice;
- a tie-off it cannot write: a value on an instance output or
inoutor on a top input orinout,defaulton a port with no default value or on part of a port, a value that does not fit the port or cannot be worked out, or a tied port in another connection; - a bus interconnection it cannot wire yet: a monitor interconnection, more than two ends,
modes other than an initiator with a target, no or several abstraction types, an excluded port
no port map uses, a port map that is tied off (
logicalTieOff), inverted or to a sub-port, an ascending logical range, ranges of unequal size, logical or physical bits mapped twice, a physical port that is missing, phantom, an array or not a wire, input bits that only one end maps, a logical port withmatchthat only one end maps, a default it cannot write, two inputs or two outputs on the same bits, a net name that clashes, an interconnection name used twice, an input orinoutbit on both a bus net and an ad hoc connection or on two bus nets, or an output on several nets that is only part of one of them or whose ad hoc net has another driver; - a bus interface of the top (
hierInterface) it cannot wire yet: one joined to more than one instance bus interface or to one of another mode (only an initiator with an initiator, or a target with a target), a port map of its own that the checks above refuse, an instance output on a top input or an instance input on a top output, top output bits that nothing drives, or a top port bit also reached another way.
Docs
docs/decisions.md: the decisions that shape the exporter, why they were made, and what would reopen them.docs/scr-checks.md: the checks rtlgen makes that an IEEE 1685 semantic consistency rule covers, each to be removed once XactFlow checks that rule (D35).
Tests
The tests read the XactFlow author's example design, soc_a, from the clone that
RTLGEN_EXAMPLE names, and skip when it is not set or the generated files are missing (D3).
The example has no licence file, so nothing from it, nor generated from it, goes into this
repository: the generated files live in build/, which git ignores.
pip install -e . pytest xactflow-archidesc==0.4.0
git clone https://github.com/mtravaillard/example_XactFlow.git ../example_XactFlow
export RTLGEN_EXAMPLE=$(realpath ../example_XactFlow)
# The design and the component holding it, into build/soc_a. Rerun when the example changes.
OUT=$PWD/build/soc_a
cd "$RTLGEN_EXAMPLE/xml_to_design"
xactflow archidesc design.py --output "$OUT"
cd -
pytest -q
archidesc 0.4.0 needs XactFlow 0.5.0, and brings the component and design exporters that
write the two files. Before 0.3.1, archidesc wrote a component that D1 refuses.
Licence
LGPL-3.0-only, see LICENSE.
Metadata
Release files for xactflow-rtlgen 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| xactflow_rtlgen-0.1.0.tar.gz | 74.4 kB | With provenance | Details for xactflow_rtlgen-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| xactflow_rtlgen-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for xactflow_rtlgen-0.1.0-py3-none-any.whl |
Total release size: 109.4 kB
Release files / xactflow_rtlgen-0.1.0.tar.gz
| Download URL | xactflow_rtlgen-0.1.0.tar.gz |
|---|---|
| Size | 74.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6f192b84c93e56a842ccd854eb531200a6be27970b7a4b48250b32c21d84d5e2
|
|
BLAKE2b-256 checksum How to use checksums |
2dda867c358689a33e284f13bd1b92f887a27877e859fd1aa155ae796f131150
|
| 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 Dec 2, 2026.
Transparency logRelease files / xactflow_rtlgen-0.1.0-py3-none-any.whl
| Download URL | xactflow_rtlgen-0.1.0-py3-none-any.whl |
|---|---|
| Size | 35.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7785279a22d481b82cd1f8b242bbba2f268494202489bcd8076713d091a084f3
|
|
BLAKE2b-256 checksum How to use checksums |
eb3c8fae7f7f4373fc00108e7264634be175713b4659c4265030400dde38c2f5
|
| 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 Dec 2, 2026.
Transparency logSecurity for xactflow-rtlgen 0.1.0
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.
Attestation for xactflow_rtlgen-0.1.0.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 Dec 2, 2026.
Transparency logA 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.