Operator Library: Memory
The LineMemory operator is a memory block which stores incoming images lines using random write access. The write addresses are specified with input link column address ColA. Thus for each input pixel value, a column address has to be specified.
After a line has been fully written to the memory, it is read and output using link O. The output image width is defined with parameters and is independent of the input image width. The memory is pre-initialized with values zero.
For information on the latency of the operator, see Table 43, 'Individual Latencies of the Operators in Library Memory'.
The memory size is defined by parameter FrameWidth.
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 an image line while accepting the next line at the input link I.
The operator has two states:
-
Write State: The value of Link I is stored at the address specified with ColA. 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. There is no necessity to write to each memory cell.
-
Read State: The memory is read out sequentially and produces a line of the parameterized width. By use of parameters XOffset and XLength 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-line at the input link I. Please note, that the line width at the output link is fixed to the size defined by parameters XOffset and XLength and is independent from the line width of the input link.
The operator can be useful for mirroring or sensor correction.
The operator uses the FPGA-internal block RAM or UltraRAM memory (URAM is only available for the imaFlex CXP-12 Quad and imaFlex CXP-12 Penta platforms). 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.
Property | Value |
---|---|
Operator Type | M |
Input Links | I, image data input WriteI, write enable input ColA, write column 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.
ImplementationType (imaFlex CXP-12 Quad and imaFlex CXP-12 Penta platforms) | |||||||
---|---|---|---|---|---|---|---|
Type | static write parameter | ||||||
Default | AUTO | ||||||
Range | (AUTO, BRAM, URAM) | ||||||
Parameter ImplementationType influences the implementation strategy of the operator, i.e., which memory elements are used for implementing the operator. You can select one of the following values: AUTO: The optimal implementation strategy is selected automatically based on the parametrization of the connected links. BRAM: The operator uses the Block RAM of the FPGA. URAM: The operator uses the UltraRAM of the FPGA.
|
Implementation | |
---|---|
Type | static parameter |
Default | SingleBuffer |
Range | {SingleBuffer, DoubleBuffer} |
This parameter selects the implementation of the LineMemory (see above). |
FrameWidth | |
---|---|
Type | static parameter |
Default | 1024 |
Range | [0, 65534] |
This parameter selects the image width of the output link in pixels. |
XOffset | |
---|---|
Type | dynamic/static read/write parameter |
Default | 0 |
Range | [0, Max.Img Height - XLength] |
This parameter defines the x-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. |
The use of operator LineMemory is shown in the following examples:
-
Examples - Shows how to vertically mirror an image. Note the mirroring of the parallel words and the pixel.
-
'Functional Example for Specific Operators of Library Memory and Library Signal'
Examples - Demonstration of how to use the operator