Struck STR7201 Device Device Support for the MCA Record

Mark Rivers

Contents

Overview

This device support works with both the Struck STR7201 and the SIS3801 VME modules. The STR7201 is a module previously manufactured by Struck, and now by Bastian, which bought out Struck. The SIS modules are manufactured by SIS, which is a new company run by former Struck employees. Both are a VME modules with 32 (Struck 7201 and SIS3801) or 8 (SIS3808)) scaler input channels. In this document the term STR7201 includes all of the above modules, except where explicitly noted. Each input can count at 100MHz or 200MHz depending on model. It has an external channel advance input (called Next) which causes the the current scaler values to be copied to a FIFO, clears the scalers and resumes counting. The scalers are implemented in a dual-bank design, so that the switching time is less than 4 nsec.

The device support for the MCA record is written to support the use of the STR7201 as a multichannel scaler. Up to 32 records can be connected to each unit, each record corresponding to one of the signal inputs.

The STR7201 hardware itself is not a multichannel scaler in the conventional sense, since it simply contains a FIFO of scaler counts, rather than an array of memory locations which hold the counts for each dwell cycle. The device support for the STR7201 simulates a conventional MCS by allocating a memory buffer which contains the counts in each dwell period. The device support copies the counts from the FIFO to this memory buffer.

Each FIFO word contains the counts for one input signal for one dwell period. Available FIFO chips can hold from 2K to 32K words. The FIFO can thus buffer anywhere from 64 dwell cycles (32 active inputs, 2K FIFO) to 32,768 dwell cycles (1 active input, 32K FIFO). The minimum dwell time is in the range .5-4 microseconds, depending upon the number of active inputs. The present device support routines assume that something is causing at least one record attached to each card to process fast enough to prevent FIFO overflow. In the near future VME interrupts will be implemented, so that FIFO readout will be done automatically when the FIFO is half full. Even with interrupts there is a possibility of FIFO overflow with very short dwell times and small FIFO sizes. Users whose applications require short dwell times and a large number of active inputs should purchase large FIFO chips to prevent this. The FIFO chip can be replaced in the field. The device support determines the FIFO size automatically.

Hardware Configuration

Jumper J600 on the board must be set to select LCA file 2 (STR7201 Design 1) or LCA file 3 (STR7201 Design 2). With Design 1 selected the scalers are 32 bits wide. With Design 2 selected the scalers are 24 bits wide, and the upper 8 bits of each data word contain information on the channel number, bank, and 2 user bits. The channel number and bank information are redundant since the device support sorts the FIFO output by channel number when copying the data to the buffer and then to the MCA record. However, some applications may want to use the 2 user bits which are latched with each Next cycle, and Design 2 may be selected for those applications.

The device support requires that the board be configured for VME A32 addressing, so jumper EN_A32 must be in place. Address selection is done with jumper J_A11, and switches SW_A32U, SW_A32L, SW_A24 and SW_A16. The software default address is 0xA0000000. Note that the factory-default address of 0x33508000 cannot be used since this part of the VME A32 address space is not accessible with the APS version of the vxWorks board support package. Each board takes up 2K bytes of A32 address space, so systems with multiple cards must configure card N at base address + 2K*N. For example, if using the default base address of 0xA0000000 the second card would be set to address 0xA00000800 (jumper J_A11 removed).

The device support software configures the control inputs in Mode 2, which means:

MCA Record Fields

The device support for the STR7201 defines the INP field to be type VME_IO, and uses the normal "card" and "signal" conventions. A card is a single STR7201 module. Each module supports up to 32 signals (0-31), corresponding to the 32 inputs. Each MCA record is connected to one of these signal inputs.

The STRT, STOP and ERAS fields act on all records which are connected to a particular card. Thus it is only necessary to issue these commands to one record in order to start, stop or erase all other records.

Acqusition will be stopped for all records connected to a particular card whenever one or more of the following conditions is satisfied:

The CHAS field is not implemented, since the STR7201 only supports external channel advance.

The SEQ field is not implemented, since the device inherently has a fast time axis.

The DWEL field will be implemented soon, when a new version of the firmware implements a built-in prescaler.

The MODE field is not implemented, since the STR7201 can only operate in MCS mode.

vxWorks Startup Script

There are 2 functions which are intended to be called from the vxWorks startup script before iocInit.

Files

STR7201 support is provided in 3 files, devSTR7201.c, drvSTR7201.c and drvSTR7201.h. These files can all be obtained in a tar file. This file should be untarred in a top level application directory, yourApp. There are only 2 files which are specific to the STR7201, but it does require a recent version of the MCA record, so I have also tarred up the complete directory.

devSTR7201.c contains the device support. These functions have knowledge of the MCA record and of how to call the routines in drvSTR7201.c They have no knowledge of the details of how the STR7201 works.

drvSTR7201.c is not a true EPICS driver, since it does not have a driver entry table, or init() and report() functions. However, it is a driver in the sense that it has no knowledge of the MCA record and its functions could be called by device support from other records (e.g. waveform) if desired.

The following lines must be added to yourApp/src/Makefile.Vx

LIBOBJS += drvSTR7201.o devSTR7201.o
SRCS.c += ../drvSTR7201.c ../devSTR7201.c
The following lines must be added to yourApp/src/yourApp.dbd
device(mca,VME_IO,devSTR7201,"Struck STR7201 MCS")


Suggestions and comments to: Mark Rivers : (rivers@cars.uchicago.edu)
Last modified: June 7, 2000