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 43, '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.
The operator has two states:
-
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.
-
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.
Operator Restrictions
-
Empty frames are not supported.
-
Images with varying line lengths are not supported.
-
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.
The theoretical bandwidth [bits/second] going through an operator that uses the Frame Grabber RAM (DRAM) is calculated in accord with the following formula:
However, the actual bandwidth is always less than the theoretical bandwidth due to the DRAM efficiency.
The maximum bandwidth going through the operator is reached if the product of Bit Width and Parallelism is equal to the internal RAM Port Width.
Platform-specific values | |
---|---|
RAM Port Width and System Clock are platform-specific. See Appendix. Device Resources for detailed information on your individual platform. |
Property | Value |
---|---|
Operator Type | M |
Input Links | 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, data input |
Synchronous and Asynchronous Inputs
- Synchronous Group: RColA and RRowA
- Input I is asynchronous to the group.
The range of the input bit width is:
The input bit width must not exceed the native ram data width. Check Appendix. Device Resources for more information. |
|
The bit width of the column address is: |
|
The bit width of the row address is: |
|
The parallelism on the address ports has to be set to 2 in order to use the operator in an efficient way. |
|
I.BitWidth x I.Kernel Columns x I.Kernel Rows <= RamDataWidth. |
|
I.MaxImgWidth * I.MaxImgHeight must not exceed the available RAM size: 2^RamAddressWidth. |
RamDataWidth | |
---|---|
Type | static write parameter |
Default | 0 |
Range | Integer number |
This parameter provides the number of data bits that can be used at the RAM interface. It's the maximum number of bits for input and output. |
RamAddressWidth | |
---|---|
Type | static write parameter |
Default | 0 |
Range | Integer number |
This parameter provides the number of address bits available. This helps to calculate the maximum allowed image dimensions and the maximum address width. |
FillLevel | |
---|---|
Type | dynamic read parameter |
Default | 0 |
Range | [0%, 100%] |
This parameter provides the fill level of RAM. |
Overflow | |
---|---|
Type | dynamic read parameter |
Default | 0 |
Range | [0, 1] |
This parameter indicates a buffer overflow. |
InfiniteSource | |
---|---|
Type | static parameter |
Default | ENABLED |
Range | {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:
-
'Color Plane Separation Option 5 - Sequential Output with Advances Processing'
Example on separation of color planes. The RGB input is split into its component and sequentially output via one DMA channel. The splitting if performed by collecting same components in parallel words and reading with FrameBufferRandomRead.
-
'Geometric Transformation Using FrameBufferRandomRead'
Examples- Geometric Transformation using FrameBufferRandomRead
-
'Geometric Transformation and Distortion Correction'
Examples- Geometric Transformation and Distortion Correction using PixelReplicator
-
Examples- Distortion Correction
-
Examples - Scaling A Line Scan Image
-
Examples - Scaling A Line Scan Image
-
'Image Composition Using Exposure Fusion'
Examples - ExposureFusion