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


ADMXRC2_ConfigureFromBufferDMA

Prototype

ADMXRC2_STATUS
ADMXRC2_ConfigureFromBufferDMA(
    ADMXRC2_HANDLE Card,
    const void*    Buffer,
    unsigned long  Length,
    unsigned int   Channel,
    void*          Ignored);

Arguments

Argument Type Purpose
Card In Handle of card to configure
Buffer In FPGA configuration data
Length In Length of FPGA configuration data
Channel In DMA channel to use for the operation
Ignored In Pass NULL

Return value

Value Meaning
ADMXRC2_SUCCESS The FPGA was successfully configured
ADMXRC2_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC2_INVALID_PARAMETER An invalid parameter was passed
ADMXRC2_NO_DMADESC A DMA descriptor could not be allocated

Description

This function is used to configure the FPGA on a card from a buffer of SelectMap data, using DMA. Since there is no file I/O to be performed, this is a deterministic method of configuring the FPGA. As DMA is used to configure the FPGA, this method is also the fastest. 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 ADMXRC2_LoadBitstream function 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.

The Channel parameter specifies which DMA channel should be used for the operation. If ADMXRC2_DMACHAN_ANY is specified, the DMA transfer will be performed on the first available DMA channel. However, pending DMA transfers on a specific a DMA channel will always be given priority. It is possible for a DMA transfer that specifies ADMXRC2_DMACHAN_ANY to be delayed indefinitely if all DMA channels are kept busy by other threads.

 


 Top of page