Operator Library: Memory
The LineBuffer operator buffers the image data stream in the Frame Grabber RAM (DRAM), which is a memory on the frame grabber but not in the FPGA. The LineBuffer operator is a replacement for the operator ImageBuffer, which is used for mE5 hardware platforms and provides the same features. imaFlex CXP-12 Quad doesn't support the operator ImageBuffer anymore, thus, when you convert a design from an mE5 hardware platform to an imaFlex CXP-12 Quad platform, any instance of ImageBuffer is automatically replaced by an instance of LineBuffer.
One VisualApplets resource of type RAM is required. See 'Allocation of Device Resources' for more information. Multiple resources of type RAM use the same physical RAM with the shared memory concept. Documentation for how to use the shared memory is available in section ' Shared Memory Concept '. Additionally, the LineBuffer operator features region-of-interest (ROI) support. The total number of bits (bit width times parallelism) must not exceed the memory limitations of the respective frame grabber.
The operator causes a latency of at least one line. Reading a line is started as soon as the line is fully written into the buffer. If the output is blocked, the operator buffers the input data.
The operator works like a FIFO. The buffer operates on image lines resulting in a very short memory latency. Any completed line of input data is immediately forwarded to the output as long as it is within the selected region of interest and the following modules can consume the data fast enough. As a result, frame data from a camera can be forwarded to the PC while the current frame transfer is still ongoing. The latency between ingoing and outgoing data increases, if the buffer gets filled with more lines. This happens, when the output is blocked for some time, in particular because the following modules can't process data at the same rate as the input bandwidth. Thus, the memory will only be filled, if the operator can't output the data at the same rate as the input provides data. Often, the operator is used to compensate peak input bandwidths.
With the parameters XOffset, XLength, YOffset and YLength you can define a region of interest. If the input image width is less than the sum of the XOffset and XLength, the LineBuffer operator still reads the parameterized XLength. In this case, the operator outputs undefined memory content for the additional pixels. If the input image height is less than the requested output image height, the operator only outputs the available lines. If the input image height is lower than YOffset
In Line1D application mode, the YOffset and YLength settings have no effect.
To measure the fill level of the buffer, the operator provides the following parameters: FillLevel, LineCount, and Overflow. FillLevel shows the fill level of the RAM in percent. LineCount provides the current number of lines that are saved in the buffer. The Overflow parameter is set to 1 when FillLevel is close to or equal to 100% and the next image to be stored in the buffer will exceed the RAM capacity. In case of an overflow, input data is discarded and the input image height is reduced. Overflows can only occur, if the data source is not stoppable, which means that InfiniteSource is set to ENABLED. As a result of an overflow, incomplete images might be stored in the memory. Incomplete images are automatically finalized and incoming data is discarded until there is space in the buffer for the next line.
The InfiniteSource parameter is used to specify whether the operator receives a data stream which can't be stopped, i.e. an unbuffered stream from a camera. Read 'Infinite Sources / Connecting Cameras' for more information.
Operator Restrictions
-
Empty frames are not supported.
Available Memory Space | |
---|---|
The operator provides the read-only parameter MaxLineCount which reports the maximum number of lines (defined by XLength) that fit in the RAM. This number further depends on the presence of other memory operators in the current design and the data bit width. |
Available for Hardware Platforms |
---|
imaFlex CXP-12 Quad |
In contrast to the ImageBuffer operator, the LineBuffer operator performs an automatic aggregation of pixels for matching the memory data width as close as possible, in order to reach an optimal performance.
If enabled by the ParallelismConverter parameter, you may adjust the output parallelism to a different value than the input parallelism. This enables defining an asymmetric peak data throughput between input and output of the operator. You can use this feature to avoid an additional instance of a PARALLELdn operator when the following data processing pipeline needs to work with a reduced parallelism.
Property | Value |
---|---|
Operator Type | M |
Input Link | I, image data input |
Output Link | O, image data output |
RamDataWidth | |
---|---|
Type | static write parameter |
Default | 0 |
Range | Integer number |
This parameter provides the number of data bits that can be used. |
XOffset | |
---|---|
Type | dynamic/static write parameter |
Default | 0 |
Range | [0, Max.Img Width - XLength] |
This parameter defines the x-coordinate of the upper left corner of the ROI. The step size is the input parallelism. |
XLength | |
---|---|
Type | dynamic/static write parameter |
Default | 1024 |
Range | [input parallelism, min(Max.Img Width, (2^RAM address width - 1) * internal RAM parallelism) - XOffset] |
This parameter defines the width of the ROI. The step size is the input parallelism. |
YOffset | |
---|---|
Type | dynamic/static 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 write parameter |
Default | 1024 |
Range | [1, Max.Img Height - YOffset] |
This parameter defines the height of the ROI. |
ParallelismConverter | |
---|---|
Type | static write parameter |
Default | No |
Range | {Yes, No} |
This parameter defines whether the LineBuffer operator implements a parallelism converter.
|
InfiniteSource | |
---|---|
Type | static write parameter |
Default | DISABLED |
Range | {ENABLED, DISABLED} |
The LineBuffer operator can be inserted directly behind a camera operator. In this case, the InfiniteSource parameter must be set to ENABLED. The operator will then perform active overflow management and make sure that the operator can properly recover from overflows. The overflow can occur either when the data sink behind the operator stops or pauses the transmission and the buffer fill level reaches its maximum or when the input bandwidth is too high so the write data can't be transferred to the external RAM. When InfiniteSource is set to DISABLED, an inhibit signal is generated that stops the proceeding operator from transferring data, if the buffer fill level or input bandwidth get too high. See 'Infinite Sources / Connecting Cameras' for more information. |
FillLevel | |
---|---|
Type | dynamic read parameter |
Default | 0 |
Range | [0%, 100%] |
This parameter provides the fill level of DRAM in percent. |
MaxLineCount | |
---|---|
Type | dynamic read parameter |
Default | 2^RAM address width / (XLength / internal RAM parallelism + 1) |
Range | [1, 2^RAM address width / 2] |
This parameter provides the maximum number of lines that currently fit into the memory. The maximum number of lines that fit into the memory depends on the, RAM address width, which depends on the number of instantiated RAM operators. |
LineCount | |
---|---|
Type | dynamic read parameter |
Default | 0 |
Range | [0, MaxLineCount] |
This parameter provides the current number of lines in the memory. |
Overflow | |
---|---|
Type | dynamic read parameter |
Default | 0 |
Range | [0, 3] |
This parameter indicates a buffer overflow. It's a 2-bit bitmap, where each bit indicates a different type of overflow. Bit 0 indicates a fill level overflow and bit 1 indicates a write bandwidth overflow. How long the Overflow parameter shows an overflow, depends on the OverflowClearMode. |
OverflowClearMode | |
---|---|
Type | dynamic write parameter |
Default | AutoClear |
Range | {AutoClear, ManualClear, ClearAfterRead, ClearWithProcessReset} |
OverflowClearMode determines how the Overflow parameter is cleared when the operator has recovered from an overflow. You can only reset the overflow status with this parameter, if the operator is not in overflow state anymore. Clear modes:
|