1 int comp_fir_basic(int input[], int h[], int z[], int N,int n)
\r
9 /* store input at the beginning of the delay line */
\r
11 for (i = 0; i < 3; i=i+1) {
\r
15 /* shift delay line */
\r
16 for (j = 2; j >=0; j=j-1) {
\r
24 int comp_fir16(int in[], int c[], int out[], int size) {
\r
26 int x[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
\r
29 for (j=0;j<size;j++) {
\r
31 for(i=0;i<16;i=i+1){
\r
32 tmp = (x[adx]*c[i])*(2^16);
\r
42 int comp_ifFor (int a, int b, int pas) {
\r
45 for (i = 0; i < a; i=i+pas) {
\r
47 result = result + i;
\r
56 int comp_total (int tabParam[], int a, int b) {
\r
58 int tabLocal1[10] = {0,0,0,0,0,0,0,0,0,0};
\r
59 int tabLocal2[10] = {0,0,0,0,0,0,0,0,0,0};;
\r
61 for (i = 0; i <= a; i++) {
\r
62 tabLocal1[i] = tabParam[a-i];
\r
66 for (k = 0; k < a; k++) {
\r
67 for (j = b; j > 0; j--) {
\r
68 tabParam[k] = tabLocal1[k]+tabLocal2[j];
\r
75 int comp_tri (int t[], int n) {
\r
79 for(i = 0 ; (i < n); i=i+1)
\r
81 for(j = 1 ; j < n- i ; j=j+1)
\r
93 int comp_forif2 (int u[], int v[], int a, int b){
\r
97 for (i=0;i<a;i=i+1) {
\r
100 for (j=0;j<b;j=j+1) {
\r
103 if (k%2 == 0 && l%2 == 0) {
\r
106 else if (k%2 == 0) {
\r
109 else if (l%2 == 0) {
\r
120 for (i=0;i<10;i=i+1) {
\r
122 if (i % 2 == 0) {k=k+1;}
\r
129 int t[16] = {10,9,8,7,6,0,5,4,3,2,0,0,0,0,0,0};
\r
130 a = comp_fir_basic(t,t,t,10,10);
\r
131 a = comp_fir16(t,t,t,16);
\r
132 a = comp_ifFor(4,1,1);
\r
133 a = comp_total(t,9,3);
\r
134 a = comp_tri(t,10);
\r
135 a = comp_forif2(t,t,10,10);
\r