S-LINK Software for PULSAR Testing




Overview

Pulsar board has two S-LINK ports (bi-directional) via P3 backplane (through a transition module in the back similar to the simple transition module made at CERN). This allows Pulsar to communicate directly with a PC or VME processor (both directions) via high bandwidth commercially available Simple S-LINK to PCI/PMC interface cards, or SSPCI (speed up to 120MB/s) . There are many device drivers (and related application software) developed for these PCI cards and they can be found at Linux , NT , LynxOS, Vxworks. Note that there is a new (commmercially available) high speed follow up of the SSPCI, namely the S32PCI64 (32-bit S-LINK to 64-bit PCI interface card with speed up to 260MB/s), The new board should be much faster and easier to use (see recent PCI performance tests for ATLAS readout). However, it is relatively new and here we will only foucs on the software for the older SSPCI (SLINK to PCI) and SPCIS (PCI to SLINK). These boards are good enough for teststand application. The following page describes initial work with SLINK-PCI software for Pulsar application (work done by Derek Kingrey, summer student from Cornell University). This page is maintained by Derek. Just like the firmware VHDL code for Pulsar, all SLINK related software discussed here is in CVS (managed by Peter Wittich).

Initially we would like to have software to do the following (some will be used for initial Pulsar prototype testing, some will be more advanced features for general purpose applications):

  1. Provide a reliable driver to control both an LDC and an LSC via the PCI bus using a Simple S-Link to PCI (SSPCI) interface card and a Simple PCI to S-LINK (SPCIS) interface card.
  2. Provide an application program utilizing the above driver to send and receive S-LINK data (to and from Pulsar). The application should allocate a memory buffer for incoming and outgoing S-LINK data, and should be able to write and read S-LINK data to and from this buffer.
  3. For maximum speed, DMA should be used for all data transfers to and from the above memory buffer.
  4. The driver should be interrupt driven.
  5. The driver should use the LCTRL line from the LDC to control the beginning and ending of an event. (This allows for the event length to vary and saves on CPU overhead).
  6. All incoming S-LINK data should be saved to disk to be read later.
  7. will try Real-Time Linux for better performance.



Original S-LINK to PCI Driver and Application Source Code

Since the 32-bit S-LINK to PCI and PCI to S-LINK interface boards have been around for some time now, many drivers and applications have already been developed to satisfy some of the goals listed in the Overview. As a base, we choose to start with code developed by Sidik Isani of the CFHT Telescope project in Hawaii. This code was chosen as a base for its simplicity, kernel compatibility, robustness, and use of RTAI Linux for real time interrupt handling. The original source code includes a SSPCI driver and an application program for debugging and testing S-LINK performance. Also included are a number of supporting programs including one that allocates the himem memory area reserved at boot time. The driver initializes the PCI interface and sets up interrupt handling. The driver uses ioctl commands from the application program to control the LDC and DMA engine on the PCI card. The driver also uses these commands to initialize and reset the LDC interface on the PCI card as well as set up the memory ring buffer. An example application, designed to work with a SLIDAS board, has been included with the driver. We will simply modify the example code for initial Pulsar prototype testing needs (which does not need high speed).

The original code does not accomplish all of the goals listed in the Overview as it was designed for different application. For example, the driver is designed for SSPCI (SLINK to PCI) but not for SPCIS (PCI to SLINK).



Revision History and Current Progress:

6/10/02
6/12/02
6/14/02
6/26/02
Table Rate Graph
Data Rate vs. Bytes Transferred

The number of microseconds was calculated programatically by reading the time just before the data transfer and again just after and taking the difference. The data rate was calculated by dividing the byte count (transferred) by the number of microseconds. (Compare to the study done by other people here...)

7/1/02
7/9/02
7/11/02
7/19/02
7/22/02
Today
...more to come...


Written by Derek Kingrey
Cornell University
Email: dkingrey@fnal.gov
Fermilab Internship for Physics Majors, Summer 2002

Last modified: July 22, 2002