Data Type Conversion Inherited
Change the signal data type using inherited data type and scaling.
Description
Block Data Type Conversion Inherited 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
| array N-D
Details
A reference signal that defines the data type used to transform the input signal u. Defined as a scalar, vector, matrix or N-D array.
Data types |
|
Complex numbers support |
Yes |
#
u
—
input signal for conversion
scalar
| vector
| matrix
| array N-D
Details
Input signal for conversion to a reference data type specified as a scalar, vector, matrix or N-D array.
Data types |
| |
Complex numbers support |
Yes |
Output
#
y
—
output signal
scalar
| vector
| matrix
| array N-D
Details
Output signal u converted to a reference data type.
Data types |
| |
Complex numbers support |
Yes |
Parameters
Main
#
Input and Output to have equal —
restriction for conversion of fixed-point data types
Real World Value
| Stored Integer
Details
Specify which input and output type must be the same for fixed-point signals.
-
Real World Value
- make the value ofReal World Value
of input equal to the value ofReal World Value
of output. -
Stored Integer
- make theStored Integer
value of the input equal to theStored Integer
value of the output.
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 select:
-
Floor
- rounds both positive and negative numbers downwards (towards negative infinity). -
Ceiling
- rounds both positive and negative numbers upwards (towards positive infinity). -
Convergent
- rounds a 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. -
Nearest
- rounds the number to the nearest representable value. If the fractional part of the number ends in 5, the number is rounded upwards (towards positive infinity). -
Round
- rounds the number to the nearest representable value. If the fractional part of the number ends in 5, positive numbers are rounded upwards (towards positive infinity), and negative numbers are rounded downwards (towards negative infinity).
-
Zero
- rounds the number towards zero.
Block parameters are always rounded to the nearest representable value.
Values |
|
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |
#
Saturate to max or min when overflows occur —
overflow action method
Logical
Details
When this checkbox is selected, a value that exceeds the type boundaries is reset to the maximum or minimum value that the selected data type can represent. Otherwise, the overflow is carried over.
When this checkbox is selected, saturation is applied to all internal operations in the block, not just the output data or result.
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |