# FFT on FPGA

**URL:** <https://discourse.myriadrf.org/t/fft-on-fpga/2426>\
**Category:** LimeSDR\
**Created:** [6 March 2018 02:07 UTC](https://discourse.myriadrf.org/t/fft-on-fpga/2426 "2018-03-06T02:07:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KarlL](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@KarlL](https://discourse.myriadrf.org/u/KarlL)\
**Post date:** [6 March 2018 02:07 UTC](https://discourse.myriadrf.org/t/fft-on-fpga/2426/1 "2018-03-06T02:07:25Z")

</div>

Hi all,

I’ve seen several post mentioning the need to compute the FFT on the LimeSDR’s FPGA but no post for this sole purpose:

> [@Host for LimeSDR](https://discourse.myriadrf.org/t/host-for-limesdr/1030/15):
>
> @g8sqh I plan to do experiments at different wavelengths. For example Sun and Jupiter-Io at 15-30 MHz and hydrogen line around 1.4 GHz. I don’t need to save the raw IQ stream. I would process that on the selected board cpu to get just fft values and store the resulting fft bins at regular time intervals doing scans over a certain bandwidth. This lowers my needs in terms of local storage speed. Yet I would prefer having a good cpu to run fftw routines possibly in multi threading on some cores…

> [@Minor Modifications to the fpga gateware](https://discourse.myriadrf.org/t/minor-modifications-to-the-fpga-gateware/2096/2):
>
> Hi booth! If the purpose is demodulation, I suppose you’re going to decimate first, then serialize and finally send the signal to the GPIO. Is it correct? I would like to do the same, and put a FFT core inside the FPGA. According to the forum, it seems there not enough space in the FPGA to do it, but I didn’t try untill now. If you do it, please tell me! wink About your questions: “is decimation appropriate?” It depends. Which is the maximum frequency you want to monitor? “do I n…

Has anyone tried to do it or put some thoughts in it?

@mzs mentioned about the size that such IP would take on the FPGA:

> [@Host for LimeSDR](https://discourse.myriadrf.org/t/host-for-limesdr/1030/18):
>
> If you look at a some of the Opencores for Verilog FFT’s: 64 point fft/ifft - [https://opencores.org/project,pipelined\_fft\_64](https://opencores.org/project,pipelined_fft_64) FFT unit for 10 bit data and coefficients, and 2 data buffers occupies 1513 CLB slices, 4 DSP48 blocks, and 2,5 kbit of RAM in Xilinx XC4SX25 FPGA, and 700 CLB slices 4 DSP48E blocks, and 2,5 kbit of RAM in Xilinx XC5SX25 FPGA, data buffers are implemented on the distributed RAM. 128 point fft/ifft - [https://opencores.org/project,pipelined\_fft\_128](https://opencores.org/project,pipelined_fft_128) FFT unit for 10 bi…

I personally would be interested in FFTs of size 1024 to 2048. If possible the LimeSDR would return both IQ and FFT, so that we can still do whatever processing on the IQ if necessary, but wouldn’t need to compute the FFT on the CPU. Could it be added to the LimeSDR USB and/or PCIe? It would be great to have the possibility to have 2 gatewares, one with the FFT and one without, for those who want to use the FPGA for other uses.

---

<div class="post-metadata">

**Author:** ![mleech](https://avatars.discourse-cdn.com/v4/letter/m/34f0e0/32.png) [@mleech](https://discourse.myriadrf.org/u/mleech)\
**Post date:** [6 March 2018 06:33 UTC](https://discourse.myriadrf.org/t/fft-on-fpga/2426/2 "2018-03-06T06:33:19Z")

</div>

For the hydrogen line in particular, the “useful range” for galactic hydrogen is only about +/- 1.5MHz or so.

Doing high-resolution FFTs at those kinds of bandwidths is an _EASY_ job for a general purpose CPU, and there’s little justification for doing them on the FPGA.

The FPGA route becomes interesting when you go into the 10s-of-Msps, but I’m going to guess that doing 2048-bin FFTs on the FPGA on the Lime is a non-starter.
