Operator LUT

Operator Library: Memory

运算符 LUT 是一个包含动态内容的查找表。输入链路的值定义了 LUT 的地址。然后,输出链路提供存储在该地址的值。输入 Bit Width 定义了 LUT 中的地址数量。输出 Bit Width 定义了每个 LUT 元素的取值范围。两者均可设置为任意值。LUT 内容既可以在综合前更改,也可以在运行时动态更改。

有关算子延迟的信息, 请参阅 表 46“Library Memory 中各算子的延迟”。

I/O Property

Property 值
Operator Type O
Input Link I, image data input
Output Link O,数据输入

Supported Link Format

Link Parameter Input Link I Output Link O
Bit Width [1, 16]1 [1, 63 无符号 / 64 有符号]2
Arithmetic {unsigned} {63 位无符号,64 位有符号}
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
键入 动态/静态读/写参数
默认 恒等函数
范围 [0, 2^OuptuBitWidth-1]

此字段参数定义了 LUT 内容。字段值的数量由运算符的输入 bit width 决定。

了解如何配置字段参数,请参见 'Parameter Editing'。

[注意] 输入 Bit Width 已更改

如果更改了输入 bit width,此参数中的字段元素数量也会随之改变。如果减小输入 bit width,值将被截断和删除。如果增大输入 bit width,新的字段元素将被设置为 0。

[注意] 警告状态

如果 BRAM 的运行容量低于 25%,LUTcontent 参数可能会进入警告状态。

ImplementationType
键入 静态写参数
默认 AUTO
范围 (AUTO, BRAM, LUTRAM, URAM)

参数 ImplementationType 会影响 operator 的实现策略,即用于实现该 operator 的 Memory 元素。

您可以选择以下值之一:

AUTO: 根据所连接链路的参数化,自动选择最佳的实现策略。AUTO 仅在 BRAM 和 LUTRAM 之间进行选择。

BRAM: operator 使用 FPGA 的 Block RAM。

LUTRAM: operator 使用 FPGA 的 LUT RAM。

URAM: operator 使用 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 的使用: