Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

- Community Forums
- :
- Forums
- :
- Hardware Development
- :
- Processor System Design and AXI
- :
- Run dma_ex_fft_v2_0 project error. FFT calculatio...

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Highlighted
#

qq1297504766

Observer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-07-2016 02:09 AM

4,192 Views

Registered:
12-07-2016

Hello,

I'am trying to running AR# 58582 Example Design -Zynq-based FFT co-processor using the ASI DAM.

The links: https://china.xilinx.com/support/answers/58582.html

I did this experiment exactly as 'tutorial.txt' explained.But FFT calculation results and the real value is completely different.

I ran a 32-point FFT. The inputs and outputs are as follows

Is there any need to modify the project? The project source file is in the attachment. @bwiec Can you help me?

I search FFT problems encountered, many of you are answered.

0
Kudos

Reply

1 Solution

Accepted Solutions

Highlighted

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-08-2016 04:24 AM

7,008 Views

Registered:
08-02-2011

Hello,

Well remember that Matlab is working in double precision floating point data so they don't care about bit growth. It can grow effectively indefinitely.

By contrast, this Vivado design uses the FFT core in fixed point mode. In order to trade off resources with accuracy, some bits are truncated at various stages of the FFT calculation. Combine that with the fact that the scale schedule is used for optimizing dynamic range throughout each butterfly. This results in a different scale factor. That's why I had to re-scale it to match what Matlab was doing.

www.xilinx.com

0
Kudos

Reply

5 Replies

Highlighted

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-07-2016 09:56 AM - edited 12-07-2016 09:56 AM

4,158 Views

Registered:
08-02-2011

Hello,

The results look correct to me when I plot them in matlab. Make sure you look at the magnitude.

t = 1:32; x = [16384 8612 -1337 2582 10328 4163 -8996 -9664 -540 -1274 -12721 -15195 -3892 2413 -4918 -9055 1598 12103 7531 -477 4968 15313 11869 -469 -1931 6696 5809 -7273 -13070 -4700 42 -8965]; Xk_ideal = fft(x,32); Xk_observed = [184+j*-2, -38+j*1803, 1004+j*-3086, 622+j*-931, 561+j*-411, 539+j*-51, 527+j*431, 521+j*2267, 517+j*-2871, 514+j*-1068, 512+j*-664, 512+j*-462, 510+j*-330, 510+j*-231, 509+j*-146, 510+j*-73, 510+j*0, 510+j*71, 510+j*146, 510+j*229, 511+j*329, 513+j*461, 513+j*663, 515+j*1067, 517+j*2871, 522+j*-2268, 528+j*-432, 540+j*50, 562+j*410, 624+j*929, 1005+j*3084, -36+j*-1805]; plot(t, abs(Xk_ideal )./2^5, 'b+', t, abs(Xk_observed), 'g'); legend('ideal', 'observed');

www.xilinx.com

0
Kudos

Reply

Highlighted

qq1297504766

Observer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-07-2016 07:03 PM

4,135 Views

Registered:
12-07-2016

@bwiec Thank you for your reply.I read your matlab code.

For the following code:

plot(t, abs(Xk_ideal )./2^5, 'b+', t, abs(Xk_observed), 'g');

The variable Xk_ideal.Why divide by 32.

0
Kudos

Reply

Highlighted

bwiec

Xilinx Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-08-2016 04:24 AM

7,009 Views

Registered:
08-02-2011

Hello,

Well remember that Matlab is working in double precision floating point data so they don't care about bit growth. It can grow effectively indefinitely.

By contrast, this Vivado design uses the FFT core in fixed point mode. In order to trade off resources with accuracy, some bits are truncated at various stages of the FFT calculation. Combine that with the fact that the scale schedule is used for optimizing dynamic range throughout each butterfly. This results in a different scale factor. That's why I had to re-scale it to match what Matlab was doing.

www.xilinx.com

0
Kudos

Reply

Highlighted
@bwiec When I run the FFT of 256 points or more, some of the output is 0. The reason for this result is also some bits are truncated? If I change the FFT IP configuration, can I avoid inaccurate results?

qq1297504766

Observer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

12-12-2016 06:42 PM

4,024 Views

Registered:
12-07-2016

0
Kudos

Reply

Highlighted

katherinekowalski

Visitor

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

06-21-2019 01:44 PM

512 Views

Registered:
06-18-2019

That doesn't fully make sense to me, because for this example,

-for 16pt and 32pt, dividing by 32 works

-for 64pt, this is not the scaling factor, nor is there really one that produces correct accuracy

Do you know why this is?

0
Kudos

Reply