ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data


ADMXRC_LoadFpgaFile

Prototype

ADMXRC_STATUS
ADMXRC_LoadFpgaFile(
    UCHAR*        Filename,
    ADMXRC_IMAGE* Image,
    ULONG*        ImageSize);

Arguments

Argument Type Purpose
Filename In Name of bitstream file to load
Image Out Loaded bitstream data
ImageSize Out Size in bytes of loaded bitstream file

Return value

Value Meaning
ADMXRC_SUCCESS The bitstream file was successfully loaded
ADMXRC_FILE_NOT_FOUND The file could not be opened
ADMXRC_INVALID_FILE The file appeared not to be a valid bitstream
ADMXRC_NO_MEMORY There was insufficient free memory to hold the bitstream

Description

This function loads the SelectMap data from a Xilinx bitstream (.BIT) file into memory and returns a pointer to it. The data returned is in correct bit order for sending to an FPGA's SelectMap port.

The Card parameter specifies the card that the bitstream targets. This information is used to check that the bitstream matches the FPGA fitted to the card.

The bitstream file to load into memory is specified by the Filename parameter.

The Image parameter must point to a variable of type ADMXRC_IMAGE. A pointer to the buffer that contains the loaded bitstream file, allocated by ADMXRC_LoadFpgaFile, is returned. The ADMXRC_UnloadFpgaFile function should be used to free the memory used by the bitstream when no longer required.

The ImageSize parameter must point to a ULONG variable which receives the length of the file.

 


 Top of page