ATLAS     Level 1     Calorimeter Trigger     Software    

L1Calo Software Experience with VME Drivers

 

Installation

  • We used the latest version (0.10) of the Hannappel driver.
  • For the VMELinux driver, we used a version modified by Concurrent to support their boards (basically the hardware byte swapping function).

I unpacked these into directories

/home/drivers/universe_vme-0.10
/home/drivers/vmelinux-0.95

Installing Both Drivers

Unless you modify the code, both the Hannappel and VMELinux driver want to use an identically named device file /dev/vme_ctl but the two drivers use different major and minor device numbers.

If you want to install both, I suggest you install Hannappel first, then delete /dev/vme_ctl and recreate it with another name (NB mv wont work):

rm /dev/vme_ctl
mknod /dev/vme_ctl_hannappel c 61 1
Then install the VMELinux driver, and do something similar with that:
rm /dev/vme_ctl
mknod /dev/vme_ctl_vmelinux c 70 8

I then have a very simple script /home/drivers/swapvme which I used to create /dev/vme_ctl as a link to one or other of the above.

I also have a startup script /etc/rc.d/init.d/vme which will load the appropriate driver at boot time depending on which of the two /dev/vme_ctl_* files the /dev/vme_ctl link points to.

After downloading the scripts from here you will probably have to make them executable

chmod a+x vme swapvme

After installing the vme script in /etc/rc.d/init.d you should run

/sbin/chkconfig vme
to set up the necessary links.

You can in principle use the sequence

/sbin/service vme stop
/home/drivers/swapvme l
/sbin/service vme start
to swap from the Hannappel driver to the VMELinux one. The reverse doesnt work as the VMELinux driver doesnt unload itself properly (or at all?) in response to the /sbin/rmmod command.

Installing the Hannappel Driver

For the Hannappel driver, just do (as root):
cd /home/drivers/universe_vme-0.10
make install
chmod 666 /dev/vme*    # otherwise only usable by root

Installing the VMELinux Driver

For the VMELinux driver, you need to do (as root):
cd /home/drivers/vmelinux-0.95/ca91c042
make install
cd ../vmeutils
make
cd ../vmeshell
./makelinks   # if you want the utilities in /usr/local/bin
However to be able to use the unilib library they provide in our own programs, I had to modify the vmeutils/Makefile to compile unilib.o separately. My version of the Makefile is as follows (where I added the unilib target):
all: vmeutils unilib

vmeutils: vmeutils.cpp vmeutils.h commands.cpp commands.h  unilib.cpp Makefile
	gcc  -g -o vmeutils vmeutils.cpp commands.cpp unilib.cpp 

clean:
	rm vmeutils

unilib: unilib.cpp unilib.h universe.h Makefile
	gcc -g -c unilib.cpp


Last updated on 7-Dec-2000. Send comments on this page to Murrough Landon