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


ADMXRC2_ConfigureFromFileDMA

Prototype

ADMXRC2_STATUS
ADMXRC2_ConfigureFromFileDMA(
    ADMXRC2_HANDLE Card,
    const char*    Filename,
    unsigned int   Channel,
    void*          Ignored);

Arguments

Argument Type Purpose
Card In Handle of card to configure
Filename In Name of .BIT file
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_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 is not enough free memory to temporarily load the bitstream into memory
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
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 Xilinx bitstream file (.BIT), using DMA. If deterministic runtime is required, the ADMXRC2_ConfigureFromBuffer or ADMXRC2_ConfigureFromBufferDMA functions should be used instead since ADMXRC2_ConfigureFromFileDMA performs file I/O in order to load the bitstream into memory.

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

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

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