Operator SUB

Operator Library: Arithmetics

Operator SUB 計算輸入連結 I1 與輸入連結 I2 之間的差值,即 O = I1 - I2

I/O Properties

Property Value
Operator Type O
輸入連結 I1,資料輸入
I2,資料輸入
Output Link O, data output

支援的 Link 格式

Link Parameter Input Link I1 輸入連結 I2 Output Link O
Bit Width [1, 62] unsigned, [2, 62] signed [1, 62] unsigned, [2, 62] signed 自動1
Arithmetic {unsigned, signed} {unsigned, signed} signed
Parallelism any 同 I1 同 I1
Kernel Columns any 同 I1 同 I1
Kernel Rows any 同 I1 同 I1
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D} 同 I1
Color Format VAF_GRAY VAF_GRAY 同 I1
Color Flavor FL_NONE FL_NONE 同 I1
Max. Img Width any 同 I1 同 I1
Max. Img Height any 同 I1 同 I1

1

輸出 Bit Width 會根據輸入連結的 Bit Width 自動決定。 輸出 Bit Width 由以下決定:

參數

ImplementationType
Type 靜態寫入參數
Default AUTO
Range (AUTO, EmbeddedALU, LUT)

參數 ImplementationType 會影響 operator 的實作策略,亦即 使用哪些邏輯元素來實作 operator。

您可以選擇以下其中一個值:

AUTO: 當具現化 operator 時,會根據所連接 link 的參數化設定, 自動選擇最佳的實作策略。

EmbeddedALU:此運算子使用 FPGA 中非基於 LUT 的內嵌算術邏輯元素。

LUT:此運算子使用 FPGA 的 LUT 邏輯。

[備註] 一般情況下請使用 AUTO

Normally, the parameter should be set to AUTO. In special cases, i.e., if one kind of FPGA ressource runs short in a design, you can manually influence the FPGA resource management using the values EmbeddedALU and/or LUT.

使用範例

Operator SUB 的使用方式如以下範例所示: