| Electronic Components Datasheet Search |
|
UM0304 Datasheet(PDF) 10 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0304 Datasheet(HTML) 10 Page - STMicroelectronics |
|
10 / 19 page ![]() Block FIR 16-bit filter UM0304 10/19 3.3.2 Calling the function from Assembly Use the following registers equivalent to arguments/variables. ● Move N to R3, N is output filter length or output vector length, a multiple of 6 ● Move SP to R2, comparable &p as in C function above h[T] = filter coefficient vector with T number of taps, T is an integer multiple of 6 ● Set R1 to the address of x, comparable as in x[M] filter input vector with total M samples, i.e., (M = N + T - 1) ● Set R0 to the address of y, comparable as in y[N] filter output vector with total N samples Then use BL instruction to call the function. 3.4 Algorithm Following is the C equivalent of the assembly code. Note that the assembly code is hand optimized and restrictions may apply. Block FIR Filter Reference C Source void fir_16by16_arm9e(short input, int nt, short h[], short z[]) { int j; short acc; /* store input at the beginning of the delay line */ z[0] = input; /* calc FIR */ acc = 0; for (j = 0; j < nt; j++) { acc += h[j] * z[j]; } /* shift delay line */ for (j = nt - 2; j >= 0; j--) { z[j + 1] = z[j]; } return acc; } 3.5 Assembly code The assembly code for this block FIR 16-bit fixed-point filter algorithm is validated in STR91x environment for ARM966E-S. The assembly code is for 16-bit fixed point applications, and |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |