Engee 文档

Abs

页面进行中。

的绝对值(模量)。

类型: Abs

图书馆中的路径:

/Basic/Math Operations/Abs

资料描述

Abs 计算输入信号的绝对值。

港口

输入

# IN_1 — 输入信号
scalar | vector

Details

输入信号

数据类型

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

复数支持

输出

# OUT_1 — 输出信号
scalar | vector

Details

输入信号的绝对值。

数据类型

Float64`。

复数支持

参数

主要

# Zero-Crossing Detection — 过零检测
Enable | Disable | Expose discontinuities to solver

Details

过零检测:

  • Enable -启用过零检测。

  • Disable -过零检测被禁用。

  • Expose discontinuities to solver -使用求解器进行间隙检测。

Enable | Disable | Expose discontinuities to solver

默认值

Expose discontinuities to solver

程序使用名称

ZeroCross

可调谐

可计算

Main

# Output data type — 输出数据的类型
Inherit: auto | Same as input | Float64 | Float32 | Float16 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Fixed-point

Details

选择输出的数据类型。

Inherit: auto | Same as input | Float64 | Float32 | Float16 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Fixed-point

默认值

Same as input

程序使用名称

OutDataTypeStr

可调谐

可计算

# Output fixed-point type — 定点数的输出类型
Data type

Details

指定定点数的输出类型。

依赖关系

若要使用此参数,请为参数设置 Output data type 意义 Fixed-point.

默认值

fixdt(1, 16, 0)

程序使用名称

OutDataTypeStrFixed

可调谐

可计算

# Integer rounding mode — 定点运算的舍入模式
Ceiling | Convergent | Floor | Nearest | Round | Zero

Details

选择定点运算的舍入模式。 你可以选择:

  • Ceiling -舍入正数和负数(朝向正无穷大)。

  • Convergent -将数字舍入到最接近的可表示值。 如果数字的小数部分以`5`结尾,则该数字将四舍五入为最接近的偶数整数。

  • Floor -向下舍入正数和负数(朝向负无穷大)。

  • Nearest -将数字舍入到最接近的可表示值。 如果数字的小数部分以`5`结尾,则将数字向上取整(朝向正无穷大)。

  • Round -将数字舍入到最接近的整数。

  • Zero -四舍五入数向零。

块参数总是四舍五入到最接近的可表示值。

Ceiling | Convergent | Floor | Nearest | Round | Zero

默认值

Floor

程序使用名称

RndMeth

可调谐

可计算

# Saturate on integer overflow — 溢出行为
Logical

Details

当选择此选项时,饱和度应用于块中的所有内部操作,而不仅仅是输出或结果。 一般而言,代码生成过程可以确定何时溢出是不可能的。 在这种情况下,代码生成器不生成饱和码。

开始! 理由说明 对溢出的影响 例子:

国旗 Saturate on integer overflow 已安装(已启用)。

溢出对于您的模型是可能的,并且您希望在生成的代码中显式溢出保护。

在溢出的情况下,结果会自动替换为数据类型的最大可能(模)值。

数字"130"不适合有符号的"8"位整数,并返回值"127"。

国旗 Saturate on integer overflow 未安装(禁用)。

您希望优化生成代码的效率。

溢出被转移到适当的值,该值可以用数据类型表示。

数字"130"不适合有符号的"8"位整数,并返回值"-126"。

默认值

false (关掉)

程序使用名称

SaturateOnIntegerOverflow

可调谐

可计算

附加选项

C 代码生成: 是