Typecast a floating-point type to an unsigned integer or vice versa
HDL Coder / HDL Floating Point Operations
The block casts the underlying bits of the input to the corresponding fixed-point or floating point representation. The input and output of the block contain the same number of bits.
|Input Data Type||Output Data Type|
This figure shows how the block mask, behavior, and output data type changes dynamically depending on the input data type that you specify.
Port_1(u) — Input signal
Port to provide input to the block.
Port_1(y) — Output signal
Port to obtain calculated output from the block.
C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.
HDL Code Generation
Generate Verilog and VHDL code for FPGA and ASIC designs using HDL Coder™.
The block supports HDL code generation in the
Point mode. To use this mode, specify
uint32 data types as input to the block. With the HDL Code
Advisor, you can replace Data Type Conversion blocks that use the
Stored Integer (SI) mode and convert between
floating-point and fixed-point data types.
The block supports code generation for complex signals.