Initial commit of AESA implementation.
[jump.git] / aesa / src / FIR.h
diff --git a/aesa/src/FIR.h b/aesa/src/FIR.h
new file mode 100644 (file)
index 0000000..12ea765
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef FIR_H
+#define FIR_H
+
+#include <stdlib.h>
+#include <math.h>
+#include <dol.h>
+#include "global.h"
+
+#define FIR_LENGTH 4 // to be changed, as needed
+
+#define PORT_DATA_IN "data_input"
+#define PORT_DATA_OUT "data_output"
+
+typedef struct _local_states 
+{
+  ComplexNumber Coeffs[FIR_LENGTH];
+  ComplexNumber Samples[FIR_LENGTH];
+  // int bin_counter;
+  int pulse_counter;
+  int n_iterations;
+
+       int excount;
+  
+} FIR_State;
+
+void FIR_init(DOLProcess*);
+int FIR_fire(DOLProcess*);
+
+void FIR_reset_samples(DOLProcess*);
+void FIR_insert_sample(DOLProcess*, ComplexNumber);
+void FIR_compute(DOLProcess*, ComplexNumber*);
+  
+#endif