| 数据搜索系统,热门电子元器件搜索 |
|
PM0014 数据表(PDF) 39 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0014 数据表(HTML) 39 Page - STMicroelectronics |
|
39 / 46 page ![]() PM0014 Signal processing library functions 39/46 6.3.3 fir_q31_q31_q31 fir_q31_q31_q31(struct Filter *FirPtr). Description: Real FIR filter of 32-bit fractional inputs, coefficients and outputs. Argument: FirPtr Filter pointer. Algorithm: y(n) = bi * x(n - i) Note: The delay line must be stored in DPRAM. Its size is 2*2*nb_coeff. Before the first call to the function, the delay line must be initialized to 0. There is a saturation to 1 (respectively -1) if the computed output sample is greater than 1 (respectively lower than -1). Example of the use for fir_q31_q31_q31: #define FirNumberCoeffs NumberOfCoefficients #define NbOutput NumberOfOutputSamples iram short Delayline[FirNumberCoeffs]; iram short Coeff[2*FirNumberCoeffs];//coef are 32-bit wide void main () { // Data definition short Input[2*NbOutput];//Input are 32-bit wide short Out[2* NbOutput];//Output are 32-bit wide // Here should be the coef[] and input[] initialization. See the Test part... // Declare a filter structure struct Filter *Filt; // Initialisation of filt Filt.NumberCoeffs = FirNumberCoeffs; Filt.NumberOutputSamples = NbOutput; Filt.CoeffPtr = Coeff; Filt.InputPtr = Input; Filt.OutputPtr = Out; Filt.DelayLinePtr = Delayline; //Filter processing fir_q31_q31_q31(&Filt); } Coefficients must be stored in memory as follows: addr Filt.CoeffPtr ----> a0 lsb addr Filt.CoeffPtr + 2 ----> a0 msb ... addr Filt.CoeffPtr + 4 *(FirNumberCoeffs -2)----> aFirNumberCoeffs-1 msb Inputs and Outputs are stored in memory as follows: addr Filt.InputPtr ----> x0 lsb addr Filt.InputPtr + 2 ----> x0 msb ... addr Filt.Input + 4 *(NbOutput -2)----> aNbOutput-1 msb addr Filt.OutputPtr ----> y0 lsb addr Filt.OutputPtr + 2 ----> y0 msb ... addr Filt.OutputPtr + 4 *(NbOutput -2)----> aNbOutput-1 msb i0 = nbcoeff 1 – |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |