本页对应的英文页面已更新,但尚未翻译。 若要查看最新内容,请点击此处访问英文页面。

定点代码生成

优化定点模型的代码生成

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

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

主题

高性能代码模型

Lookup Table Optimization

Optimize lookup tables in your model to improve efficiency.

Selecting Data Types for Basic Operations

How to select efficient data types for basic fixed-point operations.

Fixed-Point Code Generation Support

Simulink features supported for fixed-point code generation.

使用 Model Advisor

Optimize Generated Code with the Model Advisor

Use the Model Advisor to identify model settings that might lead to non-optimal results in code generation.

Net Slope Computation

Control how the software handles net slope computations in generated code.

自定义生成的代码

Control the Generation of Fixed-Point Utility Functions

Control the generation of fixed-point utility functions using specified minimum and maximum values.

保持标准合规性

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

特色示例