運算子 LUT

Operator Library: Memory

LUT 運算子是一個動態內容的查詢表。輸入連結的值定義了 LUT 的位址。接著,輸出連結將提供儲存在此位址的值。輸入 Bit Width 定義了 LUT 中的位址數量。輸出 Bit Width 定義了每個 LUT 元素的數值範圍。兩者皆可設定為任意值。LUT 內容可以在合成前或執行期間動態變更。

有關運算子延遲的資訊,請參見 表 46「Library Memory 中運算子的各別延遲」。

I/O Properties

Property Value
Operator Type O
Input Link I,影像資料輸入
Output Link O,資料輸入

支援的 Link 格式

Link Parameter Input Link I Output Link O
Bit Width [1, 16]1 [1, 63 unsigned / 64 signed]2
Arithmetic {unsigned} {63 bit unsigned, 64 bit 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 VAF_GRAY as I
Color Flavor FL_NONE as I
Max. Img Width any as I
Max. Img Height any as I

1

如果您已將參數 ImplementationType 設定為 URAM,則輸入連結的 Bit Width 必須設定為 1 到 14 之間的值。

URAM 僅適用於 imaFlex CXP-12 Quad 與 imaFlex CXP-12 Penta 平台。

2

如果您已將參數 ImplementationType 設定為 URAM,則輸出連結的 Bit Width 取決於輸入連結的 bit width:

  • If the bit width of the input link <= 12, you can set any value.

  • 如果輸入連結的 bit width = 13 或 14,請將輸出連結的 bit width 設定為 1 到 16 之間的值。

URAM 僅適用於 imaFlex CXP-12 Quad 與 imaFlex CXP-12 Penta 平台。

參數

LUTcontent
Type dynamic/static read/write parameter
Default 識別函數
Range [0, 2^OuptuBitWidth-1]

此欄位參數定義了 LUT 內容。欄位值的數量由運算子的輸入 bit width 定義。

請參閱 「Parameter Editing」 了解如何設定欄位參數。

[備註] Input Bit Width 已變更

如果變更輸入 bit width,此參數中的欄位元素數量也會隨之改變。如果縮小輸入 bit width,數值將會被截斷並刪除。如果擴大輸入 bit width,新的欄位元素將會設為 0。

[備註] 警告狀態

如果 BRAM 的運作容量低於 25%,LUTcontent 參數可能會進入警告狀態。

ImplementationType
Type 靜態寫入參數
Default AUTO
Range (AUTO, BRAM, LUTRAM, URAM)

參數 ImplementationType 會影響運算子的實作策略, 即用於實作運算子的記憶體元素。

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

AUTO: 系統會根據所連接連結的參數化設定,自動選擇最佳的實作策略。AUTO 僅在 BRAM 與 LUTRAM 之間進行選擇。

BRAM: Operator 使用 FPGA 的 Block RAM。

LUTRAM: Operator 使用 FPGA 的 LUT RAM。

URAM: 運算子使用 FPGA 的 UltraRAM。

[備註] URAM 的可用性與限制

URAM 值僅適用於 imaFlex CXP-12 Quad 與 imaFlex CXP-12 Penta 平台。

URAM 具有下列限制:

  • 輸入連結的 Bit Width 必須設定為 1 到 14 之間的值。

  • 輸出連結的 Bit Width 取決於輸入連結的 bit width:

    • If the bit width of the input link <= 12, you can set any value.

    • 如果輸入連結的 bit width = 13 或 14,請將輸出連結的 bit width 設定為 1 到 16 之間的值。

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

通常,該參數應設定為 AUTO。在特殊情況下,亦即當設計中的某種 FPGA 資源短缺時, 您可以使用值 BRAM、LUTRAM 或 URAM 手動影響 FPGA 資源管理 (URAM 僅適用於 imaFlex CXP-12 Quad 與 imaFlex CXP-12 Penta 平台)。

AUTO 僅在 BRAM 與 LUTRAM 之間進行選擇。

使用範例

LUT 運算子的使用方式如以下範例所示: