Open Space Composer · Beta
Composer file format
The Composer saves one system per file with the extension .composer.json. The file holds the system
as it was edited and, derived from it, the netlist of the VHDL top level, the results of the checks and a build
brief in Markdown. A person or an AI agent can build the top level from the file and the pinned source
repositories alone.
Format version 1, version 2 for a system that uses subsystems, and version 3 for a
system with reset groups. JSON schemas:
/composer/schema/system-1.json,
/composer/schema/system-2.json
and /composer/schema/system-3.json.
Examples: the example systems of the Composer,
for instance
encrypted_spp_over_spw.composer.json.
Parts of a file
| Key | Content | Written by |
|---|---|---|
$schema | Address of the JSON schema | Editor |
format, formatVersion | open-space-composer-system, 1 (2 with subsystems, 3 with reset groups) | Editor |
generator | Composer version and the content identifier of the block catalog | Editor |
system | Name of the top-level entity, description, fault tolerance of the inserted blocks, the system ECC monitor | User |
sources | Repositories of the blocks with their pinned commit or tag, VHDL library and the Open Logic FT tag they were verified with (verifiedWith) | Editor |
clockDomains | Clock domains with name, frequency and source (top-level port or a clock output) | User |
instances | Placed blocks with generics that differ from the defaults, clock assignment and constants | User |
connections | Connections from a driving to a receiving interface, side band constants, adapter settings | User |
externals | Interfaces that become ports of the top level, with a name prefix and optionally their stated traffic | User |
resetGroups | Version 3: the reset groups, each a reset output of a block and the instances it resets | User |
subsystems | Version 2 (and 3): the definitions of the subsystems the system uses, each with its hash | User |
resolved | Netlist of the top level: its layout version, ports, instances with generic and port maps, signals, assignments, packing, clocks, resets, constraints, compile order | Derived |
checks | Results of the structural checks and the design rules | Derived |
agent.brief | Build brief in Markdown | Derived |
catalogSubset | Catalog entries of the blocks of the system and of their interface types: ports, generics, clocks, resets, interfaces with signals, fields and directions, presets, rules, notes, initialisation by software | Derived |
layout | Positions of the blocks and the view; no meaning for the build | Editor |
The editor reads the edited parts and resolves the system again; the derived parts are written for readers of the
file. When the stored netlist differs from the system it describes, the editor reports it and writes the new
netlist on the next save. A file saved with another version of the catalog opens with a remark.
resolved.version is the layout version of the netlist, 1: it changes only with an incompatible
change of the layout (a key removed or renamed, or a value with another meaning), while new keys keep it, so that a
program that reads the derived parts can refuse a layout it does not know. Since 0.9.8-beta: a file of an older
Composer has no version and the layout of version 1.
The system as edited
An instance names a catalog block (<source>/<entity>), optionally a preset, the generics
that differ from the catalog and the preset, and the clock domain of every clock input. An interface is named
<instance>.<Interface>; an element of a vector interface carries its index, for example
spp0.S_Tx[1].
"instances": [
{ "id": "frm0", "block": "opencrypto/ocr_framer", "generics": {}, "clocks": { "Clk": "sys" },
"constants": { "Cfg": { "slot": 2 } } },
{ "id": "ocr0", "block": "opencrypto/ocr_core", "generics": { "DenseOutput_g": true }, "clocks": { "Clk": "sys" } }
],
"connections": [
{ "id": "c3", "from": "ocr0.M_Out", "to": "spp0.S_Tx[0]",
"sideband": { "apid": 291, "shi": false, "type": false, "nameValid": false, "name": 0 } }
],
"externals": [ { "interface": "frm0.S_In", "prefix": "pkt_" } ]
sideband: constants of a receiving interface whose side band the driver does not provide, for example the APID of a send port of OpenSPP.constants: values of an unconnected interface whose inputs are constants of the instance, for example the key slot of the OpenCrypto framer.adapters: settings of the blocks the Composer inserts on a connection, for example the depth of an asynchronous FIFO:{ "cdc": { "Depth_g": 64 } }.trafficof an external interface (since 0.3.0-beta): the typical length of its packets in bytes and, optionally, the payload rate offered at an input or required at an output, for the throughput budget:{ "packetBytes": 1024, "bitsPerSecond": 2.0e9 }. The key is written only when it is set; a Composer older than 0.3.0-beta does not read a file that has it. Since 0.4.0-beta it may holdmaxPacketBytes, the largest packet of the interface in bytes, at leastpacketBytes, for the packet sizes along the chain; without it the source is not bounded. A Composer older than 0.4.0-beta does not read a file that has it.trafficof an instance (since 0.9.0-beta): values about the data that the rate data of its block names, stated by the user. So farratio, the assumed compression ratio of a compressor (bytes of the samples per byte of the compressed image):{ "ratio": 2.5 }. The throughput budget and the packet sizes use it behind the compressor instead of the worst case, and the brief marks every number that depends on it asassumed ratio 2.5: it is an assumption about the data, not a property of the block. The key is written only when it is set; a Composer older than 0.9.0-beta does not read a file that has it.- Values of generics: booleans and numbers as JSON,
std_logicas"0"or"1", vectors as VHDL literals ("x\"FE\"", since 0.9.2-beta also with a size,"22x\"3FC000\""), strings without quotes. Where the generics of the instance give the range of a vector generic, the top level writes the value at that width: as written when it has that length, else as a string of binary digits; a value that needs more bits is an error. Where a block requires the ones of a value to lie within a mask (the end mark of an SDU within its field, since 0.9.3-beta), a bit outside is an error.
Subsystems
A system can be placed in another system as a block of its own, a subsystem. A file with subsystems has
formatVersion 2 and holds in subsystems the definition of every subsystem it uses, also
of those used inside other definitions, each once and leaves first: a definition comes after those it uses. A
definition holds the edited parts of a system: name, hash, system,
clockDomains, instances, connections and externals, without a
layout and without derived parts. The Composer writes version 2 only when the system uses a subsystem; a system
whose last subsystem is removed is written as version 1 again.
"instances": [
{ "id": "rmap_node0", "subsystem": "rmap_node", "clocks": { "Clk_sys": "sys", "Clk_link": "link" } }
],
"subsystems": [
{ "name": "spw_port", "hash": "36f3a4c3...", "system": { "name": "spw_port", ... }, "clockDomains": [ ... ],
"instances": [ ... ], "connections": [ ... ], "externals": [ ... ] },
{ "name": "rmap_node", "hash": "737ff30b...", ... }
]
The boundary of a subsystem, as the system that places it sees it:
- Interfaces: every external interface of the definition, with its type, role, widths and signals. Its name is
the prefix without the trailing underscore (
spw_reg_givesspw_reg); a pins interface that is external without a prefix of the user is named by its instance. Two prefixes that give the same name are an error. - Clock inputs: one per clock domain of the definition with an external clock, named like its port,
Clk_<domain>. An instance binds each one to a clock domain of the system around it. The clock domain an input is bound to has the frequency of the domain in the definition, because the frequency generics of its blocks and its timing exceptions are fixed in the definition (rulesubsystem_clock_frequency). A subsystem has no clock outputs: an external interface in a clock domain that a block of the definition drives is an error. - Reset: the input
Rstgets the unsynchronisedRstof the system around it. The subsystem synchronises its release in each of its clock domains with reset generators of its own. - No generics: a subsystem is not parameterisable.
The name of a subsystem is a VHDL identifier and not a reserved word. Every subsystem becomes an entity of its
name in the library of the top level, so the name differs from the name of the system and from every library the
generated files can see (ieee, std, work, olo and the libraries
of the cores).
hash is the SHA-256 of the canonical JSON of the definition without its hash key: the
keys of every object sorted, no white space, numbers and strings as JSON writes them (integers without a
fraction), encoded as UTF-8. In Python:
hashlib.sha256(json.dumps(d, sort_keys=True, separators=(',', ':'), ensure_ascii=False).encode('utf-8')).hexdigest().
A definition whose hash does not match was edited outside the Composer: the file opens with a warning, and the
Composer writes a new hash when it saves. A cycle, a missing and a duplicate definition are format errors.
The Composer resolves every definition on its own, leaves first. Its checks appear once per definition, prefixed
with its name (rmap_node/...); the checks of an instance, such as its clock binding, appear for the
instance. Two clock inputs of one instance on the same clock domain are an error (rule
subsystem_clocks) when the subsystem crosses between them, also inside the subsystems it uses: its
scoped timing exceptions state a maximum delay, data path only, between the two clocks, and with one clock this
would apply to every path of that clock and remove its hold checks. Without a crossing between them it is a
remark.
In the editor, the palette lists the systems of the other open tabs under Subsystems, except those that contain the active system. A placed subsystem keeps the version it was placed with: when its tab changes, the block is marked changed, and its inspector updates it to the version of the tab in one step (one undo step; connections and externals of interfaces it no longer has are removed). Open as tab shows the tab of a subsystem, or opens its definition in a new tab.
Reset groups
Since 0.10.0-beta. Every synchronous reset input of a block normally takes the reset generator of its clock
domain. A reset group lets the reset output of a block reset a set of blocks instead, for example a register that
software writes to restart the processing path of a system while the link and the register access keep running
(olo_ft_reset_ctrl_axi of Open Logic FT). A file with reset groups has formatVersion 3,
with or without subsystems; the Composer writes version 3 only when the system has a reset group, so that a
Composer or a program that does not know reset groups refuses the file instead of dropping them, which would
change the hardware. A system whose last group is removed is written as version 2 or 1 again.
"resetGroups": [
{ "id": "pipe", "source": "prst0.RstOut", "members": [ "spp0", "rxf0", "ocp0", "chunk0" ] }
]
id: the name of the group, an identifier unique among the groups.source:<instance>.<interface>of a reset output, an interface of typeresetthat is an event output. The source block itself stays on the reset generator of its domain, and a block likeolo_ft_reset_ctrl_axipasses that reset on, so the system reset reaches the group as well.members: instance ids of blocks of the top level, at least one. A member takes the reset on all its reset inputs, except a block whose catalog entry marks reset inputs withgroup: it takes the group reset on those only and keeps the reset generator on the others (OpenSPPDpRst, which resets the data path but not the output stage that ends a packet in progress). Such an input of a block in no group keeps its VHDL default, so the block behaves as without it.
A synchronous reset input of a member must be in the clock domain of the source; an asynchronous one takes the
reset directly, and the block synchronises its release itself (a remark). A block that the Composer inserts on a
connection, such as a width converter, joins the group when both ends of the connection are reset by it. For a
block whose catalog entry marks reset inputs with group, an interface counts only when the catalog
names that reset for it (resetBy); otherwise it is a border, and the inserted block keeps the reset of
its domain (a remark lists them). Reset groups belong to the top level: a subsystem has none, and a subsystem
instance is no member.
Errors of the file: resetGroups in a file of version 1 or 2, a version 3 file without a group, a group
without members, a member that is not an instance id (a member is never instance.port), an unknown
instance, a member named twice, a duplicate group id. Errors of the checks (rule reset_group): a
source that is no reset output, the source as a member of its own group, a member of two groups, two groups with
one source, a synchronous reset of a member in another clock domain. Warnings: a member without a reset input; a
member connected to an interface of another member that the group does not reset (a border), with the reason the
catalog gives for that interface (resetBorder), for example the N-Char adapter on the link output of
OpenSPP, which must stay out of the group of DpRst.
In the editor, the inspector of a block with a reset output lists the blocks of the system to check for its group
and the name of the group; the inspector of a member names its group.
Throughput budget
The Composer computes the capacity of every path of a system from the rate data of the catalog. Every block that has rate data states for its stream interfaces the clock cycles of a packet of n bytes, how its routes change the length of a packet (headers, tags, chunks), the payload capacity of its links, and the test or measurement the numbers come from. The inserted width converters and clock crossings have rate data from the Open Logic documentation and tests.
- A path runs from a source (an external stream input, the inbound side of a link) to a sink (an external stream output, the outbound side of a link), through the connections, the inserted adapters, the routes inside the blocks and the inside of subsystems.
- The capacity of an element is
f / cycles(n)packets per second at the frequencyfof its clock domain and its packet lengthn; a link has a payload capacity of its own. The path runs at its slowest element, the bottleneck. A packet that a route cuts into chunks crosses the elements behind it as several chunks. A route can also gather the packets of its input into one packet (since 0.9.3-beta: the SDUs of an image into one compressed image); an element behind it takes its time for the gathered packet once for every so many packets of the source, so that a path runs at the right rate at any packet length of its source. - A link uses its figures for traffic in both directions as soon as its inbound side is connected or external, and those for one direction otherwise.
- Where a route has several outputs whose choice the system makes at run time (receive ports by APID, virtual channels), the path to each output assumes that every packet of the source reaches it.
- A route can deliver to its outputs one packet at a time, in the order of arrival (since 0.9.4-beta: the receive ports of OpenSPP share one receive buffer). A packet then holds the route until its output has taken it, up to a block that stores two of its packets (a FIFO whose route states the beats it holds). The brief shows the rate of the outputs together, with the packets spread evenly over them, in order and with such a store behind every output; where the outputs lose rate in order, a warning names the slower outputs and the depth of the FIFO they need.
- Where no expression can state the rate, the Composer computes it with the model the core supplies in
JavaScript, which the core checks against its published model for every configuration of its regression: the
cycles of an image in the predictor of OpenCompact (
tools/estimate/ocp_throughput.mjs, the port oftools/ocp_throughput.py, copied byte for byte from the pinned tag into the Composer) and the length of its header. A compressor cuts the samples into images and sends each as one compressed image, whose length depends on the data: the compression ratio the user assumes for the instance (trafficof an instance), marked asassumed ratiowherever a number depends on it, else the upper bound on the compressed image that the core publishes (max_image_bytesof OpenCompact), so that the paths behind it carry at least the computed rates. Where a model cannot give a value for a configuration, the paths through the block are not computed, with the reason.
The brief shows every path at reference lengths of 64 and 1024 bytes, at the largest packet where the catalog
states one, and at the stated length, with the bottleneck in bold. These are reference points, not assumed
traffic. The rule throughput checks only stated traffic (traffic of an external
interface): a warning when a stated rate exceeds the capacity of a path, or when the stated rates of the paths
through one element add up to more than its capacity. A source that is merely faster than its path is slowed by
back pressure and gets no warning. A block without rate data ends the paths through it, with the remark "No rate
data". The analysis stops after 10 000 paths or 2 s and then says so. Rates are payload in bit/s with
SI prefixes and three significant digits; every number of a message names its packet length.
Packet sizes and buffers
The Composer follows the largest packet through the system and compares it with the size limits of the catalog. Every block that has size data states the limits of its interfaces (the longest packet an interface takes, as a generic, an expression of generics or a fixed number, and what happens to a longer one), the buffers that hold a whole message, the packets it sends over a link, and the evidence behind them. A block without a length limit says so, with the longest packet its tests cover.
- The largest packet starts at a source:
maxPacketBytesof the stated traffic of an external input. A source without it, and the inbound side of a link, is not bounded. The typical lengthpacketBytesnever bounds a source. - It runs over the connections, the inserted adapters and the routes inside the blocks, through the whole graph of the system and not only through complete paths, so that an unfinished system is checked as well. A route that cuts packets into chunks bounds them by the chunk length, a route that gathers packets sets the length of the gathered packet; a route that adds headers or tags adds their bytes.
- A fixed limit (a buffer given by a generic, or a length the protocol cannot carry) gives an error when the largest packet exceeds it. Where a generic sets the limit, the message names the smallest value of that generic that holds the packet and satisfies every rule of the generic.
- A limit that is only the reset value of a register gives a warning: the message says that software can change the register and names the fixed limit behind it.
- An unbounded source gives a remark at the first limit it reaches, with what happens to longer packets.
- A buffer that holds whole messages counts in beats of its interface: every section of a message (for example IV, header, data and tag of an encrypted chunk) starts with a new beat. A buffer too small for one message is an error, a buffer for one but not two messages a warning with the throughput it costs.
- A block that publishes no size data gives a remark: packets through it are checked against the other blocks only.
The brief lists the largest packet at every interface with a limit, the buffers, the packets that leave over a
link (for the node at the far end), the blocks without a length limit with the length their tests cover, and the
blocks without size data. The rule of these checks is sizes.
Address map
The Composer computes the address map of a system from the netlist and the register data of the catalog, and
writes it into resolved.addressMap.
- An address space starts at an AXI slave of the top level (a processor or a test bench drives it) and at the AXI master of a block that drives addresses of its own, for example the memory master of an RMAP target. The space follows the connections, through the interfaces of subsystems.
- An AXI4-Lite decoder (
olo_axi_lite_decoder) gives each of its ports a window of2^PortAddrWidth_gbytes: port p starts at p times the window above the base of the decoder. Decoders nest. A port without a slave answers DECERR and appears as unused. The decoder repeats its map in a wider space. - Any other AXI slave is a register bank of
2^addrWidthbytes. A bank carries the value of its ID register and the C header and register map of its core, in the repository at the commit the system is built with. - Where the catalog knows what the addresses of a space are, the map says so. The space of an RMAP target holds
RMAP memory addresses as seen by an initiator; the target accepts an access only inside its windows. The map
names the window registers and their state after the reset, from
WinInit_g. Software can narrow the windows.
The rule address_map reports a bank larger than its window as an error: its upper registers are not
reachable. The message names the smallest window that holds the bank, and the address width of the decoder
where that window needs more. A bank beyond the address bits of the master that starts its space is an error as
well. Banks smaller than their windows, and a decoder whose map repeats in a wider space, are remarks.
Interrupts
resolved.interrupts lists every interrupt output of the system: a level that is high while an
enabled event is pending. Each entry names its clock domain and where it goes: a top-level port, the event input
of a block, or open. It also names its registers in the register map of its block: the enables, the status and
the events, which are cleared by writing ones. The catalog names these registers per core, and the catalog check
finds them in the register map at the pin. The Composer places no interrupt controller. An open interrupt is no
finding: software can poll the status register.
Protection scope
The blocks are designed for radiation environments together with the triple modular redundancy (TMR) of the
synthesis tool. resolved.protection and the brief show what the system protects itself and what it
leaves to the integrator:
- the blocks that protect their memories with SECDED ECC and report it in their registers. The number of channels is the number of double-error flags of the status register in the register map at the pin; the catalog check also verifies that the select register can address every channel;
- every ECC event output of a memory (an Open Logic ft FIFO, the buffers of a framer) and where it is reported:
a channel of an ECC monitor (
olo_ft_ecc_monitor_axi), another block, a top-level port, or not at all; - the system ECC monitor (
system.eccMonitor, since 0.8.0-beta): an ECC monitor the user marks (the checkbox System ECC monitor in its inspector). The ECC events of the crossings the Composer inserts take its free channels, in the order of their connections, and their connections are resolved like the user's, with a pulse crossing into the clock domain of the monitor where needed. These channels can change when crossings appear or disappear; the C header of the address map defines a macro for every channel of every monitor. A crossing beyond the free channels stays open, with a warning that names the number of channels needed; - the clock domain crossings the Composer inserts: FIFOs for streams (with fault tolerance on
olo_ft_fifo_asyncwith SECDED ECC, with it offolo_base_fifo_asyncwithout ECC) and pulse or bit crossings for events and levels, which have no memory; their synchronisers are triplicated with fault tolerance on; - what the integrator does: enable the TMR of the synthesis tool, check the synthesis report, request safe state machines, and protect the configuration memory of SRAM-based FPGAs by scrubbing.
The rule protection reports an open ECC event output of a block the user placed as a warning: the
corrected and detected errors of that memory are not reported. Where the block also reports its ECC in its own
registers, it is a remark: the errors are not lost, only not monitored centrally. The ECC events of an inserted
crossing are open as the Composer writes it; that is a remark, and the brief lists it under "not reported".
Readiness
resolved.readiness lists the parts of the system: every source repository of its blocks, with the
technology readiness level (TRL) its project states on the TRL page and the instances of
its blocks. The brief opens with one line on it and lists the parts in its last section. The composed system has
no TRL of its own: it is checked by elaboration and a run to 0 ns, which is no evidence of a readiness level.
The line says "Parts at TRL 3 or higher (lowest: 3)" with the lowest level of the parts, not a level of the
system.
The resolved netlist
resolved describes the top level completely. It contains the placed blocks and the blocks the
Composer inserts: width converters, clock crossings (asynchronous FIFOs with the side band packed into the data
word) and a reset generator for every clock domain with a synchronous reset. A width converter carries data,
keep and last (byte enables, partial only on the last beat); a signal that only the driving interface has, for
example an error flag the receiver does not take, ends at the converter, and one that both interfaces carry
makes the connection an error. Writing the top level takes four steps:
- Write the context clause of
context:library ieee;withstd_logic_1164, every library ofcompile, and auseclause for every package whose constants a generic map names. - Declare a signal for every entry of
signals. Every port of an instance with a signal actual has one, named<instance>_<port>_s, with the VHDL type of the port. - Instantiate every entry of
instancesas<id> : entity <library>.<entity>. The generic map holds the generics whosedefaultis false, with the VHDL literal invhdl. The port map holds theactualof every port: its signal, a clock, a reset oropen; a port withuseDefaultis left out and keeps its VHDLdefault. - Write every entry of
netsas the concurrent assignmentto <= from;.
signal spw0_M_Pkt_TData_s : std_logic_vector(7 downto 0);
...
rmap0 : entity openrmap.omap_core
generic map (Initiator_g => false)
port map (Clk => Clk_sys, Rst => auto_rst_sys_RstOut_s, S_Pkt_TData => rmap0_S_Pkt_TData_s, ...);
...
rmap0_S_Pkt_TData_s <= spw0_M_Pkt_TData_s;
auto_cdc_c5_In_Data_s(36) <= nchar0_M_Link_Last_s;
spp0_S_Tx_User_s <= "0000000000000000000100100011";
| Entry | Meaning |
|---|---|
entity, ports | Name and ports of the top-level entity, in order. Rst is the asynchronous system reset (high-active), Clk_<domain> the clock of an external clock domain, the other ports belong to external interfaces and are named <prefix><port> (an element of a vector interface adds _<index>). Every port names its clock domain; a port of an external interface names its logical signal and, where its bits have a meaning, the fields (for example the APID in bits 10:0 of a receive port of OpenSPP). |
instances | Entity, library, origin (placed or inserted, with the reason), clock domain, every generic with its value, VHDL literal and whether it is the default, every port with its type, actual and clock domain (a block with several clocks: the clock of the interface of the port). A reset input says in reset whether it is synchronous (from the reset generator of its domain, or from the source of its reset group; an input for reset groups outside one keeps its default) or asynchronous (the block synchronises the release itself), and why. |
signals | Signal declarations of the architecture. |
nets | Assignments: connections signal by signal (kind connection), constants of side bands and missing signals (constant), tie-offs of unconnected inputs (tie-off) and the top-level ports (top). A packed data word appears bit field by bit field. A constant of a side band or of an instance carries its field map in fields. |
packing | Bit fields of every packed data word, for example data 31:0, keep 35:32, last 36, user 37. |
clocks, resets | Clock domains with frequency and the actual of their clock inputs; the reset generators (one for every domain with a synchronous reset) and the signals of their resets. |
resetGroups | Version 3: every reset group with its source (<instance>.<port>), the signal of the source, its clock domain and every reset port it drives (<instance>.<port>), the members first, then the inserted blocks that join it. A system without reset groups has no such entry. |
constraints | In terms of the top level: a maximum delay for every pair of clock domains with a clock crossing, in both directions, the period of the faster clock, data path only (max_delay, the Open Logic clock crossing principles); false paths, I/O registers and the scoped constraint script of Open Logic. There are no asynchronous clock groups: in Vivado they would override the delay limits. |
compile | VHDL libraries in compile order with repository, commit or tag, file list and its format, and the entities used. files: one VHDL file per line in compile order. modules: one module directory per line, relative to the repository root; blank lines and lines starting with # are ignored; the sources of a module are its src/*.vhd files, which have no given order inside the module (packages first, then in dependency order, or let the tool order them). verifiedWith is the Open Logic FT tag the repository was verified with. |
problems | Inconsistencies found while building the netlist; empty for a correct catalog. |
addressMap | Since 0.5.0-beta: the address spaces of the system with their register banks, written when the system has one. |
interrupts | Since 0.6.0-beta: every interrupt output with its clock domain, where it goes and its registers, written when the system has one. |
readiness | Since 0.7.0-beta: the readiness of the parts of the system. |
protection | Since 0.6.0-beta: the protection scope of the system: the ECC of the blocks, where every ECC event goes, the inserted crossings. |
subsystems | Version 2: the netlist of every subsystem definition, leaves first, flat, each in the form described here. An instance of a subsystem has the library work and the entity named after it. compile also lists the libraries used inside the subsystems; context holds the libraries of the instances of the top level only. |
Clocks and resets are port actuals and never assignments, so that no clock gets a delta delay in a simulation.
One olo library (Open Logic FT) serves all blocks of the system; the note of the
olo source says which tags are compatible. GHDL needs -frelaxed for Open Logic and
the cores.
Checks
checks lists the results of the structural checks (missing connections of interfaces that must be
served, side band constants, widths, clock crossings) and of the design rules of the catalog (clock relations,
generics that depend on each other), of the throughput budget, of the
packet sizes and buffers, of the address map and of the
protection scope. Each entry has a severity (error,
warning, info), the rule and a message, and names the instance, connection or clock
domain it is about. A system with an error is not ready to build.
The build brief
agent.brief is a Markdown text for a person or an AI agent: the repositories and their compile
order, the ports of the top level with their clock domains and the field maps of the external interfaces, how
to write the architecture from resolved, the clock domains and resets, the constraints, the
throughput of every path, the packet sizes and buffers, the address map, the interrupts, the protection
scope, the readiness of the parts, the notes of the user guides of the blocks, the initialisation by software (identification registers and the register writes
that start the blocks), the open checks, a smoke test bench to verify the result with GHDL or QuestaSim and an
optional end-to-end test. Since 0.9.6-beta the smoke test names the files of the behavioural model of a
vendor-specific block in their compile order, so that it runs without the libraries of the vendor, and its
QuestaSim command line sets the time resolution of GHDL, 1 fs (vsim -t fs).
VHDL export
The export writes the files that a build of the system needs, from the resolved netlist and nothing else. The same file gives the same export, byte by byte. Every file starts with a header: the generator and its version, the system file and its SHA-256, the block catalog, and that the file is generated and not to be edited.
The button Export HDL of the editor downloads them as one ZIP archive,
<system>_hdl.zip, together with the system file whose hash the headers name. A system with an
error is not exported: the button says how many errors are open, and using it lists them.
| File | Content |
|---|---|
<system>.vhd | Top level, VHDL-2008: the ports, one block of signals per instance, every instance as i_<id> with all its generics (the defaults marked, package constants fully qualified), the connections, side band constants, tie-offs and top-level ports as assignments. Clocks are port actuals only. |
<system>_compile_order.txt | The source repositories at their pinned commits and every synthesis source in compile order with its library; the top level last, in a library named after the system. |
<system>.xdc | Timing exceptions of the system (maximum delays between the clocks of every clock crossing, false paths through the inputs that blocks synchronise themselves), written for read_xdc -ref <system>: valid when the system is the top level and inside a larger design. The reset input Rst has no exception: every block that takes it releases it through olo_base_reset_gen, whose scoped constraints cut the paths into its synchronisers. Since 0.8.1-beta: a file of an older Composer has set_false_path -from [get_ports Rst], which Vivado drops where the system is not the top level (Constraints 18-513); export the system again. The clock of a block is found at the net of its signal, [get_nets <instance>_<port>_s]. Since 0.9.7-beta: a file of an older Composer looks it up at the pin of the instance, [get_pins i_<instance>/<port>], which may no longer exist after synthesis, so that Vivado drops the maximum delays of that clock (Vivado 12-508, 12-4739); export the system again. |
<system>_top.xdc | What applies only when the system is the top level of the FPGA, or synthesised on its own: the clocks of its clock ports and the I/O registers. A board design creates its clocks and places its I/O registers itself. |
<system>_address_map.md | For a system with register banks: every address space with the base, end, size, ID register value and window of its banks, the unused windows, what the addresses are, and where the C header and register map of every core are (repository, commit, path). |
<system>_regs.h | For a system with register banks: C macros of the base, size and ID register value of every bank (<SYSTEM>_<INSTANCE>_BASE, _SIZE, _ID), per address space, and an #include of the header of every core. The register offsets come from those headers; the include path of the compiler must point to their directories at the commits the comment of the file names. |
<subsystem>.vhd | For every subsystem the system uses: its entity, written like the top level, in the library of the top level. An instance of it reads entity work.<subsystem>. Instances of one subsystem share the entity. |
<subsystem>.xdc | The timing exceptions of the subsystem, in terms of its ports, for read_xdc -ref <subsystem>. The false paths and I/O registers of the blocks inside also appear in the files of the system, for its own ports. |
The compile order is a line format for tools. The first line is format composer-compile-order 1;
lines starting with # are comments.
source <directory> <url> <commit> [tag <tag>] [recursive]
file <library> <path>
A source line names a repository: clone it into the directory of that name in a sources root and
check out the commit (recursive: with its submodules). A file line names a VHDL-2008
file and its library, in compile order; the sources relative to the sources root, the top level relative to the
compile order file. The subsystems follow the sources in the library of the top level, leaves first, and the top
level comes last. The file lists come from compile_order.txt of every repository at its pinned
commit. A block outside the file list of its repository, a vendor-specific adapter, follows the files of its
library with its own file and (since 0.9.5-beta) the further files that the catalog names for it, for example its
architecture in a file of its own. The notes at the end name what a build needs beyond the files, for example the
transceiver wizard of a vendor-specific block and the scoped constraint script of Open Logic.
The command line tool of the website repository writes the same files:
node tools/composer_hdl.mjs <system.composer.json> <out dir> [--resolve] [--sources <root>]
- It resolves the system again with its block catalog and compares the result with
resolvedof the file. When they differ, for example after a core update, it lists the differences and exports nothing;--resolveexports the new resolution. A system with an error is not exported. - The file lists come from the catalog, which holds them for its pinned commits.
--sourcesreads them from local checkouts instead, one per repository in<root>, each checked out at exactly the pinned commit (for example the submodules of a repository that builds the system); a checkout at another commit is an error. - A repository pinned at a commit without
compile_order.txtcannot be exported: the export names it ("no compile_order.txt at this pin"). For an older pin, save the system again with the current catalog of the Composer. - Exit status: 0 exported, 1 the stored netlist differs from the new resolution, 2 the file, the system or the sources have errors; nothing is written in the last two cases.
tools/composer_hdl_check.py analyses an export with GHDL file by file in the order of its compile
order, elaborates the top level and runs it to 0 ns, so that the assertions of the cores on their generics fire.
Open Logic is analysed with -frelaxed (the shared variable of its RAMs), the cores and the top level
strictly. A vendor-specific block with a behavioural model in the catalog (a file list of its repository, for
example compile_order_sim.txt, and an architecture in plain VHDL) is simulated with that model: the
files of the model ahead of the entity, the entity and the rest of the model are analysed into its library. Any
other vendor-specific block is replaced by a stub of its entity that drives its outputs with zeros. The further
files of a vendor-specific block are not analysed. Before that, the check stops when the compile order does not
list every further file of the block right after it, or when a file is missing from the sources: the model or
the stub would hide a missing architecture. The continuous
integration of the website runs it for every example and for a system with two levels of subsystems.
Versions and the catalog
The block catalog of the Composer is checked against the VHDL entities of the cores at their pinned commits.
generator.catalog and resolved.catalog name the catalog a file was resolved with; a
newer catalog may resolve the same system differently (for example after a core update), and the editor says so
when it opens the file. catalogSubset holds the catalog entries the system was resolved with, so
that a file explains itself without the catalog.
Changes of the blocks since a file was saved
A file records the commit of every source it was saved with (sources[].commit). The catalog records,
for every source, the chain of its pin steps: each step names the pin before it, the new pin, the evidence (the
pull request of the core and the line of its interface changes), and the changes of its blocks. When a file of an
older pin is opened, the steps since that pin apply, and the Composer lists every change that affects an
instance, with what it did:
- a renamed generic or interface: the value, the connections and the external ports move to the new name;
- a removed generic: its value is dropped; a removed interface: the connections and external ports at it are dropped (a connection that is invalid without a recorded change still makes the file unreadable);
- a changed default of a generic the instance does not set: the old default is written into the instance, so the behaviour stays, unless the change takes the new default for a stated reason;
- a new generic or interface, new bounds of a generic, changed registers or a changed behaviour: listed, with what to check.
The editor shows the list when the file opens and keeps it in the inspector of the system until the system is
saved. The checks carry it as remarks of rule migration. A saved file is at the current pins, and
the list ends: one save writes a file without these remarks, also when a program writes the design it read
(toText). The command line tool prints the list before the differences of the netlist. A commit the chain
does not know (older than its first step) is named: the changes of that source cannot be listed, and the
differences of the netlist remain the reference.