cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
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

0 Kudos
5 Replies
Highlighted
Adventurer
Adventurer
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?

0 Kudos
Highlighted
Adventurer
Adventurer
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.

0 Kudos
Highlighted
Adventurer
Adventurer
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?

0 Kudos
Highlighted
Teacher
Teacher
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
Adventurer
Adventurer
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)?

0 Kudos