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


ADMXRC_ConfigureFromFileDMA

Prototype

ADMXRC_STATUS
ADMXRC_ConfigureFromFileDMA(
    ADMXRC_HANDLE Card,
    char*         Filename,
    DWORD         Channel,
    PHANDLE       Event);

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
Event In/out Event to use to wait for completion

Return value

Value Meaning
ADMXRC_SUCCESS The FPGA was successfully configured
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 not enough free memory to temporarily load the bitstream into memory
ADMXRC_FPGA_MISMATCH The device targetted by the bitstream file did not match the device fitted to the card
ADMXRC_INVALID_HANDLE Card is not a valid handle to a card
ADMXRC_INVALID_PARAMETER An invalid parameter was passed
ADMXRC_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 ADMXRC_ConfigureFromBuffer or ADMXRC_ConfigureFromBufferDMA functions should be used instead since ADMXRC_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 ADMXRC_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 ADMXRC_DMACHAN_ANY to be delayed indefinitely if all DMA channels are kept busy by other threads.

The Event parameter should be a pointer to a Win32 event handle. See multithreading issues for further information.

 


 Top of page