运算符 FrameBufferRandomRead

Operator Library: Memory

This operator facilitates the random read of the buffered data. The frame data is transferred into the operator via link I. The random read of the data can be performed by transferring addresses to ports RColA (read column address) and RRowA (read row address). The operator will use the addresses to read the frame data by the given coordinates. The resulting output frame will have the image dimensions of the address inputs. One VisualApplets resource of type RAM is required. Check 'Allocation of Device Resources' for more information. For information on the latency of the operator, see Table 46, 'Individual Latencies of the Operators in Library Memory'.

The FrameBufferRandomRead (frame buffer random read) operator buffers the image stream in the Frame Grabber RAM (DRAM). One VisualApplets resource of type RAM is required.

该算子有两种状态:

  1. Write State: Input images are stored in the buffer. The operator works like a FIFO. If enough memory is available, multiple images can be stored in the buffer.

  2. Read State: After an image has been fully stored in the memory, the memory is read-out using the addresses given at the inputs RColA and RRowA. The number of addresses and address link image dimensions define the image output width and height.

The image data input and the address inputs are not synchronous to each other. They may have different image dimensions. Both address inputs RColA and RRowA have to be O-synchronous.

Please note the timing of the input links. The address inputs must not be sourced by the same operator as the data link input I without buffering. This is because while writing the image data into the operator, no addresses to read the current frame can be accepted. Only if the frame is fully stored into the buffer, addresses can be accepted. In many cases, the operator CreateBlankImage is used to generate the images for the addresses.

The operator uses large non-FPGA memory. If only small frames or lines have to be stored consider using operators FrameMemoryRandomRd or LineMemoryRandomRd.

To measure the fill level of the buffer the operator provides 2 parameters: FillLevel and Overflow. FillLevel shows the percentage fill level of the RAM. The Overflow parameter is set to 1 when FillLevel is close to or is 100% and the next image to be stored in the buffer will exceed the RAM capacity. In case of an overflow, input frames are discarded. Users have to poll for the overflow parameter. As the duration of the overflow state can be very short it is possible that it is in between of a polling cycle of the operator.

Parameter InfiniteSource is used to specify if the operator is directly connected to a camera or is sequenced with other memory operators. Check 'Infinite Sources / Connecting Cameras' for more information.

算子限制

  • 不支持空帧。

  • 不支持具有不同行长的图像。

  • The Parallelism on the address ports has to be set to 2.

  • I.MaxImgWidth * I.MaxImgHeight must not exceed the available RAM size: 2^RamAddressWidth.

带宽优化

通过使用 Frame Grabber RAM (DRAM) 的算子的理论带宽 [bits/second] 根据以下公式计算:

然而,由于 DRAM 效率,实际带宽总是小于理论带宽。

如果 Bit Width 和 Parallelism 的乘积等于内部 RAM Port Width,则达到穿过算子的 maximum bandwidth。

[注意] 平台特定值

RAM Port Width 和系统时钟是平台特定的。有关您各个平台的详细信息,请参阅 Device Resources。

I/O Property

Property 值
Operator Type M
输入链路 I, image data input
RColA, read column address for the pixel at I
RRowA, read row address for the pixel at I
Output Link O,数据输入

同步和异步输入

  • Synchronous Group: RColA and RRowA
  • Input I is asynchronous to the group.

支持的 Link Format

Link Parameter Input Link I 输入链接 RColA Input Link RRowA Output Link O
Bit Width [1, 64]1 auto2 auto3 as I
Arithmetic {unsigned, signed} unsigned unsigned as I
Parallelism 1 {1, 2}4 作为 RColA as I
Kernel Columns [1, Ram Data Width / Bit Width / Kernel Rows]5 1 1 as I
Kernel Rows [1, Ram Data Width / Bit Width / Kernel Columns]5 1 1 as I
Img Protocol VALT_IMAGE2D as I as I as I
Color Format any VAF_GRAY VAF_GRAY as I
Color Flavor any FL_NONE FL_NONE as I
Max. Img Width any6 any 作为 RColA 作为 RColA
Max. Img Height any6 any 作为 RColA 作为 RColA

1

输入 Bit Width 的范围为:

  • 对于无符号输入:[1, 64]

  • 对于有符号输入:[2, 64]

  • 对于无符号彩色输入:[3, 63]

  • 对于有符号彩色输入:[6, 63]。

The input Bit Width must not exceed the native ram data width. Check Device Resources for more information.

2

列地址的 Bit Width 为:

3

行地址的 Bit Width 为:

4

The Parallelism on the address ports has to be set to 2 in order to use the operator in an efficient way.

5

I.BitWidth x I.Kernel Columns x I.Kernel Rows <= RamDataWidth.

6

I.MaxImgWidth * I.MaxImgHeight must not exceed the available RAM size: 2^RamAddressWidth.

参数

RamDataWidth
键入 静态写参数
默认 不适用
范围 整数

此参数提供可在 RAM 接口上使用的数据位数。它是输入和输出的最大位数。

RamAddressWidth
键入 静态写参数
默认 不适用
范围 整数

This parameter provides the number of address bits available. This helps to calculate the maximum allowed image dimensions and the maximum address width.

FillLevel
键入 动态读取参数
默认 0
范围 [0%, 100%]

This parameter provides the fill level of RAM.

Overflow
键入 动态读取参数
默认 0
范围 [0, 1]

此参数指示缓冲区溢出。

InfiniteSource
键入 静态参数
默认 已启用
范围 {ENABLED, DISABLED}

This parameter activates support for infinite source operators like Camera operators. See 'Infinite Sources / Connecting Cameras' for more information.

使用示例

The use of operator FrameBufferRandomRead is shown in the following examples: