2010-04-21 11:34 AM
Duration of FLOAT operations
#stm32 #stm322011-05-17 04:48 AM
Hi,
Have a look at :
Fast Floating Point Library from MicroDigital
with ''Link and Go'' compiler support for IAR EWARM Cheers, STOne-32.2011-05-17 04:48 AM
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 Ivan2011-05-17 04:48 AM
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.