Skip to content

v0.3.0

Choose a tag to compare

@mtravaillard mtravaillard released this 11 Nov 15:44
· 3 commits to main since this release

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 an inout one, written as an
    externalPortReference. A top-level in port can drive several instance ports; a top-level
    out port 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 a hierInterface. 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 the ipxact.Component containing the design: its top-level ports
    and bus interfaces, and a hierarchical view whose designInstantiation refers 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 component and --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.0 is required. See its release notes for its own breaking changes. The
    exporters need a release for this API too: use xactflow-design>=0.2.1 and
    xactflow-component>=0.2.1.
  • ArchiDescImporter.import_() takes the library as its second argument and returns None.
    Read the results from library.targets(), e.g. library.targets(ipxact.Design).
  • Design(vlnv, library) now names the SoC. The design gets .design appended to the name and
    the component .component: "example.org:soc:example:0.1" gives the design
    example.org:soc:example.design:0.1 and the component example.org:soc:example.component:0.1.
    design.vlnv is the design's VLNV, and design.component_vlnv is the component's.
  • The exported design file changes name accordingly, e.g.
    example.org_soc_example.design_0.1.xml instead of example.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()), so link() 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