GFLIB_Sin_FL cannot improve speed performance

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

GFLIB_Sin_FL cannot improve speed performance

585 Views
q_zhang
Contributor I

Hello,

I had a problem with automative math and motor control library Set for NXP MPC577xK. I want to improve speed performance in S32R274.

However, when I use MPC577xK_AMMCLIB.a in e200z7,the function GFLIB_Sin_FLT() takes more time than sin() from math.h. What should I do?

Looking forward to your reply!

0 Kudos
2 Replies

537 Views
petrz_
NXP Employee
NXP Employee

Hi,

our benchmark on the e200z7 core shows this:

  • AMMCLib function GFLIB_Sin_FLT(): max. 53 ~ 73 core cycles (depending on which compiler is used).
  • Standard C math library sin() function: max. 4351 core cycles.
  • Standard C math library single precision variant sinf(): max. 514 core cycles

If you see slow execution of AMMCLib functions, please check if you have the data/instruction cache enabled, branch target buffer enabled, and correct settings of the flash wait states. Also make sure that the compiler options (especially optimization settings) correspond to the AMMCLib release notes and that you are using the latest version of the library which can be downloaded from http://nxp.com/AMMCLib.

0 Kudos

580 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

do you use S32 Design Studio / GCC compiler? If yes, this text from release notes could explain it:

Known limitations and issues:
=============================
- Function MLIB_NegSat_F16 is not provided in SPE2 assembly-optimized variant when compiling with the Green Hills compiler due to limitations of this compiler.
- MLIB functions are not provided in assembly-optimized variant when compiling with the WindRiver Diab compiler due to limitations of this compiler.
- Signal Processing Engine (SPE) enhancements are not available in most AMCLIB functions when compiling with the S32 Design Studio GCC compiler due to bugs in this compiler.
- S32 Design Studio GCC compiler is not recommended for use with AMMCLib. Functions compiled with this compiler consume significantly more CPU clock cycles than necessary.

 

Regards,

Lukas

 

0 Kudos