Functions
Collaboration diagram for DSPF_sp_fir_gen:

Functions

void DSPF_sp_fir_gen (const float *restrict x, const float *restrict h, float *restrict r, int nh, int nr)
 

Detailed Description

Function Documentation

◆ DSPF_sp_fir_gen()

void DSPF_sp_fir_gen ( const float *restrict  x,
const float *restrict  h,
float *restrict  r,
int  nh,
int  nr 
)

This routine implements a block FIR filter. There are “nh” filter coefficients, “nr” output samples, and “nh+nr-1” input samples. The coefficients need to be placed in the “h” array in reverse order {h(nh-1), ... , h(1), h(0)} and the array “x” starts at x(-nh+1) and ends at x(nr-1). The routine calculates y(0) through y(nr-1) using the following formula:
y(n) = h(0)*x(n) + h(1)*x(n-1) + ... + h(nh-1)*x(n-nh+1)
where n = {0, 1, ... , nr-1}.

Parameters
xPointer to array holding the input floating-point array
hPointer to array holding the coefficient floating-point array
rPointer to output array
nhNumber of coefficents
nrNumber of output values
Algorithm:
DSPF_sp_fir_gen_cn.c is the natural C equivalent of the optimized linear assembly code without restrictions. Note that the linear assembly code is optimized and restrictions may apply.
Assumptions:
nr is a multiple of 4 and greater than or equal to 4.
nh is a multiple of 4 and greater than or equal to 4.
x, h and r are double-word aligned.
Implementation Notes:
Interruptibility: The code is interruptible.
Endian Support: The code supports both big and little endian modes.

Copyright 2022, Texas Instruments Incorporated