| Motorola DSP Developer's Kit |
| Motorola DSP Developer's Kit |
| Motorola DSP Developer's Kit | ![]() |
[Dr, Di, Zfr, Zfi] = mot###_filter(Br, Bi, Ar, Ai, Cr, Ci, Zir, Zii)
Input/Output
Input: Complex vector A, vector B, vector C, and vector Zi
Output: Complex vector D, and vector Zf
Algorithm
// Zi should be increased by adding one zero value to it.
// The length of Zi will be equal to Max(LengthA, LengthB)
LengthD = LengthC
for (j = 1; j <= LenghtD; j++ ) {
if ( Abs ( A[1] ) != 1 ) {
D[j] = (A[1]*B[1]*C[j] - A[1]*BI[1]*CI[j] + AI[1]*B[1]*CI[j]
+ AI[1]*BI[1]*C[j]) / (A[1]*A[1] + AI[1]*AI[1]) + Zi[1];
DI[j] = (A[1]*B[1]*CI[j] + A[1]*BI[1]*C[j] + AI[1]*BI[1]*CI[j]
- AI[1]*B[1]*C[j]) / (A[1]*A[1] + AI[1]*AI[1]) + ZiI[1];
for (i = 1; i <= (LengthZi - 1); i ++) {
Zi[i] = (A[1]*B[i+1]*C[j] - A[1]*BI[i+1]*CI[j] +
AI[1]*B[i+1]*CI[j] + AI[1]*BI[i+1]*C[j]
- A[1]*A[i+1]*D[j] + A[1]*AI[i+1]*DI[j]
- AI[1]*A[i+1]*DI[j] - AI[1]*AI[i+1]*D[j]) /
(A[1]*A[1] + AI[1]*AI[1]) + Zi[i+1];
ZiI[i] = (A[1]*B[i+1]*CI[j] + A[1]*BI[i+1]*C[j] +
AI[1]*BI[i+1]*CI[j] - AI[1]*B[i+1]*C[j]
- A[1]*A[i+1]*DI[j] - A[1]*AI[i+1]*D[j]
- AI[1]*AI[i+1]*DI[j] + AI[1]*A[i+1]*D[j]) /
(A[1]*A[1] + AI[1]*AI[1]) + ZiI[i+1];
}
}
else {
D[j] = B[1]*C[j] - BI[1]*CI[j] + Zi[1];
DI[j] = BI[1]*C[j] + B[1]*CI[j] + ZiI[1];
for (i = 1; i <= (LengthZi - 1); i ++) {
Zi[i] = B[i+1]*C[j] - BI[i+1]*CI[j] + Zi[i+1]
- A[i+1]*D[j] + AI[i+1]*DI[j];
ZiI[i] = BI[i+1]*C[j] + B[i+1]*CI[j] + ZiI[i+1]
- AI[i+1]*D[j] - A[i+1]*DI[j];
Memory & Register
Status Register
The assembly function filter-c.asm does not set explicitly any status registers/bits during the function execution.
Data Size Limit
The length of vector C can't be larger than the continuous available data memory size.
Data Range Limit
The value of input vectors must be between -1.0 and +1.0.
Precision
In the case of DSP563, the precision is 21 bits.
In the case of DSP566, the precision is 12 bits
Performance Limit
| filter-r.asm | ifft-r.asm | |