库开发
开发代码替换库
要快速入门,请参阅Identify Code Replacement Library Requirements。熟悉开发代码替换库的过程。使用代码替换工具以交互方式开发库或以编程方式开发库。使用 快速向导代码替换库开发 - Simulink了解开发过程和工具。
工具
函数
类
主题
快速入门
- 什么是代码替换自定义?
自定义代码生成器如何以及何时替换它为函数和运算符生成的 C/C++ 代码。 - 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. - 快速向导代码替换库开发 - Simulink
开发一个代码替换库,其中包含用于为数学函数生成替换代码的条目。
开发代码替换库的工作流
实现更多控制的选项
- 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. - 使用多个代码替换库优化生成的代码
选择多个代码替换库来生成代码。
疑难解答
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.