| Motorola DSP Developer's Kit |
| Motorola DSP Developer's Kit |
| Motorola DSP Developer's Kit | ![]() |
X = mot###_dspround(X)
Input/Output
Algorithm
for(i=0; i<size; i++)
{
if (X[i] <= -0.5)
X[i] = -1;
else if(X[i] >= 0.5)
X[i] = 1;
else
X[i] = 0;
}
Memory & Register
X memory IN = start address of input data
X memory OUT = start address of result
Register R7 store length of input real vector X
Status Register
The assembly function round-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
The value of input vector X must be between -1.0 and +1.0.
| min-2c.asm | round-c.asm | |