Data Type Conversion Inherited
Changes the signal data type using the inherited data type and scaling.
blockType: Conversion Inherited
Path in the library:
|
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 |
|
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 |
|
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 |
|
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 valueReal World Value
the input value is equal toReal World Value
exit. -
Stored Integer
– make a valueStored Integer
the input value is equal toStored Integer
at the exit.
Values |
|
Default value |
|
Program usage name |
|
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 |
|
Default value |
|
Program usage name |
|
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 |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |