Benefits of Onboard Memory
Overview
Most frame grabbers provide some amount of onboard memory, either in the form a small FIFO buffer designed to hold a few video lines (4 KB), or a larger memory space sufficient to hold several images (16-80 MB). This document addresses the use of the latter version, typically found on digital frame grabbers.
Why Onboard Memory?
There are three acquisition modes designed for continuous display and processing of high-speed images: grab, ring, and sequence. The ring and sequence modes utilize multiple buffers to absorb delays introduced by processing or operating system interrupts. By allocating a sufficient number of buffers in system memory, you should be able to prevent losing frames even with an arbitrarily large delay. Unfortunately, that is not exactly true. To see this, let's compare the architectures of the two acquisition methods. A ring acquisition into system memory is shown below:
There are actually two bottlenecks in the transfer of image data from camera to processing buffer. The first is, as alluded to above, the need to process or copy images out of the acquisition buffers (Buffers 1, 2, and 3 above) before they are overwritten. The other bottleneck occurs in transferring the image from the frame grabber over the PCI bus and into system memory. This transfer rate has a theoretical limit of 132 MB/s, but that rate cannot be sustained constantly since other traffic must also share the bus. If there is no onboard memory and the PCI bus is tied up momentarily, the frame will be lost before it ever gets to system memory. The solution is to buffer the images on the board until the PCI bus is available to transfer them. This set-up is shown below:

Now if there is a delay associated with the PCI bus, operating system, or image processing, the onboard buffers will continue to be filled until resources are freed to catch up with the acquisition.
In addition to the buffering advantages, the use of onboard memory allows burst acquisitions at very high rates. Some very high-speed applications, such as tracking a bullet, require extremely high frame rates for short periods of time. The use of onboard memory bypasses the 132 MB/s PCI bus limitation for short duration acquisitions and guarantees that no frames will be lost until the onboard memory fills up.
See Also:
Ring
Sequence
Grab
When Should I Use the Onboard Memory?
Most of the benefits discussed above are automatically provided by National Instruments frame grabbers which provide onboard memory; even if an acquisition is specified to go to system memory, the driver will utilize the onboard memory as a buffer to absorb the various delays that might be encountered.
Therefore, the user rarely needs to explicitly configure the acquisition to use onboard memory. Two cases where it would be beneficial are when system RAM is limited or you are concerned with minimizing PCI bus traffic -- in those cases you could acquire the images into the onboard memory, and transfer only one buffer at a time into system memory for processing. This only requires system memory for a single buffer, and unnecessary traffic across the PCI bus can be avoided by evaluating the processing results of each buffer and discontinuing the transfers as soon as the information of interest has been obtained.
See Also:
Acquisition into Onboard Memory
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
