F
fl
Hi,
I have big difficulties when I read below FIR function description.
1. I do not know what is "4 different data type filter instance structures"
2. I do not know What is "the instance structure must be manually initialized"
The "statically initialize" is manual initialize? Or call function:
ne10_result_t ne10_fir_init_float0 (ne10_fir_instance_f32_t * S,
ne10_uint16_t numTaps,
ne10_float32_t * pCoeffs,
ne10_float32_t * pState,
ne10_uint32_t blockSize)
I have no idea at all on this question.
Thanks a lot.
--------------------------
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.
Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed intoa 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 before static initialization. The code below statically initializes each of the 4 different data type filter instance structures
ne10_fir_instance_f32_t S = {numTaps, pState, pCoeffs};
..............................
ne10_result_t ne10_fir_init_float0 (ne10_fir_instance_f32_t * S,
ne10_uint16_t numTaps,
ne10_float32_t * pCoeffs,
ne10_float32_t * pState,
ne10_uint32_t blockSize)
{
/* Assign filter taps */
S->numTaps = numTaps;
/* Assign coefficient pointer */
S->pCoeffs = pCoeffs;
/* Clear state buffer and the size of state buffer is (blockSize + numTaps - 1) */
memset (pState, 0, (numTaps + (blockSize - 1u)) * sizeof (ne10_float32_t));
/* Assign state pointer */
S->pState = pState;
return NE10_OK;
}
I have big difficulties when I read below FIR function description.
1. I do not know what is "4 different data type filter instance structures"
2. I do not know What is "the instance structure must be manually initialized"
The "statically initialize" is manual initialize? Or call function:
ne10_result_t ne10_fir_init_float0 (ne10_fir_instance_f32_t * S,
ne10_uint16_t numTaps,
ne10_float32_t * pCoeffs,
ne10_float32_t * pState,
ne10_uint32_t blockSize)
I have no idea at all on this question.
Thanks a lot.
--------------------------
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.
Use of the initialization function is optional. However, if the initialization function is used, then the instance structure cannot be placed intoa 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 before static initialization. The code below statically initializes each of the 4 different data type filter instance structures
ne10_fir_instance_f32_t S = {numTaps, pState, pCoeffs};
..............................
ne10_result_t ne10_fir_init_float0 (ne10_fir_instance_f32_t * S,
ne10_uint16_t numTaps,
ne10_float32_t * pCoeffs,
ne10_float32_t * pState,
ne10_uint32_t blockSize)
{
/* Assign filter taps */
S->numTaps = numTaps;
/* Assign coefficient pointer */
S->pCoeffs = pCoeffs;
/* Clear state buffer and the size of state buffer is (blockSize + numTaps - 1) */
memset (pState, 0, (numTaps + (blockSize - 1u)) * sizeof (ne10_float32_t));
/* Assign state pointer */
S->pState = pState;
return NE10_OK;
}