Operator CastType

Operator Library: Base

CastType 연산자는 논리적 링크 Property인 Arithmetic을 변경합니다. 입력값과 출력값의 비트는 동일합니다. 하드웨어에서 값의 변경은 수행되지 않습니다. 따라서 이 연산자는 FPGA 리소스를 전혀 요구하지 않습니다.

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 값의 해석이 변경되었습니다
4 5 0101 signed unsigned 5 0101
4 -1 1111 signed unsigned 15 1111 값의 해석이 변경되었습니다

표 33. 예시


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

입력 Bit Width의 범위는 [1, 64]입니다. Signed 입력의 경우 범위는 [2, 64]입니다. Unsigned 컬러 입력의 경우 범위는 [3, 63]이며, Signed 컬러의 경우 범위는 [6, 63]입니다.

Parameters

없음

사용 예제

CastType 연산자의 사용법은 다음 예시와 같습니다: