Initial commit of AESA implementation.
[jump.git] / aesa / src / FIR.h
1 #ifndef FIR_H
2 #define FIR_H
3
4 #include <stdlib.h>
5 #include <math.h>
6 #include <dol.h>
7 #include "global.h"
8
9 #define FIR_LENGTH 4 // to be changed, as needed
10
11 #define PORT_DATA_IN "data_input"
12 #define PORT_DATA_OUT "data_output"
13
14 typedef struct _local_states 
15 {
16   ComplexNumber Coeffs[FIR_LENGTH];
17   ComplexNumber Samples[FIR_LENGTH];
18   // int bin_counter;
19   int pulse_counter;
20   int n_iterations;
21
22         int excount;
23   
24 } FIR_State;
25
26 void FIR_init(DOLProcess*);
27 int FIR_fire(DOLProcess*);
28
29 void FIR_reset_samples(DOLProcess*);
30 void FIR_insert_sample(DOLProcess*, ComplexNumber);
31 void FIR_compute(DOLProcess*, ComplexNumber*);
32   
33 #endif