SDAA440 June   2026 AM13E23019

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1 Introduction
  5. 2 Processor-in-the-Loop (PIL)
  6. 3 Prerequisites
  7. 4 Benchmarking the Current Control Algorithm on AM13x
    1. 4.1 Reference C28x Example Simulation Model
    2. 4.2 Simulation Model Configured for F28379D
    3. 4.3 Simulation Results
  8. 5 Isolating the Algorithm: Converting the Subsystem to a Model Reference
    1. 5.1 Conversion Procedure
    2. 5.2 Converted Model Reference Block Configured for Processor in the Loop
  9. 6 Configuring the Model Reference for AM13x PIL
    1. 6.1 Target Hardware Selection
    2. 6.2 SysConfig Configuration
  10. 7 SIL/PIL Manager
    1. 7.1 Launching the SIL/PIL Manager and Running PIL
      1. 7.1.1 Simulation Time Consideration
      2. 7.1.2 PIL Results: Showing Numerical Verification
      3. 7.1.3 PIL Results: Execution Profiling
  11. 8 Optimization and Re-Profiling
    1. 8.1 PIL Results: With Single Datatype and Sine/Cosine TMU
    2. 8.2 Codegen Report Showing TMU Functions
    3. 8.3 Enable Code View from Compare Runs Option
    4. 8.4 PIL Results: Execution Profiling with Single Datatype and Sine/Cosine TMU
  12. 9 Summary
  13. 10References

Conversion Procedure

 Reference ModelFigure 5-1 Reference Model
  1. In the top-level model, right-click the current control subsystem block
  2. Select Subsystem → Convert to → Referenced Model
    1. Click convert the model, Model Advisor shows a successful conversion message
       Conversion StepFigure 5-2 Conversion Step
  3. Simulink creates a new, separate model file containing exclusively the current control algorithm contents
  4. The original subsystem in the top-level model is automatically replaced by a model reference block pointing to the newly created model. Rename the top model to avoid conflict with reference example model.
  5. Verify that the top-level model simulates correctly after conversion, the numerical results must remain identical to the pre-conversion baseline

The top-level FOC system continues to run entirely on the Simulink host. Only the current control Model Reference block is deployed to the AM13x during PIL execution.