MIDAS Driver Library

From MidasWiki
Revision as of 15:45, 5 August 2015 by Suz (talk | contribs)
Jump to navigation Jump to search


Links

MIDAS DRIVER LIBRARY

The driver library is continuously extended to suit the needs of various experiments based on the selected hardware modules. Not all commercially available modules are included as we don't have all the modules in hand. But you're more than welcome to contribute by providing your driver code if the module that you're using is not yet listed.


The drivers are located in the drivers directory of the MIDAS distribution i.e. $MIDASSYS /drivers. Some libraries consist only of a header file, others of a C file plus a header file. The file names usually refer to the manufacturer abbreviation, followed by the model number of the device. The libraries are continuously expanding to widen MIDAS support. The drivers directory in the MIDAS package is subdivided in several directories which refers to either the type of bus ie: CAMAC, FastBus, VME, PCI, USB or type of software layer such as Class, Device, Bus.

The software layers sections are used in particular for Slow Control System. Example are available in the distribution under $MIDASSYS/examples/slowcont/frontend.c including the hv and multi class with the nulldev device and null bus driver.

Note: not all the device drivers implement the triple layer (Class,Device,Bus) as some include the hardware calls directly in the device layer. Please email midas for specific support or for submitting new drivers.


Driver Types

  • VME
The VME API has been revisited for a better function call set. Not all the hardware modules have been ported to this new scheme. DMA and Interrupt support have been included. The main hardware support is for the SBS PCI/VME, SIS PCI/VME, VMIC processor.
  • USB
USB is getting popular in particular for the MSCB system. Following the same concepts for the CAMAC and VME, the musbstd.h/c is available for USB access.
  • GPIB drivers


  • CAMAC
This section is slowly getting obsolete. But still some ISA and PCI interface are in use. Most recent development is the USB/CAMAC interface from Wiener (CCUSB).
While this interface permits CAMAC Command Stacks this option is not yet supported by the MIDAS API limiting the access speed of a R/W 24bit cycle to ~360us!


  • Other_drivers
include the TCP/IP, Serial access layer.


VME drivers

The VME modules drivers can be interfaced to any type of PCI/VME controller. This is done by dedicated MIDAS VME Standard calls from the mvmestd.h files.

  • PCI/VME interface
    • sis1100.c PCI/VME with optical fiber link. Driver is under development (March 2002) (see SIS).
    • bt617.c Routines for accessing VME over SBS Bit3 Model 617 interface under Windows NT using the NT device driver Model 983 and under Linux using the vmehb device driver. The VME calls are implemented for the "mvmestd" MIDAS VME Standard. (see Bit3).
    • wevmemm.c PCI/VME Wiener board supported. (see Wiener PCI).
    • vxVME.c (obsolete?) mvmestd implementation for VxWorks Operating System. Does require cross compiler for the VxWorks target hardware processor and proper WindRiver license.


USB drivers

This section is under development for the Wiener USB/CAMAC CCUSB controller. Support for Linux and XP is ongoing. Please contact midas for further information.


GPIB drivers

There is no specific GPIB driver part of the MIDAS package. But GPIB is used at Triumf under WindowsNT for several Slow Control frontends. The basic GPIB DLL library is provided by National Instrument. Please contact midas for further information.

For GPIB Linux support please refer to The Linux Lab Project

Other drivers

Serial driver
rs232.c communication routines.
Network driver
tcpip.c/h TCP/IP socket communication routines.
SCSI driver
Support for the jorway73a SCSI/CAMAC controller under Linux has been done by Greg Hackman (see [#CAMAC drivers]).


CAMAC drivers

ESONE standard routines for CAMAC are supplied and permit the re-use of the frontend code among different platforms as well as among different CAMAC hardware interfaces, without modification of the code.

The CAMAC drivers can be used in different configurations and may have special behaviours depending on the type of hardware involved (see #CAMAC controllers).

camacnul.c
Handy fake CAMAC driver for code development.
camacrpc.c
Remote Procedure Call CAMAC driver used for accessing the CAMAC server part of the standard MIDAS frontend code. This driver is used for example in the mcnaf utility.


CAMAC controllers

Would someone please review the following (out of date/ obsolete)?

  • [hyt1331.c]

This interface uses an ISA board to connect to the crate controller. This card implement a "fast" readout cycle by re-triggering the CAMAC read at the end of the previous one. This feature is unfortunately not reliable when fast processor is used. Incorrect returned data can be expected when CPU clocks is above 250MHz. Attempt to "slow down" the IO through software has not guaranteed a perfect result.Contact has been made with HYTEC in order to see if possible fix can be applied to the interface.

First revision of the PC-card PAL has been tested but did not show improvement. CVS version of the hyt1331.c until 1.2 contains "fast readout cycle" and should not be trusted. CVS 1.3 driver revision contains a patch to this problem. In the mean time you can apply your own patch (see FAQ) and also Hytec)

  • [hyt1331.c Version >= 1.8.3]

This version has been modified for 5331 PCI card support running under the dio utility.

  • [khyt1331.c Version >= 1.8.3]

A full Linux driver is available for the 5331 PCI card interfacing to the hyt1331. The kernel driver has been written for the Linux kernel 2.4.2, which comes with RedHat 7.1. It could be ported back to the 2.2.x kernel because no special feature of 2.4.x are used, although many data structures and function parameters have changed between 2.2 and 2.4, which makes the porting a bit painful. The driver supports only one 5331 card with up to four CAMAC crates.

  • [kcs292x.c]

The 2926 is an 8 bit ISA board, while the 2927 is a 16bit ISA board. An equivalent PCI interface (2915) exists but is not yet supported by MIDAS (See KCS). No support for Windowx yet.

Both cards can be used also through a proper Linux driver \em camaclx.c. This requires to first load a module \em camac-kcs292x.o. This software is available but not part of the MIDAS distribution yet. Please contact midas for further information.

  • wecc32.c

The CAMAC crate controller CC32 interface to a PCI card... you will need the proper Linux module... Currently under test. WindowsNT and W95 drivers available but not implemented under MIDAS. (See CC32)

  • dsp004.c

The dsp004 is an 8 bit ISA board PC interface which connect to the PC6002 CAMAC crate controller. This module is not being manufactured anymore, but somehow several labs still have that controller in use.

  • ces8210.c

The CAMAC crate controller CBD8210 interface is a VME module to give access up to 7 CAMAC crates. In conjunction with the mvmestd.h and mcstd.h, this driver can be used on any MIDAS/VME interface.

  • jorway73a.c

The CAMAC crate controller Jorway73a is accessed through SCSI commands.This driver implement the mcstd.h calls.