GxFpgaLoadStatus

Purpose

Returns the progress of the last asynchronous load in percentage.

Syntax

GxFpgaLoadStatus (nHandle, pnPercentCompleted, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle for a GX3700 board.
pnPercentCompleted
PSHORET
The percent complete of the current load, 0-100.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

100 percent indicates that the load has completed. This function is used to check the load status after calling GxFpgaLoad in Asynchronous mode.

Example

The following load an FPGA file in asynchronous mode and prints the progress:

 

SHORT nPercentage=0, nPriorPrecentage, nStatus, n;

CHAR  szMsg[1024];

GxFpgaLoad(nHandle, GXFPGA_LOAD_TARGET_VOLATILE, “C:\\MyDesign.SVF”, GXFPGA_LOAD_MODE_ASYNC &nStatus);

while (nStatus==0 && nPrecentage<100)

{   GxFpgaLoadStatus (nHandle, &nPercentage, &nStatus);

    GxFpgaLoadStatusMessage (nHandle, szMsg, sizeof szMsg, &n);

    if (nPrecentage!=nPriorPrecentage)

       printf(“Load Complete=%i, Status=%s”, nPrecentage, szMsg);

    nPriorPrecentage=nPrecentage;

    sleep(300);

}

printf(“Load Complete=%i, Status=%s”, nPrecentage, szMsg);

 

See Also

GxFpgaLoad, GxFpgaLoadStatusMessage, GxFpgaGetErrorString