MultiCam Boards Documentation > MultiCam Documentation > MultiCam User Guide > MultiCam Basics > Acquisition > Cluster Mechanism > Surface Allocation Rules

Surface Allocation Rules

This section summarizes all the rules applicable to the allocation of MultiCam surfaces in the host PC memory for Grablink Base, Grablink DualBase, and Grablink Full exclusively.

MultiCam Driver Limitations

The MultiCam driver exhibits the following limitations concerning the number of surfaces:

Note. On Grablink DualBase, when using two channels, a practical limit would be 2048 surfaces per channel.

Operating System Limitations

The Windows operating systems exhibit the following limitations for the maximum buffer size allowed per MultiCam surface:

Note. If a MultiCam surface exceeds those limits, MultiCam returns MC_IO_ERROR at channel activation.

Board Resources Limitations

Grablink Base, Grablink DualBase, and Grablink Full implement "dynamic DMA" meaning that, if required, the descriptors lists are stored in the host PC memory. When this happens, prior to the transfer of any surface into the host PC memory, the Multicam driver copies the corresponding descriptors list into the on-board memory reserved for that purpose.

The "dynamic DMA" feature relaxes the constraints about the total amount of descriptors for all the surfaces belonging to the channel. However, the descriptors of one surface must fit within the on-board being board dependent. Consequently, the rule becomes:

The number of descriptors required for a surface is depending on multiple factors:

A practical, but very conservative, rule to estimate the number of descriptors for a surface is:

with BlockSize = 4096 Bytes.

Note. The rule used to decide to enable "dynamic DMA" is based on the above formulae. If the descriptors for all surfaces cannot fit in the on-board memory, the dynamic DMA is activated.

Grablink Base, Grablink DualBase, and Grablink Full implement "Cropping in Hardware" avoiding descriptor boundaries at line boundaries when following conditions are met:

When "Cropping in Hardware" is applicable, the following rule is applicable:

Note. "Cropping in Hardware" is particularly useful for small line sizes. The following diagram shows the maximum SurfaceSize vs. LineSize for a channel having a capacity of 2,000,000 descriptors (Grablink Base or Grablink DualBase).

Maximum SurfaceSize vs. LineSize

Note. This rule is often less restrictive than the OS rule.