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


ADMXRC_ConfigureFromBuffer

Prototype

ADMXRC_STATUS
ADMXRC_ConfigureFromBuffer(
    ADMXRC_HANDLE Card,
    void*         Buffer,
    DWORD         Length);

Arguments

Argument Type Purpose
Card In Handle of card to configure
Buffer In FPGA configuration data
Length In Length of FPGA configuration data

Return value

Value Meaning
ADMXRC_SUCCESS The FPGA was successfully configured
ADMXRC_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC_INVALID_PARAMETER An invalid parameter was passed

Description

This function is used to configure the FPGA on a card from a buffer of SelectMap data, using programmed I/O. Since there is no file I/O to be performed, this is a deterministic method of configuring the FPGA. This routine does not allow the FPGA to be partially configured on each call; all of the data necessary to configure the FPGA must be supplied in a single call.

Warning

Ensure that Buffer contains valid configuration data for the target FPGA, as data transferred this way to the FPGA's SelectMap port cannot be validated by the API.

The card to be configured is specified by the Card parameter.

The Buffer parameter should point to a buffer containing the configuration data for the FPGA. The data must be supplied in a form directly writable to the FPGA's SelectMap port, and care should be taken to ensure that the bit-ordering of the data is correct. The functions ADMXRC_LoadFpgaFile, ADMXRC_FindImageOffset and ADMXRC_ReverseBytes can be used to obtain SelectMap data in the correct form.

The Length parameter specifies the number of bytes of configuration data to be written to the FPGA's SelectMap port.

 


 Top of page