WienerVMEInterface

Name

WienerVMEInterface -- Wiener PCI/DA-VC32 support software.

Synopsis


#include <WienerAPI.h>
            

static void ResetVme(void* pHandle);

static int ReadWords(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nWords);

static int WriteWords(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nWords);

static int ReadLongs(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nLongs);

static int WriteLongs(void* pHandle, unsigned long pBase, void* pBuffer, unsigned long nLongs);

static int ReadBytes(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nBytes);

static int WriteBytes(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nBytes);

Description

Provides support for the Wiener PCI/DA-VC32 PCI/VME bus bridge. Note that this is not the default way the NSCLdaq is built. By default. To obtain support for this bus bridget it is necessary to configure the software prior to building and installing the nscldaq software with: --with-vme-interface=wiener. Building the NSCLDAQ in this way selects the VME interface to be a PCI/DA-VC32 bus bridge.

The Wiener interface has no support for memory mapping or DMA transfers. Every operation requires a driver transaction. While the driver is quite efficient, you are still talking on the order of or more than 10 microseconds per transaction.

Compiling requires that the Wiener interface libraries be located with:


-I$DAQROOT/include
                
and linking with the appropriate libraries:

-L$DAQROOT/lib -lVmeAPI -lException -lpcivme
                

Public member functions

In the descriptions below, the parameter pHandle is a crate handle returned from CVMEInterface::Open. All functions documented in this section return 0 for success and nonzero for failure, with the reason for failure set in the global errno variable.

static void ResetVme(void* pHandle);

Reset the VME bus.

static int ReadWords(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nWords);

Read a bunch of 16 bit words from the VME bus. nBase is the starting address of the read. pBuffer points to the block of memory that will receive the read data. nWords is a count of the number of 16 bit words to read.

static int WriteWords(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nWords);

Same as ReadWords but data are transferred to the VME bus from pBuffer.

static int ReadLongs(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nLongs);

Reads longwords from the VME. Parameters are essentially the same as for ReadWords except transfers are 32 bits wide and nLongs is the number of 32 bit transfers to perform.

static int WriteLongs(void* pHandle, unsigned long pBase, void* pBuffer, unsigned long nLongs);

Same as WriteWords however transfers are 32 bits wide and nLongs is the number of these 32 bit wide transfers to perform.

static int ReadBytes(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nBytes);

Same as ReadWords except that transfers are 8 bits wide, and nBytes is the number of 8 bit bytes to transfer

static int WriteBytes(void* pHandle, unsigned long nBase, void* pBuffer, unsigned long nBytes);

Same as WriteBytes transfers, however are 8 bits wide and nBytes is the number of bytes to transfer.