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


ADMXRC2_LoadBitstream

Prototype

ADMXRC2_STATUS
ADMXRC2_LoadBitstream(
    ADMXRC2_HANDLE Card,
    const char*    Filename,
    ADMXRC2_IMAGE* Image,
    unsigned long* ImageSize);

Arguments

Argument Type Purpose
Card In Handle of card that the bitstream targets
Filename In Name of bitstream file to load
Image Out Loaded bitstream data
ImageSize Out Size in bytes of loaded bitstream data

Return value

Value Meaning
ADMXRC2_SUCCESS The bitstream file was successfully loaded
ADMXRC2_FILE_NOT_FOUND The file could not be opened
ADMXRC2_INVALID_FILE The file appeared not to be a valid bitstream
ADMXRC2_NO_MEMORY There was insufficient free memory to load the bitstream
ADMXRC2_FPGA_MISMATCH The device targetted by the bitstream file did not match the device fitted to the card
ADMXRC2_INVALID_HANDLE Card is not a valid handle to a card

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 ADMXRC2_IMAGE. A pointer to the buffer that contains the loaded SelectMap data, allocated by ADMXRC2_LoadBitstream, is returned. The ADMXRC2_UnloadBitstream function should be used to free the memory used by the SelectMap data when no longer required.

The ImageSize parameter must point to an unsigned long variable which receives the length of the SelectMap data.

 


 Top of page