SPRUJG0 December   2024 F29H850TU , F29H859TU-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Performance Optimization
    1. 2.1 Compiler Settings
      1. 2.1.1 Enabling Debug and Source Inter-listing
      2. 2.1.2 Optimization Control
      3. 2.1.3 Floating-Point Math
      4. 2.1.4 Fixed-Point Division
      5. 2.1.5 Single vs Double Precision Floating-Point
    2. 2.2 Memory Settings
      1. 2.2.1 Executing Code From RAM
      2. 2.2.2 Executing Code From Flash
      3. 2.2.3 Data Placement
    3. 2.3 Code Construction and Configuration
      1. 2.3.1 Inlining
      2. 2.3.2 Intrinsics
      3. 2.3.3 Volatile Variables
      4. 2.3.4 Function Arguments
    4. 2.4 Application Code Optimization
      1. 2.4.1 Optimized SDK Libraries
      2. 2.4.2 Optimizing Code-Size With Libraries
      3. 2.4.3 C29 Special Instructions
      4. 2.4.4 C29 Parallelism
      5. 2.4.5 32-Bit Variables and Writes Preferred
  6. 3References

Optimized SDK Libraries

Use optimized libraries and source provided in F29x SDKs. These contain optimal implementations of many standard control, DSP, and math operations. Some of these (FFT, FIR) are written in assembly.

Many RTS library functions are cycle intensive because they cover all corner-case scenarios. When certain assumptions are made (No NaN or infinite values will be operands or results of floating-point operations), these functions can be replaced with simpler and more optimized functions that leverage specific C29 instructions. For example- floorf(), roundf(), fmodf(), ceilf(). Examples of these are provided in F29x SDKs, and are enabled with the -ffast-math compiler option.

Automotive applications using AUTOSAR leverage math libraries generated by code generation tools, containing floating-point and fixed-point libraries, with functions for fixed-point to floating-point conversion and vice versa. C29 instructions can be leveraged to do these in an efficient manner.

Note: Optimized functions for AUTOSAR specific auto-generated math libraries are planned.