A trlo file is used to store the connections to be used within a module running the TRLO II. The file can be loaded with the trloctrl program (or trloctrllib library), and sections executed. Executing a section means to perform the actual programming of the hardware setup registers. The separation in sections is to be able to describe (slightly) different configurations that are used in different modes, e.g. when a system is operated stand-alone or as multi-branch subsystem.
The file has a C-like syntax. Expressions are enclosed in function-like sections.
A command section has the form
The section is executed by NAME and can also be CALLed from within another section.
The signal multiplexer is controlled by assigning a source to a destination.
destination = source;
Functional units which can operate on several signals are assigned in similar ways, with logic operators inbetween.
LMU_OUT = LMU_IN [and|or LMU_IN ...];
Special output signals which are assigned using bitmasks, and therefore can be assigned to multiple outputs are given in a reverse order, e.g.
out_mask = destination[, destination];
Setup registers are assigned values as expected.
setupreg = x;
Values representing times are given with units. In cases where the TRLO II firmware imposes a minimum value (such that a 0 register value corresponds to a non-zero offset), this is taken into account by the execution. The setup file holds the effective time.
setupreg = t ns;
Where the values represent choices, the assignment is with a describing name
setupreg = MODE;
The contents of another section can be executed by:
Variables can be declared. Both for values, and signal names.
This can also be used to give meaningful names to values, as well as signals.