STx 3.9 Documentation

previous

up

next

SPUnit Instantiation

The SPUnit source code defines a type of circuit. An SPUnit shell item (an executable instance of the SPUnit) is created from this source code using the "NEW SPU" command. On creation, the following steps are taken:

  1. An instance is created for all local elements. If an element is itself an SPUnit, it is replace with the internal circuitry of this SPUnit and then its local elements are instantiated. This process is continued until all SPUnit have been replaced with their most basic elements (SPUnit ). The interconnection, as defined in the function statements, is carried out at the same time as the instantiation.
  2. The second step initializes all the SPAtoms. All constant arguments are evaluated and used as initialization parameters for the SPAtoms. Additionally, all connections are tested (i.e. are all the necessary inputs available? Are all the data types compatible and valid?).

On completion of this ‚compilation' procedure, the SPUnit item is ready for use. A new process is started which is responsible for the control and execution of the item. On creation of an item, all initializations (parameters) and connections (inputs) are carried out. The data types (numbers, vectors, strings) and sizes (vectors) are fixed. The outputs are, however, not connected!

The output connection occurs after creation by the relevant macro command (e.g SET $#gname Y $#yindex $#SPUsynn.y FUNCTION $#splitter RED LINES SOLID $#linewidth /Apply). This has to happen before the beginning of the processing (i.e. before the $#SPUsynn RUN $#n). An active (running) SPU item's connections cannot be changed (created or destroyed).

Because SPUs run in separated threads, a message handler has to be installed before the SPU is started. The most important message sent by an SPU is the STOP message. This message indicates that the processing (and therefore the data exchange with other items) has finished.

© 2009 The Austrian Academy of Sciences Acoustics Research Institute