Repository navigation
v0.3.0
xactflow-archidesc v0.3.0
This release moves xactflow-archidesc to XactFlow 0.4.0, where importers and exporters share one
Library, and lets a design script declare the ports and bus interfaces the SoC offers to the
outside. The importer now produces the component containing the design next to the design
itself. It contains breaking changes: see "Upgrading" below.
XactFlow 0.4.0 (#9)
xactflow-archidesc now requires xactflow>=0.4.0, whose plugins share one Library per run.
ArchiDescImporter.import_(source_path, library) adds what the script builds to that library as
targets, instead of returning it. With --then, the exporter receives the same library, holding
the imported documents and everything scanned from --lib, so it can link the design:
xactflow archidesc soc.py --lib ip/ --lib bus_definitions/ --then design --output out/
The documents are rebuilt from the script on every run, so they replace the ones with the same
VLNV in the library, for example the previous output when out/ is also given with --lib.
Top-level ports and bus interfaces (#8)
A script can now declare the IOs of the SoC, and connect them to the instances:
clk = design.add_port("in", "clk_i", connect=cpu.clk_i)
irq = design.add_port("out", "irq_o", width=4)
ext = design.add_bus("ext_if", "example.org:bus:simplebus:1.0", "target", connect=bus.bus("s1"))
add_port(direction, name, width=None, *, connect=None)adds a top-level wire port.connect()
pairs it with an instance port of the same direction, or aninoutone, written as an
externalPortReference. A top-levelinport can drive several instance ports; a top-level
outport is driven once.add_bus(name, bus_type, mode, *, group=None, connect=None)adds a top-level bus interface.
connect_bus()pairs it with an instance interface of the same bus type and the same mode, as
the standard requires (SCR 2.4 to 2.10), written as ahierInterface. The top-level interface
copies the abstraction types and port maps of the internal one, and each mapped port becomes a
top-level port named<bus>_<logical port>.build_component()returns theipxact.Componentcontaining the design: its top-level ports
and bus interfaces, and ahierarchicalview whosedesignInstantiationrefers to the design.
link()finds the component through that view and checks the top-level connections against it.- The importer adds both the component and the design to the library. Write them with
--then componentand--then design.
Documentation
The README and the format description (.md and .tex) describe the shared library, the
top-level IOs and the generated component. The worked example now exposes two top-level ports.
Upgrading
xactflow>=0.4.0is required. See its release notes for its own breaking changes. The
exporters need a release for this API too: usexactflow-design>=0.2.1and
xactflow-component>=0.2.1.ArchiDescImporter.import_()takes the library as its second argument and returnsNone.
Read the results fromlibrary.targets(), e.g.library.targets(ipxact.Design).Design(vlnv, library)now names the SoC. The design gets.designappended to the name and
the component.component:"example.org:soc:example:0.1"gives the design
example.org:soc:example.design:0.1and the componentexample.org:soc:example.component:0.1.
design.vlnvis the design's VLNV, anddesign.component_vlnvis the component's.- The exported design file changes name accordingly, e.g.
example.org_soc_example.design_0.1.xmlinstead ofexample.org_soc_example_0.1.xml. Update
anything that refers to the old VLNV or file name. - A script that links its own design and uses top-level IOs adds the component to its library
first,library.add(design.build_component()), solink()can check them.
Known limitations
- A top-level bus interface copies whole internal ports: a port map onto part of a port is
refused, and a copied port keeps its width as written, even when it refers to a parameter of
the internal component. connect()does not compare the width of a top-level port with the instance port.
Full Changelog: v0.2.0...v0.3.0