Forum Discussion

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

FFT_verification

Hi !

When I run FFT and IFFT tool in megawizard, the results are not logical. For example firstly I run the FFT tool with the megawizard tb (input: natural order, output : digit reversed order) then I use the FFT output txt files for the input files of IFFT ( input : digit reversed order output: natural order) the result of IFFT dont match with the input of FFT .

What could be the problem ?

P.S = I use single precision floating point representation for the 16-FFT tool.

Thanks all

4 Replies

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

    Have you tried checking what the input file looks like when you generate a testbench for the IFFT, there's no guarantee the output file of the FFT matches the input format for the IFFT.

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

    I used the output of FFT for the input of IFFT.I mean I modified the tb for IFFT.

    By the way I found the solution ;) When you check in binary for floating point it is hard to find what is wrong.

    When I converted to decimals in Matlab I saw that the output multiplied with the FFT size.

    For example if you use 8-IFFT the outputs are 8 time greater than the outputs had used to be. You should normalize them by IFFT size ;)

    Thanks anyway for your reply
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi ferdiskaras,

    I guess I have the same problem you went through. I have implemented a VARIABLE STREAMING (N=8), SINGLE-FLOAT-POINT FFT/IFFT. These are my results:

    input (natural order): (8 0 0 0 8 0 0 0)

    FFT

    output (Digit-reverse order): [16 16 0 0 16 16 0 0] /* the same as [16 0 16 0 16 0 16 0 ] Natural order */

    input(Digit-reverse order): [16 16 0 0 16 16 0 0]

    IFFT

    output (natural order): (64 0 0 0 64 0 0 0)

    How did you normalize it? Where did you make de division by N? In your hardware or in your software? Is there a way to set FFT core to output data already normalized?

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

    If change the "I/O Output Order" of FFT and "I/O input order" of IFFT to "digital reverse Order", then the input of FFT should be equal to output of iFFT. I'm able to get the correct result.