Engee documentation

Data Type Conversion Inherited

Changes the signal data type using the inherited data type and scaling.

blockType: Conversion Inherited

Path in the library:

/Basic/Signal Attributes/Data Type Conversion Inherited

Description

The Data Type Conversion Inherited block converts one input to a data type and scales the other input. The first input is used as a reference signal. The second input, u, is converted to a reference type by inheriting the data type and scaling information.

Inheriting the data type and scaling provides these advantages:

  • Simplifies the usage of existing models.

  • Allows new fixed-point models to be created with less effort, as detailed specification of the relevant parameters can be avoided.

Ports

Input

# IN — reference signal
scalar | vector | matrix | N-dimensional array

Details

A reference signal that defines the data type used to convert the input signal u. Defined as a scalar, vector, matrix or N-dimensional array.

Data types

Float16,Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point.

Complex numbers support

Yes

# u — input signal for conversion
scalar | vector | matrix | N-dimensional array

Details

Input signal for conversion to a reference data type specified as a scalar, vector, matrix or N-dimensional array.

Data types

Float16,Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point.

Complex numbers support

Yes

Output

# y — output signal
scalar | vector | matrix | N-dimensional array

Details

An output signal that is a transformed u signal to a reference data type.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point.

Complex numbers support

Yes

Parameters

Main

# Input and Output to have equal — limitation for converting fixed-point data types
Real World Value | Stored Integer

Details

Specify which type of input and output should be the same for fixed-point signals.

  • Real World Value – make a value Real World Value the input value is equal to Real World Value exit.

  • Stored Integer – make a value Stored Integer the input value is equal to Stored Integer at the exit.

Values

Real World Value | Stored Integer

Default value

Real World Value

Program usage name

ConvertRealWorld

Tunable

No

Evaluatable

No

# 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:

  • Floor — rounds down both positive and negative numbers (towards negative infinity).

  • 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 in 5, the number is rounded to the nearest even integer.

  • Convergent — rounds the number to the nearest representable value. If the fractional part of the number ends in 5, the number is rounded up (towards positive infinity).

  • Round — rounds the number to the nearest integer.

  • Zero — rounds the number towards zero.

Values

Ceiling | Convergent | Floor | Nearest | Round | Zero

Default value

Floor

Program usage name

RndMeth

Tunable

No

Evaluatable

No

# Saturate to max or min when overflows occur — method of action in case of overflow
Logical

Details

When this check box is selected, the value that goes beyond the type limits is reset to the maximum or minimum value that the selected data type can represent. Otherwise, overflow transfer occurs.

When this option is selected, saturation is applied to all internal operations in the block, not just to the output or result.

Default value

false (switched off)

Program usage name

DoSatur

Tunable

No

Evaluatable

No