Algorithm
Special Requirements
Implementation Notes
Benchmarks
void DSPF_sp_iirlat(float * x, int nx, const float * restrict
k, int nk,
float * restrict b, float * r)
{
float rt;
// output
int i, j;
for (j = 0; j < nx; j++)
{
rt = x[j];
for (i = nk - 1; i >= 0; i--)
{
rt = rt - b[i] * k[i];
b[i + 1] = b[i] + rt * k[i];
}
b[0] = rt;
r[j] = rt;
}
}
nk is a multiple of 2 and ≥ 6.
-
-
Extraneous loads are allowed (80 bytes) before the start of array.
-
The arrays k and b are double-word aligned.
-
The loop has been unrolled by 4 times.
-
Register sharing has been used to optimize on the use of registers.
-
Endianess: This code is little endian.
-
Interruptibility: This code is interrupt-tolerant but not interruptible.
Cycles
(6*floor((nk+1)/4) + 29)* nx + 25
For nk = 10, nx = 100 cycles = 4125
Code size
1024
(in bytes)
DSPF_sp_iirlat
//
DSPLIB Reference
4-49
Need help?
Do you have a question about the TMS320C67 DSP Series and is the answer not in the manual?
Questions and answers