Library Development
To get started, see Identify Code Replacement Library Requirements. Get familiar with the process for developing code replacement libraries. Develop libraries interactively with the Code Replacement Tool or programmatically. Experiment with the process and tools by using Quick Start Code Replacement Library Development - Simulink.
Tools
Code Replacement Tool | Create, modify, and validate content of code replacement libraries |
Code Replacement Viewer | Explore content of code replacement libraries |
Functions
Classes
Topics
Getting Started
- What Is Code Replacement Customization?
Customize how and when the code generator replaces C/C++ code that it generates for functions and operators. - Code You Can Replace From Simulink Models
Review lists of functions and operators that the code generator can replace depending on the code replacement library. - Quick Start Code Replacement Library Development - Simulink
Develop a code replacement library that includes an entry for generating replacement code for a math function.
Workflow to Develop a Code Replacement Library
- Develop a Code Replacement Library
Workflow for developing a code replacement library.
Options for More Control
- Data Alignment for Code Replacement
Define code replacement mappings that align data for a replacement function to a specified boundary. - Reserved Identifiers and Code Replacement
C/C++ programming language reserved keywords as identifiers and function names in code replacement entries. - Remap Operator Output to Function Input
Meet specific generated code patterns by remapping operator outputs to input positions in your replacement function argument list. - Customize Match and Replacement Process
Add logic to the code replacement match and replacement process for functions or operators. - Optimize Generated Code by Using Multiple Code Replacement Libraries
Choose multiple code replacement libraries to generate code.
Troubleshooting
Troubleshoot Code Replacement Library Registration
Troubleshoot the library registration if a code replacement library is not listed as a configuration option or does not appear in the Code Replacement Viewer.
Troubleshoot Code Replacement Misses
Analyze and correct code replacement misses with miss reason messages that appear in the Code Replacement Viewer.