Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit | ![]() ![]() |
[y, index] = mot###_min(X)
Input/Output
Output: Real value Y (smallest element of X), index
Algorithm
#define IN0 MinValue = X[0]; Index = 0; for(i=1; i<size; i++) { if(X[i] < MinValue) { MinValue = X[i]; index = i; } }
Memory & Register
Label IN present location of input real vector X.
Register A store Min-1r Result y
R1 = Index of largest element of X
R4 = Number of items in the array
Status Register
The assembly function max-1r-r.asm does not explicitly set any status registers/bits during the function execution.
Data Size Limit
The length of vector X can't be larger than the continuous available data memory size.
Data Range Limit
Input data vector X range [-1.0, +1.0]
Precision
In the case of DSP563, precision is 23 bits.
In the case of DSP566, precision is 15 bits.
Performance Limit
![]() | mean-c.asm | min-1c.asm | ![]() |