| Customize Help

Primitive function and execution of operation by PU



The FPGA configuration that you load into your Processing FPGA contains one or more PUs that your primitive function can use to carry out specific image processing operations. With each PU that you want to use, you must associate an FPGA command context, using MfpgaCommandAlloc(). An FPGA command context is a MIL object that stores the information required to select and configure a PU, within a loaded FPGA configuration, to perform an image processing operation. The command context stores information regarding the target PU, the source and destination buffers, operation information, register settings, register read requests, link information, and the execution mode. In essence, the command context specifies the command required to perform a processing operation. Once your command is completed and the FPGA command context is no longer needed, it should be freed using MfpgaCommandFree().

When allocating the command context, you must specify the target PU. To do so, you must specify the PU's function identifier. If your Matrox imaging board has multiple Processing FPGAs on board, you must also specify in which is the required PU located. Several different variations of a Matrox PU can exist, each with slightly different optimizations, functionalities, or restrictions. If the loaded FPGA configuration has multiple versions of the same PU, identify which to use by specifying the required PU's subfunction identifier. Lastly, if the FPGA configuration loaded in the selected Processing FPGA has multiple instances of the required PU, you must specify which to use by specifying its rank. If any of the above-mentioned circumstances do not apply, you can set the corresponding parameter to M_DEFAULT.

There are certain PUs that require multiple passes to setup and use. For example, the PU that performs a LUT mapping needs two passes. The first pass sets up the lookup table and the second enables the PU to map the input image through the LUT. You must ensure that you set up this type of PU correctly.

Refer to the Matrox FPGA Configurations help file for a list of the PUs contained in the available Matrox FPGA configurations. In addition, refer to the Matrox FPGA Components Reference help file for a description of the Matrox PUs.