Data format - Top - CAMAC and VME access function call
Drivers included in the driver's directory of the MIDAS distribution support various hardware modules. The driver library is continuously extended to suit the needs of various experiments. For the slow control system, an example is available in the distribution under 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) but some include directly the hardware calls in the device layer. For some more explanation on the Slow control scheme, refer to Slow Control System. Refer to the nulldev.c for a proper example.
Follows the new "drivers/" directory structure containing the original class, device, bus and divers with the new split for the camac, vme, usb directories. Not all the drivers are up-to-date for the latest mvmestd. Please contact midas for specific support.
Drivers/ directory structure
- CAMAC drivers 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!
- VME drivers 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 drivers USB is getting popular in particular for the MSCB system. Following the same concept as for the CAMAC and VME, the musbstd.h/c is available for USB access.
The CAMAC drivers can be used in different configuration and may have special behaviors depending on the type of hardware involved. Below are summurized some remarks about these particular hardware modules.
- CAMAC controllers
- [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. Wrong returned data can be expected when CPU clocks is above 250MHz. Attempt on "slowing down" the IO through software has not guaranteed perfect result. Contact has been taken 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 Frequently Asked Questions) and also Hytec )
- [hyt1331.c Version >= 1.8.3] This version has been modified for 5331 PCI card support running under the dio task.
- [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 camaclx.c. This requires to first load a module 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 crate. 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.
- CAMAC drivers
- [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 task, mhttpd task utilities.
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] mvmestd implementation for VxWorks Operating System. Does require cross compiler for the VxWorks target hardware processor and proper WindRiver license.
- VME modules
- [lrs1190.c] LeCroy Dual-port memory ECL 32bits.
- [lrs1151.c] LeCroy 16 ECL 32bits scalers.
- [lrs2365.c] LeCroy Logic matrix.
- [lrs2373.c] LeCroy Memory Lookup unit.
- [sis3700.c] SIS FERA Fifo 32 bits.
- [sis3801.c] SIS MultiChannel Scalers 32 channels.
- [sis3803.c] SIS Standard 32 Scalers 32 bits.
- [ps7106.c] Phillips Scientific Discriminator.
- [ces8210.c] CES CAMAC crate controller.
- [vmeio.c] Triumf VMEIO General purpose I/O 24bits.
This section is under development for the Wiener USB/CAMAC CCUSB controller. Support for Linux and XP is undergo. Please contact midas for further information.
For GPIB Linux support please refer to The Linux Lab Project
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
- [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).
Data format - Top - CAMAC and VME access function call
Midas DOC Version 1.9.5 ---- PSI Stefan Ritt ----
Contributions: Pierre-Andre Amaudruz - Sergio Ballestrero - Suzannah Daviel -
Doxygen - Peter Green -
Qing Gu - Greg Hackman - Gertjan Hofman - Paul Knowles - Rudi Meier - Glenn
Moloney - Dave Morris - John M O'Donnell - Konstantin Olchanski - Renee Poutissou
- Tamsen Schurman - Andreas Suter - Jan M.Wouters - Piotr Adam Zolnierczuk