fun_ofdm
1.0
802.11a Physical Layer for USRP
|
The fft class. More...
#include <fft.h>
Public Member Functions | |
fft (int fft_length) | |
Constructor for fft object. More... | |
void | forward (std::complex< double > data[64]) |
In place 64 point forward FFT. More... | |
void | inverse (std::vector< std::complex< double > > &data) |
In place inverse FFT of input data. More... | |
Private Attributes | |
int | m_fft_length |
Length of FFT. In 802.11a it is always a 64 Point FFT since There are 64 subcarriers. More... | |
fftw_complex * | m_fftw_in_forward |
Forward input buffer for use by fftw3 library. More... | |
fftw_complex * | m_fftw_out_forward |
Forward output buffer for use by fftw3 library. More... | |
fftw_complex * | m_fftw_in_inverse |
Inverse input buffer for use by fftw3 library. More... | |
fftw_complex * | m_fftw_out_inverse |
Inverse output buffer for use by fftw3 library. More... | |
fftw_plan | m_fftw_plan_forward |
Forward FFT plan for use by fftw3 library. More... | |
fftw_plan | m_fftw_plan_inverse |
Inverse FFT plan for use by fftw3 library. More... | |
Static Private Attributes | |
static const int | fft_map [64] |
Mapping to/from FFT order. More... | |
The fft class.
This class contains is a wrapper for the fftw3 library and contains the functions and necessary parameters for performing the IFFTs and FFTs in the transmit and receive chains respectively.
fun::fft::fft | ( | int | fft_length) |
Constructor for fft object.
fft_length | length of FFT - i.e. 64 point FFT |
-Initializations:
Definition at line 30 of file fft.cpp.
References m_fft_length, m_fftw_in_forward, m_fftw_in_inverse, m_fftw_out_forward, m_fftw_out_inverse, m_fftw_plan_forward, and m_fftw_plan_inverse.
void fun::fft::forward | ( | std::complex< double > | data[64]) |
In place 64 point forward FFT.
data | Array of 64 complex samples in time domain to be converted to frequency domain. |
This function performs a single in-place 64 point FFT on the 64 complex data samples. The user must loop over time-domain signal and pass each 64 sample symbol to this function individually. This function handles the shifting from all positive (0-63) indexing to positive & negative frequency indexing.
Definition at line 50 of file fft.cpp.
References fft_map, m_fft_length, m_fftw_in_forward, m_fftw_out_forward, and m_fftw_plan_forward.
Referenced by fun::fft_symbols::work().
void fun::fft::inverse | ( | std::vector< std::complex< double > > & | data) |
In place inverse FFT of input data.
data | Vector of complex doubles in frequency domain to be converted to time domain. The length of the data vector must be an integer multiple of m_fft_length. |
This function loops over the input vector (which must be an integer multiple of 64) and performs in-place 64 point IFFTs on each consecutive 64 sample chunk of the input vector. This function handles the shifting from positive & negative frequency (-32 to 31) indexing to all positive (0 to 63) indexing. This function also scales the output by 1/64 to be consistent with the IFFT function.
Definition at line 68 of file fft.cpp.
References fft_map, m_fft_length, m_fftw_in_inverse, m_fftw_out_inverse, and m_fftw_plan_inverse.
Referenced by fun::frame_builder::build_frame().
|
staticprivate |
Mapping to/from FFT order.
This map shifts the subcarriers so that instead of being thought of sequentially from 0-63 they can be thought of as positive and negative frequencies which is the ordering that the FFTW3 library uses.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |