Operator CastType

The operator CastType changes the logical link property Arithmetic. The bits of the input and output values are equal. No changes of the value are done in hardware. Therefore, the operator does not require any FPGA resources.

Bit Width Input Value Input Arithmetic Output Arithmetic Output Value Comment
Decimal Binary Decimal Binary
4 5 0101 unsigned signed 5 0101
4 10 1010 unsigned signed -6 1010 interpretation of value has been changed
4 5 0101 signed unsigned 5 0101
4 -1 1111 signed unsigned 15 1111 interpretation of value has been changed

Table 22. Examples


I/O Properties

Property Value
Operator Type O
Input Link I, data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 64]1 as I
Arithmetic {unsigned, signed} {unsigned, signed}
Parallelism any as I
Kernel Columns any as I
Kernel Rows any as I
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} as I
Color Format any as I
Color Flavor any as I
Max. Img Width any as I
Max. Img Height any as I

1

The range of the input bit width is [1, 64]. For signed inputs, the range is [2, 64]. For unsigned color inputs, the range is [3, 63] and for signed color, the range is [6, 63].

Parameters

None

Examples of Use

The use of operator CastType is shown in the following examples: