DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 5/27/2022

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

15.4.48. Reinterpret Cast (ReinterpretCast)

The ReinterpretCast block outputs the same bit pattern that it reads on its input port, but casts it to a data type that you specify with the block parameters. This data type should use the same number of bits as the bit width of the input signal.
Table 234.  Parameters for the ReinterpretCast Block
Parameter Description
Output data type mode Determines how the block sets its output data type:
  • Inherit via internal rule: the number of integer and fractional bits is the maximum of the number of bits in the input data types.
  • Inherit via back projection: a downstream block that this block drives determines the output data type. If the driven block does not propagate a data type to the driver, you must use a Simulink SameDT block to copy the required data type to the output wire.
  • Specify via dialog: you can set the output type of the block explicitly using additional fields that are available when this option is selected.This option reinterprets the output bit pattern from the LSB up according to the specified type.
  • Boolean: the output type is Boolean.
  • Single: single-precision floating-point data.
  • Double: double-precision floating-point data.
  • Variable precision floating point: variable precision floating-point output type
Output data type Specifies the output data type. For example, sfix(16), uint(8).
Output scaling value Specifies the output scaling value. For example, 2^-15.
Floating point precision Specifies the floating-point precision. For example, float32_m23.
Table 235.  Port Interface for the ReinterpretCast Block
Signal Direction Type Description Vector Data Support Complex Data Support
a Input Any fixed- or floating-point type Operand Yes Yes
q Output User specified Result Yes Yes