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


ADMXRC2_BuildDMAModeWord

Prototype

uint32_t
ADMXRC2_BuildDMAModeWord(
    ADMXRC2_BOARD_TYPE BoardType,
    ADMXRC2_IOWIDTH    Width,
    unsigned int       WaitStates,
    uint32_t           MiscFlags);

Arguments

Argument Type Purpose
BoardType In Type of card being used
Width In Width of operation on local bus
WaitStates In Number of wait states to be introduced by PCI9080/PCI9656
MiscFlags In Miscellaneous mode flags

Return value

If the parameters are valid, a DMA mode word is returned. If the parameters supplied are not valid, the invalid mode word 0xFFFFFFFF is returned.

Description

This function differs from most API functions in that no card handle parameter is required, and the return value is not of type ADMXRC2_STATUS.

ADMXRC2_BuildDMAModeWord constructs a value that may later be passed to the DMA functions such as ADMXRC2_DoDMA and ADMXRC2_DoDMAImmediate. Provided that the DMA mode does not need to be changed, the DMA mode word can be pre-computed and used for many DMA transfers.

The BoardType parameter should correspond to the type of the board on which DMA is to be performed, a value of the enumerated type ADMXRC2_BOARD_TYPE.

The Width parameter should be one value of the enumerated type ADMXRC2_IOWIDTH.

The WaitStates parameter should be in the inclusive range 0 to 15 for the ADM-XRC, ADM-XRC-P, ADM-XRC-II-Lite, ADM-XRC-II, ADP-WRC-II, ADP-DRC-II, ADM-XRC-4LX and ADM-XRC-4SX cards. For other cards it must be 0. For portability reasons, Alpha Data recommends always specifying 0 for WaitStates, and designing local bus interface logic into the FPGA that uses the LREADY# and/or LBTERM# signals to implement a waitstate mechanism.

The MiscFlags parameter can be any combination of:

Flag Meaning
ADMXRC2_DMAMODE_USEREADY Use local bus READYI# signal
ADMXRC2_DMAMODE_USEBTERM Use local bus BTERM# signal
ADMXRC2_DMAMODE_BURSTENABLE Allow bursting on local bus
ADMXRC2_DMAMODE_FIXEDLOCAL Operate in constant address mode
ADMXRC2_DMAMODE_DEMAND Operate in demand mode
ADMXRC2_DMAMODE_USEEOT Operate in LEOT mode

 


 Top of page