Operator FrameMemoryRandomRd

The FrameMemoryRandomRd (frame memory random read) operator buffers an image in memory with random read access. 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.

The required memory size is defined by the image dimension of the input frame (Max. Img Width and Max. Img Height).

For information on the latency of the operator, see Table 33, 'Individual Latencies of the Operators in Library Memory'.

The operator can be implemented in two variants. Namely, a single buffer implementation and a double buffer implementation. The first implementation saves RAM, but does not allow a timely overlap of writing and reading. Thus the address input links RColA and RRowA are stopped during the write state. The latter implementation doubles the RAM and allows to random read the last frame while accepting the next frame at the input link I.

The operator has two states:

  1. Write State: The pixels of link I are stored linear in the buffer i.e. the coordinates of the pixels form the addresses in the buffer.

  2. Read State: 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. For example, if a frame consisting of only one pixel is input at the address inputs, the output frame will only consist of one pixel. The other pixels of the input frame are discarded.

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 not 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 is used to generate the images for the addresses.

The timing is visualized in the following figure.

The operator uses the FPGA's internal block RAM memory. Thus, no VisualApplets frame grabber resources of type RAM are used. The FPGA-internal block RAM is limited. Full resolution frames might not fit into the FPGA-internal block RAM. Consider using operator FrameBufferRandomRead instead.

Operator Restrictions

  • Empty frames are not supported.

    Images with varying line lengths are not supported.

I/O Properties

Property Value
Operator Type M
Input Links I, image data input
RColA, read column address for the pixel at I
Output Links RRowA, read row address for the pixel at I
O, data input

Synchronous and Asynchronous Inputs

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

Supported Link Format

Link Parameter Input Link I Input Link RColA Output Link RRowA Output Link O
Bit Width [1, 64]1 auto2 auto3 as I
Arithmetic {unsigned, signed} unsigned unsigned as I
Parallelism 1 as I as I as I
Kernel Columns any 1 1 as I
Kernel Rows any 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 any any as RColA as RColA
Max. Img Height any any as RColA as RColA

1

The range of the input bit width is [1, 64] for unsigned inputs. For signed inputs, the range is [2, 64]. For unsigned color inputs, the range is [3, 63] and for signed color, the range is [6, 63].

2

The bit width of the column address is:

3

The bit width of the row address is:

Parameters

Implementation
Type static parameter
Default SingleBuffer
Range {SingleBuffer, DoubleBuffer}

This parameter selects the implementation of the FrameMemoryRandomRd (see above).

Examples of Use

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