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

- Community Forums
- :
- Forums
- :
- Hardware Development
- :
- AI Engine, DSP IP and Tools
- :
- FFT Performance on Microblaze

- 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
##

msjatxilinx

Adventurer

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

06-08-2018 12:04 AM - edited 06-08-2018 12:18 AM

1,130 Views

Registered:
03-27-2013

FFT Performance on Microblaze

I have a Microblaze system, running an FFT application.

The FFT is generated by MATLAB. It accepts a vector of length, say 1024 of type float and performs a 1024-point FFT.

Using timers, I measured number of clock cycles. The FFT requires more than 20,000,000 clock cycles on a MicroBlaze which is too long. fpadd & fpmul require 4+4=8 clock cycles. For 1024 data elements 10,000 cycles would make sense, but not 20,000,000!

If I reduce my vector length to say 8, it makes no difference!!! Even if I reduce numer of FFT points, does not make difference.

It is obvious that something goes wrong, but I cannot figure out the problem.

I'm using an Artix-7-200T FPGA with Vivado 2017.4 and MATLAB R2017b, running the Microblaze at 100 MHz. Microblaze settings are High Performance, 32 kB of D&I Cache, and floating point support is enabled.

Thanks

5 Replies

Highlighted
##

klasha

Adventurer

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

06-08-2018 12:24 AM

1,118 Views

Registered:
05-23-2018

It seems weird to me that the change in the vector size doesn't change the required time.

How do you view the measurements? JTAG? UART?

Is there any access going on to a UART or similar in your system?

Highlighted
##

msjatxilinx

Adventurer

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

06-08-2018 12:34 AM

1,112 Views

Registered:
03-27-2013

I have a timer in the system. Before entering FFT, I initialize it and after exiting FFT, I stop the timer. Value of timer is read and sent to UART. I view number of cycles in the Console.

Yes, there is a UART and as I said, I print value of timer using it.

Highlighted
##

msjatxilinx

Adventurer

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

06-08-2018 12:55 AM

1,097 Views

Registered:
03-27-2013

I dived into FFT code of MATLAB.

It seems that MATLAB has fixed 1024 point, so number of FFT points does not change performance.

Also length of input vector is fixed, so changing input length changes nothing!

This means that running FFT on Microblaze really takes that long.

Am I right? So using Microblaze for FFT is really impractical. Is this correct?

Highlighted
##

drjohnsmith

Teacher

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

06-08-2018 06:20 AM

1,068 Views

Registered:
07-09-2009

FFT is computationaly intense,

floating point is computationally intense

multiplication without a dsp is computationally intense.

Switch to fixed point,

add a dsp / multiplier to the micro blaze,

increase the cache size, and make certain matlab knows about that.

Is the code matlab is producing efficient / optimised for the Micorblaze,

If you want speed, use a FFT cored in the FPGA.

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>

Highlighted
##

msjatxilinx

Adventurer

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

06-09-2018 09:53 PM

1,001 Views

Registered:
03-27-2013

Thanks @drjohnsmith

Actually my idea was not using any custom logic in the FPGA. However it seems that it is a must.

How can I tell MATLAB to optimize code for MicroBlaza?

How can I make certain that MATLAB is aware of cache (Probably for managing matrix sizes to fit into cache properly)?