Operator CastType

Operator Library: Base

オペレータ CastType は、論理リンクプロパティ Arithmetic を変更します。 入力値と出力値のビットは同等です。ハードウェアでの値の変更は行われません。 そのため、このオペレータは FPGA リソースを必要としません。

Bit Width Input Value Input Arithmetic Output Arithmetic 出力値 Comment
10進数 2進法 10進数 2進法
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 Property

Property 値
オペレータータイプ O
Input Link I, data input
Output Link O, data output

サポートされているリンクフォーマット

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] です。 符号付き入力の場合の範囲は [2, 64] です。 符号なしカラー入力の場合の範囲は [3, 63] であり、符号付きカラーの場合の範囲は [6, 63] です。

パラメーター

None

使用例

オペレータ CastType の使用例を以下に示します。