Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

128, 256, 512, 1024 Points FFT.

If I want to design a module consists of 128, 256, 512 and 1024 points FFT (the users can select the N - points FFT they want), what is the best way to do it? I know, in software such as C and Matlab, you can use like a general module which you write a general FFT code for all of these.

What about in VHDL? Is it similar to the software as well? Or, write the individual code for all of these FFT points? Thanks!

5 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    you should read about VHDL generics and generate statements.

    with well thought out code structure you should be able to define a generic "fftpoints" that will unroll the code into an N point FFT using a for ... generate statement.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    You mean using FOR loop and etc to define the general FFT structure which is similar to those software code? Would it be any problem in latency and delay?

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    To be feasible with acceptable FPGA resource consumption, the FFT calculation must be performed sequentially. A for ... generate construct or a for ... loop iteration scheme don't provide sequential processing, it's very different to the meaning of loops in procedural programming as C.

    You have to design the sequential processing and implement it in a clocked process by yourself.

    The Altera FFT core also provides a variable length selectable at runtime, the license is included with the Quartus subscription version.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    that's a good point, i didn't stop to think about resource usage and parallel loading for example.

    cwj: take a look at Altera's Streaming and Variable Streaming FFT architectures to get an idea of how they load data and process in serial. you can create one in the MegaWizard and simulate using the generated test bench which should point you in the right direction.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Thanks for all the information. I will have a look on the information. By the way, I am planning to use TCL for testbench. I have had a look on the altera menu; however, it is too complicated. Any good website showing simple TCL testbench?