Texas Instruments TMS320C64X Programmer's Reference Manual page 76

Dsp little-endian dsp library
Hide thumbs Also See for TMS320C64X:
Table of Contents

Advertisement

DSP_fir_r8
DSP_fir_r8
Function
Arguments
Description
Algorithm
Special Requirements
4-48
FIR Filter (when the number of coefficients is a multiple of 8)
void DSP_fir_r8_hM16_rM8A8X8 (short *x, short *h, short *r, int nh, int nr)
x[nr+nh−1]
Pointer to input array of size nr + nh – 1.
h[nh]
Pointer to coefficient array of size nh (coefficients must be in
reverse order).
r[nr]
Pointer to output array of size nr. Must be word aligned.
Number of coefficients. Must be multiple of 8, ≥ 8.
nh
nr
Number of samples to calculate. Must be multiple of 4.
Computes a real FIR filter (direct-form) using coefficients stored in vector h[ ].
The real data input is stored in vector x[ ]. The filter output result is stored in
vector r[ ]. This FIR operates on 16-bit data with a 32-bit accumulate. The filter
calculates nr output samples using nh coefficients.
This is the C equivalent of the assembly code without restrictions. Note that
the assembly code is hand optimized and restrictions may apply.
void DSP_fir_r8 (short *x, short *h, short *r, int nh, int nr)
{
int i, j, sum;
for (j = 0; j < nr; j++) {
sum = 0;
for (i = 0; i < nh; i++)
sum += x[i + j] * h[i];
r[j] = sum >> 15;
}
}
-
The number of coefficients, nh, must be a multiple of 8 and greater than
or equal to 8. Coefficients must be in reverse order.
-
The number of outputs computed, nr, must be a multiple of 4 and greater
than or equal to 4.
-
Array r[ ] must be word aligned.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tms320c64x+

Table of Contents