Programmer Guide/SPU Reference: Difference between revisions

From STX Wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 2: Line 2:
The SPU subsystem consists of the build-in [[#Signal_Processing_Atoms|Signal Processing Atoms]] (SP-atom), the [[Programmer_Guide/Source_code#Definition_of_SPUs|SPU ciruit defintion languange]] and the [[Programmer_Guide/Shell_Items/SPU|SPU shell items]], implementing the run-time instances of the signal processing circuits.
The SPU subsystem consists of the build-in [[#Signal_Processing_Atoms|Signal Processing Atoms]] (SP-atom), the [[Programmer_Guide/Source_code#Definition_of_SPUs|SPU ciruit defintion languange]] and the [[Programmer_Guide/Shell_Items/SPU|SPU shell items]], implementing the run-time instances of the signal processing circuits.


Advantages:
;Advantages:
*fast signal processing: SP-atoms are C++ classes using special math. libraries for acceleration
*fast signal processing: SP-atoms are C++ classes using special math. libraries for acceleration
*parallel processing: each SPU instance (can) run in a own thread
*parallel processing: each SPU instance (can) run in a own thread
*fast data exchange: data exchange using direct access (between SP-atoms) and messages (between SP-atoms and other shell items - e.g. graphs)
*fast data exchange: data exchange using direct access (between SP-atoms) and messages (between SP-atoms and other shell items - e.g. graphs)
*complex circuits: SPU instances can be inter-connected to build complex processing circuits
*complex circuits: SPU instances can be inter-connected to build complex processing circuits
*flexibility:
Note: Another way to implement signal processing algorithms is the use of the EVAL


The picture below shows a simplified block diagram of an SPU item and its connections to other shell items
The picture below shows a simplified block diagram of an SPU item and its connections to other shell items

Revision as of 14:35, 28 April 2011

The SPU subsystem consists of the build-in Signal Processing Atoms (SP-atom), the SPU ciruit defintion languange and the SPU shell items, implementing the run-time instances of the signal processing circuits.

Advantages
  • fast signal processing: SP-atoms are C++ classes using special math. libraries for acceleration
  • parallel processing: each SPU instance (can) run in a own thread
  • fast data exchange: data exchange using direct access (between SP-atoms) and messages (between SP-atoms and other shell items - e.g. graphs)
  • complex circuits: SPU instances can be inter-connected to build complex processing circuits
  • flexibility:

Note: Another way to implement signal processing algorithms is the use of the EVAL


The picture below shows a simplified block diagram of an SPU item and its connections to other shell items

Spu block diagram.png


The SPU Reference documents all integrated SPAtoms and includes a guide to writing signal processing units.

Signal processing units (SPUnits) provide the STx programmer with the possibility to create their own signal processing algorithms. Using a set of predefined atoms, the programmer can develop such things as a ...

  • synthesis circuit (e.g. additive synthesis using the ADDSYN atom)
  • real-time spectrum analyzer (using SPECTRUM and WAVEIN atoms)
  • complete speech analysis (e.g. by using the atoms F0SIFT, RMS and LPCOEFS)
  • ...

SPUnits are defined using the STx signal processing language. Once defined, they can be instantiated in an SPUnit item, or used as an 'atom' in another SPUnit.

SPU Instantiation

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

  • 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.
  • 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 and the sizes of the outputs are fixed. The outputs are, however, not connected!

The SPU outputs can be connected to the inputs of another SPU, to the inputs of a graph or to a value item. The output connection occurs after creation by the relevant macro commands. This has to happen before the beginning of the processing. 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.

Signal Processing Atoms

All build-in SP-atoms in alphabetical order: <splist parent= sort=asc sortby=title showpath=no liststyle=bar kidsonly=yes >

Navigation menu

Personal tools