SPRAD27A July   2022  – August 2022 AM2431 , AM2432 , AM2434 , AM2631 , AM2631-Q1 , AM2632 , AM2632-Q1 , AM2634 , AM2634-Q1 , AM2732 , AM2732-Q1 , AM6411 , AM6412 , AM6421 , AM6422 , AM6441 , AM6442

 

  1.   Abstract
  2.   Trademarks
  3. 1Introduction
  4. 2Trigonometric Optimizations
    1. 2.1 Lookup Table-Based Approximation
    2. 2.2 Polynomial Approximation
      1. 2.2.1 Optimizing Sine and Cosine
        1. 2.2.1.1 Sine Cosine Polynomials From Sollya
      2. 2.2.2 Optimizing Arctangent and Arctangent2
        1. 2.2.2.1 Arctangent Polynomials
  5. 3Trig Library Benchmarks
    1. 3.1 C Math.h Library
    2. 3.2 Arm “Fast Math Functions” in CMSIS
    3. 3.3 TI Arm Trig Library
    4. 3.4 Table of Results
  6. 4Optimizations
    1. 4.1 Branch Prediction
    2. 4.2 Floating-Point Single-Precision Instructions
    3. 4.3 Memory Placement
    4. 4.4 Compiler
  7.   Revision History

Memory Placement

The purpose of the Tightly-Coupled Memory (TCM) is to provide low-latency memory that the processor can use without the unpredictability that is a feature of caches. The main use of TCM is to store performance critical data and code. Interrupt handlers, data for real-time tasks and OS control structures are a common example. There are two external TCMs that can be configured to only store instructions, only data, or a mixture of the two (TCMA and TCMB). In our library, the polynomial coefficients were placed in TCMB, and the functions themselves in TCMA.

GUID-20220315-SS0I-50H9-DSDX-QJC0DRDJ3V2Q-low.png Figure 4-3 Memory Placement

Enabling a TCM to include both instructions and data provides more flexibility from a system perspective, but might limit performance compared with optimizing a TCM to solely store instructions or data. The TCMB is accessible via two ports. This indicates that the TCM has been implemented as two separate banks of RAM so that the two banks can be accessed simultaneously.