Abs
Page in progress. |
The absolute value (modulus).
blockType: Abs
Path in the library:
|
Ports
Input
#
IN_1
—
input signal
scalar
| vector
Details
Input signal.
Data types |
|
Complex numbers support |
Yes |
Output
#
OUT_1
—
output signal
scalar
| vector
Details
The absolute value of the input signal.
Data types |
|
Complex numbers support |
Yes |
Parameters
Parameters
#
Zero-Crossing Detection —
zero crossing detection
Enable
| Disable
| Expose discontinuities to solver
Details
Zero crossing detection:
-
Enable
— Zero crossing detection is enabled. -
Disable
— Zero crossing detection is disabled. -
Expose discontinuities to solver
— Gap detection using a solver.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
Main
#
Output data type —
type of output data
Inherit: auto
| Same as input
| Float64
| Float32
| Float16
| Int8
| UInt8
| Int16
| UInt16
| Int32
| UInt32
| Int64
| UInt64
| Int128
| UInt128
| Fixed-point
Details
Select the data type for the output data.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Output fixed-point type —
the output type of fixed-point numbers
Data type
Details
Specify the output type of fixed-point numbers.
Dependencies
To use this parameter, set for the parameter Output data type meaning Fixed-point
.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
Yes |
#
Integer rounding mode —
rounding mode for fixed point operations
Ceiling
| Convergent
| Floor
| Nearest
| Round
| Zero
Details
Select the rounding mode for fixed-point operations. You can choose:
-
Ceiling
— rounds up both positive and negative numbers (towards positive infinity). -
Convergent
— rounds the number to the nearest representable value. If the fractional part of the number ends in5
, the number is rounded to the nearest even integer. -
Floor
— rounds down both positive and negative numbers (towards negative infinity). -
Nearest
— rounds the number to the nearest representable value. If the fractional part of the number ends in5
, the number is rounded up (towards positive infinity). -
Round
— rounds the number to the nearest integer. -
Zero
— rounds the number towards zero.
The block parameters are always rounded to the nearest representable value.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Saturate on integer overflow —
overflow behavior
Logical
Details
When this option is selected, saturation is applied to all internal operations in the block, not just to the output or result. In general, the code generation process can determine when overflow is not possible. In this case, the code generator does not generate a saturation code.
Action | Justification | Effect on overflow | Example |
---|---|---|---|
The flag Saturate on integer overflow installed (enabled). |
Overflow is possible for your model, and you want explicit overflow protection in the generated code. |
In case of overflow, the result is automatically replaced with the maximum possible (modulo) value for the data type. |
The number |
The flag Saturate on integer overflow not installed (disabled). |
You want to optimize the efficiency of your generated code. |
Overflows are transferred to the appropriate value, which can be represented by a data type. |
The number |
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |