cancel
Showing results for 
Search instead for 
Did you mean: 

Duration of FLOAT operations

Posted on April 21, 2010 at 20:34

Duration of FLOAT operations

#stm32 #stm32
12 REPLIES 12
Nickname12657_O
Associate III
Posted on May 17, 2011 at 13:48

Hi,

Have a look at :

Fast Floating Point Library  from MicroDigital

with ''Link and Go'' compiler support for IAR EWARM

http://www.smxrtos.com/ussw/gofast/gofast_thumb2_iar.htm

Cheers,

STOne-32.

anders239955
Associate II
Posted on May 17, 2011 at 13:48

The floating point library is written so that the code is normally executed straight forward without branches taken. As we do not have any specific benchmarks regarding code running from flash, I can only give you the idealistic cycle timings for the functions (if I remember the timings right):

Add/Sub    33-43 cycles

Mul            36 cycles

Div            49-58 cycles

There might be some cycles less as I have made some changes/optimizations since I measured the timings, but I think this will give you a hint about the timings of the 32-bit floating point operations in the EWARM.

We have also rewritten a bunch of the standard C math functions in version 5.50 of EWARM in order to speed up things a bit further.

Does anybody know how long the float adding/multiplication/division lasts in STM32 code compiled by EWARM and running from flash?

Regards

Ivan

anders239955
Associate II
Posted on May 17, 2011 at 13:48

It is a huge difference between EWARM 5.20 and EWARM 5.50 regarding timing of floating point operations. One may get worse performance if the wrong functions are replaced by the corresponding functions in the GoFast library. Please read the attached document.