Returns a string describes the current load progress of the last asynchronous load.
GxFpgaLoadStatusMessage (nHandle,pszMsg, nMsgMaxLen, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle for a GX3700 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. |
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.
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);