dol: fix shm_t contain the shm-buffers
[jump.git] / aesa / src / FFT_Radix2_DIF.h
1 #ifndef FFT_RADIX2_DIF_H
2 #define FFT_RADIX2_DIF_H
3
4 #include <stdlib.h>
5 #include <math.h>
6 #include <dol.h>
7 #include "global.h"
8
9 #define NOF_FFT_PER_RANGE_BIN NUMBER_OF_PULSES/NFFT
10 #define NOF_FFT_BATCHES NOF_FFT_PER_RANGE_BIN//*NUMBER_OF_RANGE_BINS
11 #define PI 3.14159265359
12 #define MAX_POW 10              // Maximum 1024 point FFT 
13
14 #define PORT_DATA_IN "data_input"
15 #define PORT_DATA_OUT "data_output"
16
17 typedef struct _local_states
18 {
19         // These are not needed anymore, since we are reading a vector, we don't have to save the values for till next firing.
20     // ComplexNumber Samples_Inp[NFFT];
21         // ComplexNumber Samples_Out[NFFT];
22         // int sample_counter;
23         int n_ffts;
24         int n_fft_batches;
25         int n_iterations;
26   int pow_2[MAX_POW];
27
28         int excount;
29   
30 } FFT_Radix2_DIF_State;
31
32 void FFT_Radix2_DIF_init(DOLProcess * p);
33 int FFT_Radix2_DIF_fire(DOLProcess * p);
34 void Bit_Reverse_Reorder(ComplexNumber * input, ComplexNumber * output, int N, DOLProcess * p);
35 void FFT_Radix2(ComplexNumber * data, int N);
36
37 #endif