DFT/FFT in FPGA ?? - Page 1
Forum section: electronics / general

author: Spekkio
author_rank: Regular Contributor
timestamp: January 28, 2013, 11:22:40 am
content: Hi!I have a fairly good understanding of FFT. I know what Laplace Transform, Fourier and Z Transform is, and I know how to use it. I made a simple FFT in C once that I used to look at DTMF signals ( like this) and I also did a vibration sensor ().https://github.com/Spekkio/dig_filterBut I want to implement a DFT in an FPGA to boost the speed of the data analysis. I know a little bit VHDL, I have programmed communication to an LCD display to show a temperature value on a CPLD. But nothing more complicated than that.I have googled around to find some good examples of how people do DFT in FPGA's. But I never found a good example that I can understand. Actually, I don't understand it at all. My biggest question is, how is the exp() calculated?? and the complex numbersFrom all the examples I've looked at, exp and complex numbers doesn't seem to be used at all, I cannot understand how that works? Or they just made the example code impossible to understand. I need a much more basic explanation of how people create DFT algoritms in FPGA's, I don't want to get thrown into the complicated stuff immediatly like most tutorials I have found, I have to start from scratch with simple examples.Do you normally use LUT's for exp() ? Or series expansions ?Also, how is the clock signal used in a DFT implementation ?I have this need to understand things, so a pre-made IP for DFT's will not be enough for meWhere do I start?

author: Balaur
author_rank: Unknown
timestamp: January 28, 2013, 11:42:48 am
content: While I understand your pre-made IPs comment, please have a look on the existing FFT-related stuff available onOpenCores(free registration required)There are a lot of rather nice examples there.Otherwise, sorry, I cannot provide any FFT insight. However, conceptually speaking, if you can imagine a non-recursive algorithm for your requirement, you can almost always write (bad) HDL (i.e. Verilog or VHDL) code to implement your algorithm. BTW, you can use fairly high level constructs (ex: arithmetic operators on IEEE floating point numbers are synthesizable by the Synopsys DC tool with the correct DesignWares).With some luck, modern synthesis tools will happily take your HDL and spit out some block that will almost work. I don't even touch on the design validation phase, that involves a lot of effort.Anything better than that requires a rather in-depth knowledge of the problem at hand and a gift for translating the concept into (parallel) hardware.Cheers

author: Spekkio
author_rank: Regular Contributor
timestamp: January 28, 2013, 01:04:03 pm
content: Ah, thank you Balur. I've been thinking about looking at OpenCores actually. Already have an old account but I had problems with my login, never got my password remainder e-mail, so I gave upI will try again now, maybe even create a new account if it doesn't work.I wanted to take a look at the "radix 4 complex fft".

author: jeroen74
author_rank: Frequent Contributor
timestamp: January 28, 2013, 09:04:17 pm
content: I once implemented the IDCT required for JPEG decompression in VHDL. It was really easy, but the fully parallel way I implemented ate resources like hellIIRC it was 7 multiplications by a constant and 11 additions.I don't know how the constants are actually computed.

author: jeffreyprinzie
author_rank: Newbie
timestamp: January 30, 2013, 07:08:10 pm
content: To calculate the FFT you need complex arithmetric.main use is Wn = exp(2*pi/N):this is sin(2pi/N) + j cos(2pi/N)if Wn^k , you mply 2pi/n*k in the sine.A complex multiplication involves 4 real multiplications i thought and 4 addidions.I dont know how to implement this using high speed, fixed point arith. but it could be possible.indeed there may be IP available for this.

author: nctnico
author_rank: Super Contributor
timestamp: January 31, 2013, 02:52:35 am
content: There are also integer (aka fixed point) FFT implementations. Thats probably what you want in an FPGA. I found this website with Google:http://www.jjj.de/fft/fftpage.html

author: Marco
author_rank: Super Contributor
timestamp: February 03, 2013, 10:26:39 pm
content: The MyHDL site has an example which uses recursion to instantiate the butterflies ... it's giving me a headache trying to understand it.http://www.myhdl.org/doku.php/users:cfelton:projects:recursivefftPS. this is of course a complex FFT ... to perform FFTs on real signals you either have to do the trick of combining 2 buffers to do two transforms in one or only use half the input which is inefficient.

author: joelby
author_rank: Frequent Contributor
timestamp: February 04, 2013, 03:27:06 am
content: Xilinx provides a FFT core generator in the free WebPACK version of their tools. It works very well. Altera also have an FFT MegaCore, though I'm not sure if that's free.I wouldn't try to come up with my own FFT implementation unless I had very specific requirements, loads of free time, and/or an academic interest in FFTs!

author: mrflibble
author_rank: Super Contributor
timestamp: February 04, 2013, 08:30:29 am
content: Quote from: Spekkio on January 28, 2013, 01:04:03 pmPlease let us know when you find an FFT core on opencores that doesn't make you want to shoot yourself in the head to end the suffering.In the meantime I suggest using the FFT core of the fpga vendor of your choice. I don't know about the one from Altera, but the Xilinx fft core works just fine. And it's "free" IP, as in included with a regular ISE license.

author: amyk
author_rank: Super Contributor
timestamp: February 04, 2013, 10:26:49 am
content: Here's a bit more background on the theory:http://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithmThere's nothing particularly difficult about the implementation; basically the mathematical functions are replaced with lookup tables so everything just becomes a lot of arithmetic and array lookups.

author: Spekkio
author_rank: Regular Contributor
timestamp: February 15, 2013, 01:41:35 pm
content: Thanks for all the info!Now I have something more to work with