GxFpgaLoadStatusMessage

Purpose

Returns a string describes the current load progress of the last asynchronous load.

Syntax

GxFpgaLoadStatusMessage (nHandle, pszMsg, nMsgMaxLen, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle for a GX3500 board.
pszMsg
PSTR
A buffer to the returned message describing the current load status.
nMsgMaxLen
SHORT
Size of the pszMsg.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function returns the current load status into the user-supplied buffer. You can use the function to display the status progress and result 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)

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

    GxFpgaLoadStautsMessage (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, GxFpgaLoadStatus, GxFpgaGetErrorString