ATLAS     Level 1     Calorimeter Trigger     Software    

L1Calo Software VME Drivers in HDMC

 

Introduction

Support for both Hannappel and VMELinux drivers is now included in HDMC. It is possible to have both available from the HDMC GUI. However, some programs which automatically create a real VMEBus object (such as the busserver and the vme line mode utility) require a default choice to VME driver to be made at compile time.

Both drivers are implemented in VMEBus subclasses. There are two options available for Hannappel and one for VMELinux:

  • VMEBusEltec: Hannappel driver in memory mapped mode (the name originates from the first implementation of this class on an Eltec board.
  • VMEBusHanna: Hannappel driver in read/write mode, ie all operations go through IO calls to the driver.
  • VMEBusLinux: VMELinux driver. This driver only supports read/write mode. The developers havent implemented memory mapping. NB at present the VMEBusLinux class doesnt use the hardware byte swapping capabilities of the Concurrent board.

Makefiles

The standard HDMC Makefile now expects to find a custom Makefile.local in the same directory.

In that file you can define two symbols:

  • VME: to select the default VMEBus. Values are Eltec, Hanna, Linux or Dummy.
  • VMEBUSES: a blank separated list of possible VMEBus classes to be included in the hdmc binary.

The VMEBus subclasses for the two drivers both need to access header files from their installed distributions. I chose to create a link drivers in the same directory which contains the top level hdmc directory. This link points to a directory containing the installation directories for the two drivers (ie /home/drivers as described on the driver installation page).

Makefile.local needs to contain suitable code to add these directories to the include file search path.

To include all the above options, but using the VMELinux driver by default, Makefile.local should look like this:

LFLAGS_LOCAL = -L$(QWTDIR)

VME = Linux
VMEBUSES = Dummy Eltec Hanna Linux

ifneq ($(findstring Eltec,"$(VMEBUSES) $(VME)"),)
VPATH += ../../drivers/universe_vme-0.10
endif
ifneq ($(findstring Hanna,"$(VMEBUSES) $(VME)"),)
VPATH += ../../drivers/universe_vme-0.10
endif
ifneq ($(findstring Linux,"$(VMEBUSES) $(VME)"),)
VPATH += ../../drivers/vmelinux-0.95/vmeutils
LFLAGS_LOCAL += ../../drivers/vmelinux-0.95/vmeutils/unilib.o
endif

Usage and Problems

  • The Hannappel driver in memory mapped mode (VMEBusEltec) doesnt report bus errors. Trying to do a bus scan seems to produce an infinite loop requiring a crash and reboot - so avoid that! (This may be our bug somehow?)
  • The Hannappel driver in read/write mode (VMEBusHanna) still seems to have some bugs. Doing D32 reads, at least to a test module here, doesnt read the upper two bytes.
  • The VMELinux driver (VMEBusLinux) doesnt seem to allow more than one process to access the system at a time. This means that if you start the hdmc GUI or the busserver process and leave them running (which you probably shouldnt need) nothing else can access VME. A simple bug in their unilib library (which I havent bothered to fix) fails to detect this error.


Last updated on 20-Feb-2002 by Murrough Landon