CastType operator

Operator Library: Base

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

Bit Width Input Value Input Arithmetic Output Arithmetic 출력 값 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
입력 링크 I, data input
출력 링크 O, data output

지원되는 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]이고, 부호 있는 컬러의 경우 범위는 [6, 63]입니다.

Parameters

None

사용 예

CastType 연산자의 사용법은 다음 예시에 나와 있습니다.