SPRADI0A July   2024  – November 2024

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
    1. 1.1 Getting Started
  5. 2Model-Based Design of eCompressor
    1. 2.1 General Texas Instruments High Voltage Evaluation (TI HV EVM) User Safety Guidelines
    2. 2.2 Block Diagram
    3. 2.3 Hardware, Software and Testing Requirements
      1. 2.3.1 Hardware setup
      2. 2.3.2 Software setup
      3. 2.3.3 Test Procedure
  6. 3 Simulink Configuration Settings
    1. 3.1 Simulink Tool Optimization
      1. 3.1.1 Optimum Code Generation
    2. 3.2 C2000 Specific Optimization
      1. 3.2.1 Using TMU Through Simulink
      2. 3.2.2 Using Software Libraries Through Simulink
      3. 3.2.3 Running Code From RAM
    3. 3.3 Performance Comparison
  7. 4 Profiling Using Simulink
    1. 4.1 Processor-in-Loop (PIL) Method
    2. 4.2 C2000 Timer-Based Profiling
    3. 4.3 Code Composer Studio tools
  8. 5Summary
  9. 6Revision History

Using Software Libraries Through Simulink

To invoke additional software libraries for faster computation, embedded coder allows to import code replacement libraries (CRL), which replaces the conventional code generation with the library functions wherever suitable. One such library for faster computations on fixed point arithmetic is C28x IQMath library. If the application uses Q numbers, it is recommended to use the IQMath CRL. To invoke IQMath CRL, go to Interface section under the Code Generation tab in the Hardware settings. Select TI C28x library as shown in the image, which contains the code replacement libraries for IQ Math, FastIntDiv, CLA, and so forth.

TIDM-02012 Code Replacement Library
                    configuration Figure 3-5 Code Replacement Library configuration
Note: MATLAB versions older than 2018 do not support the TI C28x code replacement library.
Note: It is to be noted that hardware accelerator Trigonometric Math Unit (TMU) is accelerator for performing floating point operations faster, whereas, the IQ Math library is a software library that accelerates the fixed point computations faster.