Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

定点

用定点数字表示信号和参数值,以提高所生成代码的性能

在数字硬件中,数字以定点或浮点数据类型的形式来表示。对于这两种数据类型,字长的位数都是固定的。但是,定点值的动态范围远小于字长相同的浮点值。虽然浮点处理器可以大大简化系统的实时实现,有效地估算真实数字,但定点处理器具有许多其他优势。定点处理器通常较小,功耗较低。它们在执行时需要的内存和处理器时间也较少。

要仿真使用定点数字的模型,必须安装 Fixed-Point Designer™。要编辑包含定点模块的模型或者指定定点数据类型,并不需要 Fixed-Point Designer。

函数

fixdt创建描述定点或浮点数据类型的 Simulink.NumericType 对象
fixpt_look1_func_approx通过插入查找表数据点来优化非线性函数的定点逼近
fixpt_evenspace_cleanupModify breakpoints of lookup table to have even spacing
fixpt_look1_func_plotPlot fixed-point approximation function for lookup table
fixpt_set_allSet property for each fixed-point block in subsystem
fixptbestexpExponent that gives best precision for fixed-point representation of value
fixptbestprecDetermine maximum precision available for fixed-point representation of value

主题

  • Specify Fixed-Point Data Types

    If you do not have Fixed-Point Designer, you can still inspect and use fixed-point models that others share with you.

  • 使用数据类型助手指定数据类型

    以交互方式将数据类型(如整数、定点和枚举类型)应用于模型中的数据项。

  • Share Fixed-Point Models

    Inspect and use an existing fixed-point model when you do not have Fixed-Point Designer.

  • Control Fixed-Point Instrumentation and Data Type Override

    If you do not have Fixed-Point Designer, you can work with a model containing Simulink® blocks with fixed-point settings by turning off fixed-point instrumentation and setting data type override to scaled doubles.

  • 定点数

    在计算机内存中,一个定点数据项以整数形式存储。为了将数据解释为现实世界中的数字,计算机对整数应用数学定标。定标是固定的,这意味着它在执行期间无法更改。

  • Benefits of Using Fixed-Point Hardware

    Fixed-point designs can perform faster and consume fewer computing resources than floating-point designs.

  • 定标、精度和范围

    检查下列各项之间的交互:应用于定点数据的定标、数据可表示真实值的精度以及数据可表示的真实值的范围。

  • MATLAB 和 Simulink 中的定点数据

    将定点数据类型应用于 Simulink 模型中的数据和 MATLAB® 代码中的数据。

相关信息