Operator FrameMemory

The FrameMemory operator is a memory block which stores input images using random write access. The write addresses are specified with input links row address RowA and column address ColA. Thus, for each input pixel value, a row and column address has to be specified.

After a frame has been written to the memory, it is read and output using link O. The output image dimension is defined with parameters and is independent of the input image dimension. The memory is pre-initialized with values zero.

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

The memory size is defined by parameters FrameWidth and FrameHeight.

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 input link I is stopped during the read state. The latter implementation doubles the RAM and allows to output a frame while accepting the next frame at the input link I.

The operator has two states:

  1. Write State: The value of Link I is stored at the address specified with ColA and RowA. This is done only if link WriteI is one. If link WriteI is zero, the current pixel is skipped. Writing to any address of the valid address range is possible. It is not necessary to write to each memory cell.

  2. Read State: The memory is read out sequentially and produces a line of the parameterized width. By use of parameters XOffset, XLength, YOffset and YLength it is possible to define the read address range i.e. a ROI. Reading the memory resets the content of the read addresses to zero. Thus if a memory cell is read which has not been written before, a zero will be output.

The toggling between these two states is triggered by an end-of-frame at the input link I. Please note, that the frame width and height at the output link is fixed to the size defined by parameters XOffset, XLength, YOffset and YLength and is independent from the line width and frame height of the input link.

The operator can be useful for mirroring or sensor correction.

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
WriteI, write enable input
ColA, write column address for the pixel at I
RowA, write row address for the pixel at I
Output Link O, data input

Synchronous and Asynchronous Inputs

  • All inputs are synchronous to each other i.e. they have to be sourced by the same M-type operator through an arbitrary network of O-type operators.

Supported Link Format

Link Parameter Input Link I Input Link WriteI Input Link ColA Input Link RowA Output Link O
Bit Width [1, 64]1 1 auto2 auto3 as I
Arithmetic {unsigned, signed} unsigned unsigned unsigned as I
Parallelism 1 as I as I as I as I
Kernel Columns any 1 1 1 as I
Kernel Rows any 1 1 1 as I
Img Protocol VALT_IMAGE2D as I as I as I as I
Color Format any VAF_GRAY VAF_GRAY VAF_GRAY as I
Color Flavor any FL_NONE FL_NONE FL_NONE as I
Max. Img Width any as I as I as I parameter FrameWidth
Max. Img Height any as I as I as I parameter FrameHeight

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 FrameMemory (see above).

FrameWidth
Type static parameter
Default 1024
Range [0, 65534]

This parameter selects the image width of the output link in pixels.

FrameHeight
Type static parameter
Default 1024
Range [0, 65534]

This parameter selects the image height of the output link in lines.

XOffset
Type dynamic/static read/write parameter
Default 0
Range [0, Max.Img Height - YLength]

This parameter defines the y-coordinate of the upper left corner of the ROI.

XLength
Type dynamic/static read/write parameter
Default 1024
Range [1, Max.Img Width - XOffset]

This parameter defines the width of the ROI.

YOffset
Type dynamic/static read/write parameter
Default 0
Range [0, Max.Img Height - YLength]

This parameter defines the y-coordinate of the upper left corner of the ROI.

YLength
Type dynamic/static read/write parameter
Default 1024
Range [1, Max.Img Height - YOffset]

This parameter defines the height of the ROI.