SDAA248 October   2026 AM2752-Q1 , AM2754-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Profiling Existing Algorithms
    1. 1.1 Measuring Cycles With the CPU Cycle Counter
  5. 2Compiler Optimizations
    1. 2.1 Verifying Compiler Optimization with Generated Assembly
  6. 3Double Check Memory Cache Settings
  7. 4Use Existing Optimized Libraries
  8. 5Optimizing Custom Kernels/Modules
  9. 6Example
    1. 6.1 Example System Results Summary

Use Existing Optimized Libraries

As part of the FreeRTOS SDK / MCU Plus SDK, there are several highly optimized libraries provided which can be used to further improve performance. These libraries provide common functions with code that is already optimized for the C7x architecture. There are libraries for math, digital signal processing, vision processing, and audio processing.

Utilizing these optimized functions can provide further improved performance for the algorithm. Note that the C7x architecture is vector-based, which allows for operations on multiple blocks of data at the same time. The performance generally improves as the size of data (block size) increases to take advantage of the vector architecture.

The location of the documentation for these various libraries lives inside of the SDK folder. For example <SDK base directory>/source/dsplib/docs/. Example code is also provided for the provided kernels. It is generally recommended to utilize these optimized DSP functions where possible since they are optimized to take advantage of several features of the C7x architecture such as the streaming engines and vectors, which can provide significant improvements on performance for the sections of the algorithm that are doing the actual computation.

One of the key things to note with these optimized functions is that they are typically used with an init() and an exec() function. The init function is used to set up one-time things such as the streaming engine or address generators. The exec function is used to do the computation and should be called in the loop. The init function should be called only once or when parameters change. Ideally the init function is called once and the exec() is looped until the block of data has been fully processed. This provides the largest performance lift.

On top of utilizing the provided libraries, they must also be used correctly to get a performance improvement. As an example, if an add function that is used to add two arrays together is only dealing with one element at a time, there is no performance improvement. In the case of the AM275 with a 256 bit vector width architecture, it would be able to add up to eight 32-bit values together in a single clock cycle, but the function must be called correctly to deal with vector-width data instead of a single-scalar data. The examples provided in the libraries show how to correctly call these functions.