Using Generic A16 VME (a16Vme) support in an application

Brief Description of device support:

This device support allows access to any register of a VME module found in the A16/D16 VME space. The bit field of interest
is described in the PARM field of the INP or OUT link. This allows a generic driver to be used without hard-coding register numbers within the software.

Record Type Signal # Parm Field
reg_offset lsb, width
ai reg_offset lsb, width
ao reg_offset lsb, width
bi reg_offset bit #
bo reg_offset bit #
longin reg_offset lsb, width
longout reg_offset lsb, width
mbbi reg_offset lsb
mbbo reg_offset lsb

reg_offset is specified by the register number (0,1,2,3, etc).
The Parm field must be provided, no defaults are assumed.

The card number in the INP or OUT field refers to a value set up be a devA16VmeConfig command. The arguments to this command are:
devA16VmeConfig (card, a16base, nreg, iVector, iLevel,iReg)
The iVector, iLevel and iReg values can be omitted if the card will not be used to generate interrupts.

Several files need minor modifications to use a16Vme support in an application.

  1. Add the full path to the a16Vme support directory to the application configure/RELEASE file:
    a16Vme=xxxx/modules/bus/a16Vme/<release>
    Where <release> is the release number of the a16Vme support.
  2. Add bus support to application database definition file
    The application database definition file must include the database definition files for the a16Vme bus drivers. There are two ways that this can be done:
  3. Add the a16Vme support libraries to the application
    You must link the a16Vme support library with the application. Add the following line:
    xxx_LIBS += a16Vme
    before the
    xxx_LIBS += $(EPICS_BASE_IOC_LIBS)
    in the application Makefile.
  4. Load the simple example a16Vme support database records in the application startup script:
    cd $(a16Vme)      (cd a16Vme if using the vxWorks shell)
    dbLoadRecords("db/a16VmeTest.vdb","dev=<a16Vme>")
    You'll have to provide appropriate values for the PV name prefixes (<a16Vme>).

Installation and Building

After obtaining a copy of the distribution, it must be installed and built for use at your site.
  1. Create an installation directory for the module. The path name of this directory should end with modules/bus/a16Vme.
  2. Place the distribution file into this directory.
  3. Execute the following commands:
    cd modules/bus/a16Vme
    gunzip a16Vme<release>.tar.gz
    tar xvf a16Vme<release>.tar
    cd <release>
    Where <release> is the release number of of the a16Vme support.
  4. Edit the configure/RELEASE file and set the paths to your installation of EPICS base.
  5. Execute make in the top level directory.