建模规范和模块用法
要为代码生成和部署设计模型,请使用建模规范和支持的模块。
建模规范提供有关模型设置、模块用法和模块参数的信息。当您为特定应用程序开发模型和生成代码时,请使用建模规范。
要评估模型设计和代码质量以及验证是否符合建模规范,请使用模型顾问检查。有关详细信息,请参阅使用模型顾问检查您的模型。
主题
- Use Products and Blocks Supported for Code Generation
Identify products and blocks that support code generation.
- Consider Modeling Semantics when Generating Code
Data propagation, sample time propagation, latches for subsystem blocks, block execution order, and algebraic loops.
- 模块建模规范
代码生成建模规范包括推荐的模型设置、模块用法和模块参数。当您开发模型以进行代码生成时,请遵循这些规范。
- 模型配置的建模规范
当您开发模型和生成代码时,请使用建模规范配置建议。
- Switch Between Output Waveforms During Code Execution for Waveform Generator Block
This example shows how to generate code that enables you to switch between stimulus waveforms during code execution.
- Tune Phase Parameter of Sine Wave Block During Code Execution
Under certain conditions, you cannot configure the Phase parameter of a Sine Wave block to appear in the generated code as a tunable global variable (for more information, see the block reference page).