Initial commit of AESA implementation.
[jump.git] / aesa / src / FFT_Radix2_DIF.h
diff --git a/aesa/src/FFT_Radix2_DIF.h b/aesa/src/FFT_Radix2_DIF.h
new file mode 100644 (file)
index 0000000..6a99b0d
--- /dev/null
@@ -0,0 +1,37 @@
+#ifndef FFT_RADIX2_DIF_H
+#define FFT_RADIX2_DIF_H
+
+#include <stdlib.h>
+#include <math.h>
+#include <dol.h>
+#include "global.h"
+
+#define NOF_FFT_PER_RANGE_BIN NUMBER_OF_PULSES/NFFT
+#define NOF_FFT_BATCHES NOF_FFT_PER_RANGE_BIN//*NUMBER_OF_RANGE_BINS
+#define PI 3.14159265359
+#define MAX_POW 10             // Maximum 1024 point FFT 
+
+#define PORT_DATA_IN "data_input"
+#define PORT_DATA_OUT "data_output"
+
+typedef struct _local_states
+{
+       // These are not needed anymore, since we are reading a vector, we don't have to save the values for till next firing.
+    // ComplexNumber Samples_Inp[NFFT];
+       // ComplexNumber Samples_Out[NFFT];
+       // int sample_counter;
+       int n_ffts;
+       int n_fft_batches;
+       int n_iterations;
+  int pow_2[MAX_POW];
+
+       int excount;
+  
+} FFT_Radix2_DIF_State;
+
+void FFT_Radix2_DIF_init(DOLProcess * p);
+int FFT_Radix2_DIF_fire(DOLProcess * p);
+void Bit_Reverse_Reorder(ComplexNumber * input, ComplexNumber * output, int N, DOLProcess * p);
+void FFT_Radix2(ComplexNumber * data, int N);
+
+#endif