| Customize Help
| Save Settings

MfpgaCommandQueue



Function Map
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
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize 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
M10
l m p r
U27
y
U75
aa
Click to summarize 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
M10
l m p r
U27
y
U75
aa
Click to summarize 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
M10
l m p r
U27
y
U75
aa
Click to summarize M_SOURCE_READ

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

j k
M10
l m p r
U27
y
U75
aa
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
Click to summarizeValue Description MIL system-specific
tooltip (‡)
Click to summarize M_DEFAULT

Same as M_DISPATCH.

j k
M10
l m p r
U27
y
U75
aa
Click to summarize 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
M10
l m p r
U27
y
U75
aa
Click to summarize 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
M10
l m p r
U27
y
U75
aa
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