Printable (html)
Printable  (pdf)
1 Introduction
2 VME64x in CMS
3 VMEBridges
    3.1 CAEN
    3.2 SBS
        3.2.1 Drivers
        3.2.2 Old Drivers (SLC3)
        3.2.3 Measurements

Drivers for the SBS VME bridge

SBS has officially released a driver version v2p3p0 which has been desinged for linux kernels 2.4.x. (Can be obtained from http://www.sbs.com).

This driver compiles and installs without problems on a CERN-Linux-Redhat-7.3.4 machine which has the kernel sources installed. (A small bug in the mkbtp script has been removed for the CMS version below). It also compiles and installs on CERN Linux SLC302 and SLC303 machines. HOWEVERthere is an issue for SLC303 machines (kernel 2.4.21-20.EL.cern and the corresponding smp version). On these kernels BusErrors get losts (the software continues as if the access with the BusError was successfull. In case of a read access arbitrary data is delivered to the user.) The reason for this behaviour and a work around has been found by Evgueni Vlassov:

  • The driver of SBS is not running correctly on SMP (multi-processor) machines. Since the newer kernel versions have been released various kernel tasks are distributed on the different processors of the system (on older kernel versions all kernel tasks including the interrupt service routines where running on the same processor). Due to this (and a bug in the SBS driver) the synchronization of a Interrupt service routine and some other driver code gets lost. As a consequence the Bus Errors get lost.
  • A possible workaround for this problem (which only seems to appear on multi-processor machines) is to either load the single processor version of the kernel (in this case you do not exploit more than one processor of your machine) or to downgrade to an old kernel version (It seems that kernel version 2.4.20-30.7.cernsmp works.) We have not tried yet to downgrade a SLC303/304 system to such an old kernel version and verified that all drivers used in the DAQ environment compile and run correctly. It must be tried out.
Thanks a lot to Evgueni who spent quite some time to find out the details of this problem. Please contact Evgueni for further details.

A feature of the original SBS driver was that certain functions (those of the so called nano bus API) where not correctly declared as extern "C" if compiled with C++. This excluded the use of these functions in the HAL since the linker did not find the functions due to incorrect name mangling. As a consequence it was not possible to use the bt_reset() function in order to reset the VME bus. This has been corrected in the latest CMS-version fo the driver.

Latest version for CMS:


This version is based on the SBS version v2p3p0. It compiles without problems on CERN Linux 7.3.4. The btpapi.h had to be modified so that the bt_reset() function can be called from C++ programs. It works with HAL versions ver-03-04 and higher. Earlier versions have to adjust the path to the SBS driver by hand (in Makefile.in) since the v2p3p0 subdirectory is not recognized by those versions in the configure script.

Installation instructions:

  • Install the PCI-card of the SBS interface in the PC. (If you do not do this the driver compiles and will be loaded, but no device files will be created)
  • Download the latest version of the patched driver into a directory of your choice. (See link above.)
  • Unpack the tgz file:
    gtar -xzvf SBS_{version}.tgz
  • cd SBS
  • become superuser and type
The software documentations you find the the doc subdirectory. The driver is installed in the directory /usr/local/SBS. If this directory is already present, you are asked to remove or rename it. To load the driver after every boot you have to execute

Previous versions:

  • v2-0_CMS-02: Does compile on CERN-Linux-Redhat-7.3.3 and does contain the fix for the nano bus API. You can use this version on CERN Linux 7.3.3 with HAL version later than ver-03-03.
  • v2-0_CMS-01: Does compile on CERN-Linux-Redhat-7.3.3 but does not contain the fix for the nano bus API. Therefore this version will not be usable with HAL SBS-BusAdapters which implement the resetBus() method. (HAL Versions LATER than ver-03-03.)
last changed: 2012-10-02 comments to: Christoph Schwick