主要内容

Simulink 中的定点代码生成

优化定点模型的代码生成

通过使用 Simulink® Coder™ 或 Embedded Coder®,您可以用 Fixed-Point Designer™ 生成 C 代码。从定点模型生成的代码仅使用整数类型,并自动包括处理定点位置中的差异所需的所有运算,例如移位。您可以在嵌入式定点处理器或快速原型设计系统上使用生成的代码,即使它们包含浮点处理器也没问题。

将 Fixed-Point Designer 与 HDL Coder™ 结合使用时,您可以从 Simulink 模型、Stateflow® 图和 MATLAB Function 模块生成逐位精确的、可综合的 Verilog® 和 VHDL® 代码。

主题

高性能代码模型

整合 MATLAB 代码

使用模型顾问

自定义生成的代码

保持标准合规性

  • Use of Shifts by C Code Generation Products
    Understand the use of shifts by MathWorks® coder products including how to control the shifts using optimization settings in the configuration parameters as well as modeling techniques.

疑难解答

支持的数据类型

仿真和代码生成支持的数据类型。

精选示例