Programmer Guide/SPU Reference/AVR: Difference between revisions

From STX Wiki
Jump to navigationJump to search
(initial import)
 
m (1 revision: Initial import)
(No difference)

Revision as of 17:31, 18 November 2010

AVR - averaging

Usage:

AVR X TYP T RS

Inputs:
X
A number or vector.
TYP
A string or number selecting the averaging method.
T
A number used as parameter for some methods.
RS
Reset input (see the function description).
Outputs:
Y
The ("time") average of X (same type as X).
N
The number of average cycles since the last reset (number).
Function:

Compute an average of input X. The averaging is performed across a specified or infinite number of evaluation cycles. If input X is a vector, each element of the vector is "time"-averaged. In the table X(t)/Y(t) is used for the input/output number or one input/output vector element in the evaluation cycle t.

Table 5: Averaging and selection methods

value of TYP averaging or selection method
0 or LINEAR If T is greater than 0 it is used as number of average cycles:

File:1205.pngOtherwise (T=0) an infinite average period is used:File:1206.png

1 or EXPONENTIAL File:1207.pngwith: k = U1/2 and 0 < T < 1
2 or MINIMUM File:1208.png
3 or MAXIMUM File:1209.png

The input RS can be used to reset the averager when the SPU is restarted. If RS is set to 1 the averager is reinitialised and the cycle counter (t) is set to zero. Note: the RS input is checked only once when the SPU (containing the averager atom) receives the start-command.

Navigation menu

Personal tools