LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

FFT on FPGA

Solved!
Go to solution

Hello,

I'm trying to make the FFT of a signal comes from a P2P FIFO.

I have a VST connetced via P2P to a flexrio. In the flexrio I received an array (A) of 16 elements of I16 type. The elements are the I, Q components of the signal, in other word I have the elements:

A(0) = I(0), A(1) = Q(0), A(2) = I(1), A(3) = Q(1)... A(14) = I(7), A(15) = Q(7).

How can I make the FFT? 

0 Kudos
Message 1 of 2
(2,126 Views)
Solution
Accepted by topic author fabio.int

Please go to NI Example Finder >> Hardware Input and Output >> FlexRIO >> FPGA Fundamentals  >> FFT >> FFT (1 Channel, N Samples).lvproj

 

From the array of 16 elements of IQ interleaved, first use decimate 1D array function to have two I16 array of 8 elements for real and imaginary.  Then, connect the two arrays to the real and imaginary input of the FFT function in the above example.  

 

The FFT function with N samples per clock can handle 8 samples per cycle; however, the waveform data in frequency domain is not in the same order as that of time domain.  In the example, reordering the data in frequency domain is accomplished on host-side.  

 

Depending on what you would like to do after FFT, you may have to choose where you re-order the data in frequency domain, so that it has the same data order as the original data in time domain.  There is no example code to do the re-order on FPGA.  

 

If VST does not stream waveform continuously, you may not need to use N samples FFT.  For example, if VST acquires 4096 samples upon any type of trigger, and if next trigger does not occur at least within next 8 * 4096 samples, you have time to unpack I and Q array of 8 elements into 1 sample per clock.  This way, FFT does not need to handle 8 samples per clock and it handles 1 sample per clock in stead.  To unpack 8 elements into 1 element, you can refer to a VI on palette; FlexRIO FPGA Libraries >> DRAM FIFO >> Unpacker.

 

Hope this helps.  

Message 2 of 2
(2,000 Views)