Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit |
Motorola DSP Developer's Kit | ![]() ![]() |
[ X ] = mot###_max( X, Y )
Input/Output
Input: Complex Vector X (include real part Xr and imaginary part Xi), Complex Vector Y (include real part Yr and imaginary part Yi)
Output: Complex Vector X (include real part Xr and imaginary Xi)
Algorithm
for(i=0; i<size; i++) { xValue = Xr[i]* Xr[i] + Xi[i]* Xi[i]; yValue = Yr[i]* Yr[i] + Yi[i]* Yi[i]; if(xValue < yValue) X[i] = Y[i]; }
Memory & Register
Start address of Vector X is in P:$F000
Start address of Vector Y is in P:$F001
Start address of result Vector is also in P:$F000
Register R7 stores the number of items in the array
Status Register
The assembly function max-2c.asm does not explicitly set any status registers/bits during the function execution.
Data Size Limit
The length of input vectors 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.
![]() | max-2r.asm | mean-r.asm | ![]() |