Programmer Guide/Shell Items/SPU: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 18: Line 18:




An SPU without its own thread does not send messages and cannot be used in a multi-SPU circuit (i.e. cannot be connected to other SPU's). This type of SPU should only be used for short computations (e.g. initialize graph scales, compute parameter statistics) because the macro command processing is suspended while the SPU is running.See [[Programmer Guide/Macro Library/FOREVER|SPU Item Commands]] for the <code>SET</code> commands and [[Programmer Guide/Shell Items/SPU/SPU Item Attributes|SPU Item Attributes]] for a list of attributes.
An SPU without its own thread (created with '''/Nothread''')does not send messages and cannot be used in a multi-SPU circuit (i.e. cannot be connected to other SPU's). This type of SPU should only be used for short computations (e.g. initialize graph scales, compute parameter statistics) because the macro command processing is suspended while the SPU is running.





Revision as of 12:01, 28 April 2011

A SPU is a shell item for controlling Signal Processing Units (SPUs). An SPU is a circuit connecting one or more Signal Processing Atom together. The ciruit (its SP-atoms, inputs, outputs and internal connections) is defined in a SPU section of a source file, which must be loaded before the SPU item (the runtime instance of the circuit) can be created.

SPU Item Creation

An SPU item is created using the NEW SPU command.

NEW SPU spuname spusource inval1 ... [/Nothread] [ /G ]
spuname
the name of the SPU item; the asterisk (*) can be used to assign an automatically created unique name
spusource
the name of a loaded SPU source code
inval1, ...
the values for the SPU inputs; the values must be specified in the order defined in the SPU source header
/Nothread
do not create a SPU thread (SPU runs in the shell's thread);
/G
create a temporary SPU item; use this option only together with /Nothread

The command creates a run-time SPU item named spuname which is based on the loaded SPU source code spusource. The arguments inval1, ... are the parameters and inputs of the SPU and can be:

  1. constant numeric or string expressions,
  2. outputs of other SPU items or
  3. outputs of value items.

The inputs are assigned during SPU creation and cannot be changed later! If the command is successful, the new SPU item is initialized and put into stop mode. The option /Nothread means that rather than creating an SPU-thread, the SPU runs in the shell's thread (this means the macro processing is blocked while the SPU is running).


An SPU without its own thread (created with /Nothread)does not send messages and cannot be used in a multi-SPU circuit (i.e. cannot be connected to other SPU's). This type of SPU should only be used for short computations (e.g. initialize graph scales, compute parameter statistics) because the macro command processing is suspended while the SPU is running.


<splist parent= sort=asc sortby=title showpath=no liststyle=unordered kidsonly=yes >

Navigation menu

Personal tools