| MIL 10 Reference
| Customize Help
| Save Settings

MfpgaCommandQueue



See also
Availability
Available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Not supported on:
Not supported on Host system
Not supported on Matrox CronosPlus
Not supported on Matrox GPU processing driver
Not supported on Matrox GigE Vision driver
Not supported on Matrox IEEE 1394 IIDC driver
Not supported on Matrox Iris GT
Not supported on Matrox Morphis
Not supported on Matrox Morphis QxT
Not supported on Matrox Orion HD
Not supported on Matrox USB3 Vision driver (requires Update 19)
Not supported on Matrox Vio
Fully supported on:
Fully supported on Matrox Radient eCL
Fully supported on Matrox Radient eV-CXP
Fully supported on Matrox Solios eA/XA
Fully supported on Matrox Solios ecl/xcl/ev-cl

For any information regarding a MIL system added during a MIL Update, see the MIL system’s release note

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
Put an FPGA command on the system command queue of the current thread.
Syntax
void MfpgaCommandQueue(
MIL_FPGA_CONTEXT FpgaCommandContext, //in
MIL_INT64 CompletionMode, //in
MIL_INT64 QueueType //in
)
Description

This function sends the command, defined by the specified FPGA command context, to the system command queue of the current thread. The command will be executed when the target Processing FPGA hardware resources are available.

If you link multiple command contexts, their commands should be gathered in a complex command, using MfpgaCommandQueue() with M_WAIT. Add the last command to the complex command using M_DISPATCH. If multiple commands are being dispatched at the same time (as in cascaded or parallel scenarios), then MIL uses the synchronous/asynchronous setting and the completion mode of the last command (that is, the one with the call to MfpgaCommandQueue() with M_DISPATCH). Set the completion mode for all other commands in the complex command to M_DEFAULT.

Note that two commands can typically run at the same time if they do not reference the same buffer and use different FPGA components that can access their buffers using different paths. When a command is sent asynchronously, you can use MthrWait() with M_THREAD_WAIT to force the current thread to wait for the completion of all commands in the thread's system command queue. Alternatively, you can use MbufHookFunction() with M_MODIFIED_BUFFER to notify your MIL application when the operation has finished processing the image.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
FpgaCommandContext

Specifies the handle of the FPGA command context associated with the PU, which defines the command. The command context must have been previously allocated on the system using MfpgaCommandAlloc().

CompletionMode

Specifies when the processing operation will be tagged as completed. This parameter can be set to one of the following values.

function map For specifying when the command is completed
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse M_DEFAULT

Specifies the default value. If any of the processing operations have destination buffers, the default value will be M_DESTINATION_WRITTEN. If none of the processing operations have a destination buffer but at least support interrupts, then the default value will be M_PROCESSING_COMPLETED. If none of the processing operations have a destination buffer and none of the processing operations support interrupts, then the default value will be M_SOURCE_READ.

(summarize)
j k l m p q r
Collapse M_DESTINATION_WRITTEN

Specifies that the command is complete when all destination buffers are written. You should select this completion mode rather than M_PROCESSING_COMPLETED if you want to ensure that all Processing FPGA operations have completed and that the results are available to the Host.

(summarize)
j k l m p q r
Collapse M_PROCESSING_COMPLETED

Specifies that the command is complete when the PU generates its end-of-processing interrupt (interrupt 0). The end-of-processing interrupt only indicates that the PU's processing operations are complete but supplies no information on the transfer of resulting data. The PU must support interrupts to use this mode, otherwise an error will be generated.

(summarize)
j k l m p q r
Collapse M_SOURCE_READ

Specifies that the command is complete when all source buffers have been read.

j k l m p q r
QueueType

Specifies whether MfpgaCommandQueue() should load the current command (or complex command) into hardware or store it into a complex command. This parameter can be set to one of the following:

function map For specifying how to handle the current command
CollapseValue Description
MIL system-specific
tooltip (†)
Collapse M_DEFAULT

Same as M_DISPATCH.

j k l m p q r
Collapse M_DISPATCH

Informs the MIL driver that subsequent commands are not related to the current one. MfpgaCommandQueue() will send the current command to the system command queue. If multiple related commands are gathered in a complex command, then MfpgaCommandQueue() will add the current command to the complex command and then send the complex command to the system command queue. Processing will start immediately if the system command queue is empty and the required Processing FPGA resources are available.

(summarize)
j k l m p q r
Collapse M_WAIT

Informs the MIL driver to wait for other commands, using MfpgaCommandQueue(), before being queued in the system command queue. The current command is stored in a complex command. The driver expects to gather multiple commands into a complex command until a command is sent using MfpgaCommandQueue() with M_DISPATCH.

(summarize)
j k l m p q r
Compilation information
Header Include mil.h; milfpga.h.
Library Use mil.lib; milfpga.lib.
DLL Requires mil.dll; milfpga.dll.
DEFAULT DESTINATION WRITTEN PROCESSING COMPLETED SOURCE READ DEFAULT DISPATCH WAIT