mpiSqNodeDownload

Declaration

long mpiSqNodeDownload(MPISqNode                node,
                       MPISqNodeDownloadParams  *params);

Required Header: stdmpi.h

WARNING!
The mpiSqNodeDownload(...) function should always be used in conjunction with the mpiSqNodeFpgaFileNameVerify(...) function. See Note below.

Description

mpiSqNodeDownload SqNodeDownload reads a binary image from a file and writes it into a SynqNet node's non-volatile storage. SynqNet nodes may support one or more drive interfaces. SqNodeDownload can also write binary images to a drives' non-volatile storage if the drive interface hardware supports a communication channel to the drive processor. The drive interface(s) for a SynqNet node are indexed by a number (0, 1, 2, etc.).

The SynqNet node binary files are node specific. Please see the Node Binary Files: Product Table.

The SynqNet drive binary files are drive specific. The SqNodeLib includes the drive specific code necessary to support various hardware download protocols. Please see the drive manufacturer's documentation for details. Use mpiSqNodeInfo(...), to determine if the SynqNet node supports a drive interface and its type.

The binary download process requires a significant amount of time, probably between 5 to 30 seconds, depending on the node/drive type and file size. A callback function pointer is provided in the MPISqNodeDownloadParams structure for the calling application to monitor the download progress.

WARNING!
The mpiSqNodeDownload(...) function should always be used in conjunction with the mpiSqNodeFpgaFileNameVerify(...) function. If mpiSqNodeFpgaFileNameVerify(...) is not called before mpiSqNodeDownload(...), it is possible to download an incorrect FPGA to the SynqNet node. Loading an incorrect FPGA onto a node would prevent the controller from communicating with the node over SynqNet.

Reloading the Runtime FPGA Image:
If you have accidentally loaded an incorrect FPGA onto a Slice I/O, RMB-10V2, or SQIO node, please see Reloading the Runtime FPGA Image. However, if you have loaded an incorrect FPGA image onto a SynqNet drive, please contact the drive manufacturer for troubleshooting details.

node a handle to a SynqNet node object
*params a pointer to the download parameters structure.
Return Values
MPIMessageOK

Sample Code

long printFpgaDownloadStatus(long percentage) {
printf("Percentage %ld percent complete\r", percentage);
return 0;
}
void fpgaDownload(MPISqNode sqNode)
{
MPISqNodeFileName fileName;
MPISqNodeDownloadParams params;
long returnValue; returnValue = mpiSqNodeFpgaDefaultFileName(sqNode, &fileName);
msgCHECK(returnValue); params.filename = fileName.fileName;
params.callback = printFpgaDownloadStatus;
params.channel = MPISqNodeChannelNODE; printf("%s\n", fileName.fileName);
returnValue = mpiSqNodeFpgaFileNameVerify(sqNode, &fileName.fileName); msgCHECK(returnValue); printf("Download Fpga begin\n");
returnValue = mpiSqNodeDownload(sqNode, &params);
msgCHECK(returnValue); printf("\n");
}

See Also

mpiSqNodeInfo | mpiSynqNetInfo | mpiSqNodeFpgaFileNameVerify | MPISqNodeDownloadParams | MPISqNodeChannel | MPISqNodeCallback