Force all inputs to same data type
Simulink / Signal Attributes
HDL Coder / Signal Attributes
The Data Type Duplicate block forces all inputs to have the same data type. Other attributes of input signals, such as dimension, complexity, and sample time, are independent.
You can use the Data Type Duplicate block to check for consistency of data types among blocks. If all signals do not have the same data type, the block returns an error message.
The Data Type Duplicate block is typically used such that one signal to the block controls the data type for all other blocks. The other blocks are set to inherit their data types via backpropagation.
The block can also be useful in a user created library. These library blocks can be placed in any model, and the data type for all library blocks are configured according to the usage in the model. To create a library block with more complex data type rules than duplication, use the Data Type Propagation block.
Port_1— First input signal
First input signal, specified as a scalar, vector, matrix, or N-D array. If all signals do not have the same data type, the block returns an error message.
fixed point |
Port_N— Nth input signal
Nth input signal, specified as a scalar, vector, matrix, or N-D array. If all signals do not have the same data type, the block returns an error message.
fixed point |
Number of input ports— Number of block inputs
2(default) | real-valued positive integer
Specify the number of inputs to this block as a real-valued positive integer.
|Type: character vector|
|Values: real-valued positive integer|
HDL Coder™ provides additional configuration options that affect HDL implementation and synthesized logic.
This block can be used to force inputs to have same data type in subsystems that generate code, but is not included in the hardware implementation.