From 96d6da4e252b06dcfdc041e7df23e86161c33007 Mon Sep 17 00:00:00 2001 From: rihab kouki Date: Tue, 28 Jul 2020 11:24:49 +0100 Subject: Official ARM version: v5.6.0 --- docs/DSP/html/group__FIR__Lattice.html | 164 ++++++++++++++++----------------- 1 file changed, 77 insertions(+), 87 deletions(-) (limited to 'docs/DSP/html/group__FIR__Lattice.html') diff --git a/docs/DSP/html/group__FIR__Lattice.html b/docs/DSP/html/group__FIR__Lattice.html index 2eaca9d..a389848 100644 --- a/docs/DSP/html/group__FIR__Lattice.html +++ b/docs/DSP/html/group__FIR__Lattice.html @@ -32,7 +32,7 @@ Logo
CMSIS-DSP -  Version 1.5.2 +  Version 1.7.0
CMSIS DSP Software Library
@@ -116,59 +116,60 @@ $(document).ready(function(){initNavTree('group__FIR__Lattice.html','');}); - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +

Functions

void arm_fir_lattice_f32 (const arm_fir_lattice_instance_f32 *S, float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
 Processing function for the floating-point FIR lattice filter. More...
 
void arm_fir_lattice_init_f32 (arm_fir_lattice_instance_f32 *S, uint16_t numStages, float32_t *pCoeffs, float32_t *pState)
 Initialization function for the floating-point FIR lattice filter. More...
 
void arm_fir_lattice_init_q15 (arm_fir_lattice_instance_q15 *S, uint16_t numStages, q15_t *pCoeffs, q15_t *pState)
 Initialization function for the Q15 FIR lattice filter. More...
 
void arm_fir_lattice_init_q31 (arm_fir_lattice_instance_q31 *S, uint16_t numStages, q31_t *pCoeffs, q31_t *pState)
 Initialization function for the Q31 FIR lattice filter. More...
 
void arm_fir_lattice_q15 (const arm_fir_lattice_instance_q15 *S, q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Processing function for the Q15 FIR lattice filter. More...
 
void arm_fir_lattice_q31 (const arm_fir_lattice_instance_q31 *S, q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
 Processing function for the Q31 FIR lattice filter. More...
 
void arm_fir_lattice_f32 (const arm_fir_lattice_instance_f32 *S, const float32_t *pSrc, float32_t *pDst, uint32_t blockSize)
 Processing function for the floating-point FIR lattice filter. More...
 
void arm_fir_lattice_init_f32 (arm_fir_lattice_instance_f32 *S, uint16_t numStages, const float32_t *pCoeffs, float32_t *pState)
 Initialization function for the floating-point FIR lattice filter. More...
 
void arm_fir_lattice_init_q15 (arm_fir_lattice_instance_q15 *S, uint16_t numStages, const q15_t *pCoeffs, q15_t *pState)
 Initialization function for the Q15 FIR lattice filter. More...
 
void arm_fir_lattice_init_q31 (arm_fir_lattice_instance_q31 *S, uint16_t numStages, const q31_t *pCoeffs, q31_t *pState)
 Initialization function for the Q31 FIR lattice filter. More...
 
void arm_fir_lattice_q15 (const arm_fir_lattice_instance_q15 *S, const q15_t *pSrc, q15_t *pDst, uint32_t blockSize)
 Processing function for Q15 FIR lattice filter. More...
 
void arm_fir_lattice_q31 (const arm_fir_lattice_instance_q31 *S, const q31_t *pSrc, q31_t *pDst, uint32_t blockSize)
 Processing function for the Q31 FIR lattice filter. More...
 

Description

This set of functions implements Finite Impulse Response (FIR) lattice filters for Q15, Q31 and floating-point data types. Lattice filters are used in a variety of adaptive filter applications. The filter structure is feedforward and the net impulse response is finite length. The functions operate on blocks of input and output data and each call to the function processes blockSize samples through the filter. pSrc and pDst point to input and output arrays containing blockSize values.

-
Algorithm:
+
Algorithm
FIRLattice.gif
Finite Impulse Response Lattice filter
- The following difference equation is implemented:
+ The following difference equation is implemented: 
+
     f0[n] = g0[n] = x[n]
     fm[n] = fm-1[n] + km * gm-1[n-1] for m = 1, 2, ...M
     gm[n] = km * fm-1[n] + gm-1[n-1] for m = 1, 2, ...M
     y[n] = fM[n]
- 
+
pCoeffs points to tha array of reflection coefficients of size numStages. Reflection Coefficients are stored in the following order.
     {k1, k2, ..., kM}
- 
where M is number of stages
+ where M is number of stages
pState points to a state array of size numStages. The state variables (g values) hold previous inputs and are stored in the following order.
-    {g0[n], g1[n], g2[n] ...gM-1[n]}
- 
The state variables are updated after each block of data is processed; the coefficients are untouched.
+ {g0[n], g1[n], g2[n] ...gM-1[n]} + The state variables are updated after each block of data is processed; the coefficients are untouched.
Instance Structure
The coefficients and state variables for a filter are stored together in an instance data structure. A separate instance structure must be defined for each filter. Coefficient arrays may be shared among several instances while state variable arrays cannot be shared. There are separate instance structure declarations for each of the 3 supported data types.
Initialization Functions
There is also an associated initialization function for each data type. The initialization function performs the following operations:
  • Sets the values of the internal structure fields.
  • -
  • Zeros out the values in the state buffer. To do this manually without calling the init function, assign the follow subfields of the instance structure: numStages, pCoeffs, pState. Also set all of the values in pState to zero.
  • +
  • Zeros out the values in the state buffer. To do this manually without calling the init function, assign the follow subfields of the instance structure: numStages, pCoeffs, pState. Also set all of the values in pState to zero.
Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed into a const data section. To place an instance structure into a const data section, the instance structure must be manually initialized. Set the values in the state buffer to zeros and then manually initialize the instance structure as follows:
-arm_fir_lattice_instance_f32 S = {numStages, pState, pCoeffs};
-arm_fir_lattice_instance_q31 S = {numStages, pState, pCoeffs};
-arm_fir_lattice_instance_q15 S = {numStages, pState, pCoeffs};
- 
-
where numStages is the number of stages in the filter; pState is the address of the state buffer; pCoeffs is the address of the coefficient buffer.
+ arm_fir_lattice_instance_f32 S = {numStages, pState, pCoeffs}; + arm_fir_lattice_instance_q31 S = {numStages, pState, pCoeffs}; + arm_fir_lattice_instance_q15 S = {numStages, pState, pCoeffs}; + +
where numStages is the number of stages in the filter; pState is the address of the state buffer; pCoeffs is the address of the coefficient buffer.
Fixed-Point Behavior
Care must be taken when using the fixed-point versions of the FIR Lattice filter functions. In particular, the overflow and saturation behavior of the accumulator used in each function must be considered. Refer to the function specific documentation below for usage guidelines.

Function Documentation

- +
@@ -181,7 +182,7 @@ Finite Impulse Response Lattice filter - + @@ -205,20 +206,18 @@ Finite Impulse Response Lattice filter
Parameters
float32_tconst float32_t pSrc,
- - - - + + + +
[in]*Spoints to an instance of the floating-point FIR lattice structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data
[in]blockSizenumber of samples to process.
[in]Spoints to an instance of the floating-point FIR lattice structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process
-
Returns
none.
- -

References blockSize, arm_fir_lattice_instance_f32::numStages, arm_fir_lattice_instance_f32::pCoeffs, and arm_fir_lattice_instance_f32::pState.

+
Returns
none
- +
@@ -237,7 +236,7 @@ Finite Impulse Response Lattice filter - + @@ -255,20 +254,18 @@ Finite Impulse Response Lattice filter
Parameters
float32_tconst float32_t pCoeffs,
- - - - + + + +
[in]*Spoints to an instance of the floating-point FIR lattice structure.
[in]numStagesnumber of filter stages.
[in]*pCoeffspoints to the coefficient buffer. The array is of length numStages.
[in]*pStatepoints to the state buffer. The array is of length numStages.
[in]Spoints to an instance of the floating-point FIR lattice structure
[in]numStagesnumber of filter stages
[in]pCoeffspoints to the coefficient buffer. The array is of length numStages
[in]pStatepoints to the state buffer. The array is of length numStages
-
Returns
none.
- -

References arm_fir_lattice_instance_f32::numStages, arm_fir_lattice_instance_f32::pCoeffs, and arm_fir_lattice_instance_f32::pState.

+
Returns
none
- +
@@ -287,7 +284,7 @@ Finite Impulse Response Lattice filter - + @@ -305,20 +302,18 @@ Finite Impulse Response Lattice filter
Parameters
q15_tconst q15_t pCoeffs,
- - - - + + + +
[in]*Spoints to an instance of the Q15 FIR lattice structure.
[in]numStagesnumber of filter stages.
[in]*pCoeffspoints to the coefficient buffer. The array is of length numStages.
[in]*pStatepoints to the state buffer. The array is of length numStages.
[in]Spoints to an instance of the Q15 FIR lattice structure
[in]numStagesnumber of filter stages
[in]pCoeffspoints to the coefficient buffer. The array is of length numStages
[in]pStatepoints to the state buffer. The array is of length numStages
-
Returns
none.
- -

References arm_fir_lattice_instance_q15::numStages, arm_fir_lattice_instance_q15::pCoeffs, and arm_fir_lattice_instance_q15::pState.

+
Returns
none
- +
@@ -337,7 +332,7 @@ Finite Impulse Response Lattice filter - + @@ -355,20 +350,18 @@ Finite Impulse Response Lattice filter
Parameters
q31_tconst q31_t pCoeffs,
- - - - + + + +
[in]*Spoints to an instance of the Q31 FIR lattice structure.
[in]numStagesnumber of filter stages.
[in]*pCoeffspoints to the coefficient buffer. The array is of length numStages.
[in]*pStatepoints to the state buffer. The array is of length numStages.
[in]Spoints to an instance of the Q31 FIR lattice structure
[in]numStagesnumber of filter stages
[in]pCoeffspoints to the coefficient buffer. The array is of length numStages
[in]pStatepoints to the state buffer. The array is of length numStages
-
Returns
none.
- -

References arm_fir_lattice_instance_q31::numStages, arm_fir_lattice_instance_q31::pCoeffs, and arm_fir_lattice_instance_q31::pState.

+
Returns
none
- +
@@ -381,7 +374,7 @@ Finite Impulse Response Lattice filter - + @@ -403,22 +396,21 @@ Finite Impulse Response Lattice filter
q15_tconst q15_t pSrc,
+

Processing function for the Q15 FIR lattice filter.

Parameters
- - - - + + + +
[in]*Spoints to an instance of the Q15 FIR lattice structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data
[in]blockSizenumber of samples to process.
[in]Spoints to an instance of the Q15 FIR lattice structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process
-
Returns
none.
- -

References __PKHBT, __SIMD32, blockSize, arm_fir_lattice_instance_q15::numStages, arm_fir_lattice_instance_q15::pCoeffs, and arm_fir_lattice_instance_q15::pState.

+
Returns
none
- +
@@ -431,7 +423,7 @@ Finite Impulse Response Lattice filter - + @@ -455,17 +447,15 @@ Finite Impulse Response Lattice filter
Parameters
q31_tconst q31_t pSrc,
- - - - + + + +
[in]*Spoints to an instance of the Q31 FIR lattice structure.
[in]*pSrcpoints to the block of input data.
[out]*pDstpoints to the block of output data
[in]blockSizenumber of samples to process.
[in]Spoints to an instance of the Q31 FIR lattice structure
[in]pSrcpoints to the block of input data
[out]pDstpoints to the block of output data
[in]blockSizenumber of samples to process
-
Returns
none.
-

Scaling and Overflow Behavior: In order to avoid overflows the input signal must be scaled down by 2*log2(numStages) bits.

- -

References blockSize, arm_fir_lattice_instance_q31::numStages, arm_fir_lattice_instance_q31::pCoeffs, and arm_fir_lattice_instance_q31::pState.

+
Returns
none
+
Scaling and Overflow Behavior
In order to avoid overflows the input signal must be scaled down by 2*log2(numStages) bits.
@@ -474,7 +464,7 @@ Finite Impulse Response Lattice filter