INTRODUCTION
Since most of the SSPs in the BNL787 system control FASTBUS crates containing different types of slave modules, the code loaded into each SSP is likely to be very different. It is therefore necessary to adopt some standard features to enable efficient accessing of the data from all the SSPs in the system. The standard features described here are defined locations in SSP data memory.
This document is intended to be a clarification of the use of the defined locations.
Additional Information on:
SYSTEM_OPERATION
The BNL787 FASTBUS system consists of a number of FASTBUS crates (or CRATE SEGMENTS), each of which contains at least one SSP which acts as the master of the crate. The remainder of the crate will contain slave modules of
different kinds that collect the data from the experiment.
The SSPs are linked together by a CABLE SEGMENT. One of the crates is designated the "MASTER CRATE" and this contains the "MASTER_SSP". The "MASTER CRATE" will also contains an interface to the host computer (CFI interface).
Each SSP is responsible for the initialization and set up of the modules in the same crate, and for reading out and storing data from their local crate segment on each event. The MASTER_SSP will then read the data from the other SSPs via the cable segment, and will assemble and store it. It will then be read out by the host.
Additional Information on:
DATA_FLOW
The flow would be as follows:
The master sends a command INIT to all subsiduary SSPs. On receipt of this command, all SSPs should call a subroutine INITIALIZE. Initialization includes filling the BNL787 defined locations for crate contents (see $CRATE). The slave modules should be made ready for data taking. Further actions are SSP_dependent, and may include filling of a YBOS bank containing initial set-up values of the slave modules. If so, the address and length of the bank should be loaded into the SSP_dependent defined locations $SLAVE_REGS and $LSLAVE_REGS.
After the conclusion of Initialize the SSP halts.
The master sends a command STAR to all subsiduary SSPs. This denotes the start of a run. On receipt of this command, all SSPs should call a subroutine START. The action of this subroutine is SSP_dependent. It may include initializing any counters or histograms for the whole run. After the conclusion of START, the SSP halts.
The master sends a command BSPI to all subsiduary SSPs to denote begin of spill. On receipt of this command, all SSPs should call a subroutine BEGIN_SPILL. The action of this subroutine is SSP_dependent. It may include resetting pointers to the data and address buffers (see BUFFER_LOCATIONS_AND_SIZES), and initialization of any counters for the spill.
If a front panel SSP trigger is being used, the routine BEGIN_SPILL will write the command EVNT to its own $COMMAND location and enable front panel triggers. It then sets soft halt, and waits for an SSP front panel trigger. Otherwise, BEGIN_SPILL will simply halt in the same way as the other subroutines.
On receipt of a hardware trigger to denote an event, the master SSP will cause the subsiduary SSPs to execute the subroutine EVENT, either by sending a SSP front panel trigger, or by writing the command EVNT.
On receipt of the command EVNT, a subroutine EVENT will be called. This will read the data from the slave modules into a data buffer, where it is stored in YBOS format. EVNT commands will be given repeatedly until either the end of spill occurs, or the buffer becomes full. If the buffer becomes full, a special return code is sent (see $RET_CODE). On concluding subroutine EVENT, the SSP will halt unless SSP front panel triggers are enabled, in which case it will set the soft halt.
The master will signal the end of spill by sending the command ESPI. On receipt of this command, a subroutine END_SPILL will be called. The action of END_SPILL is SSP_dependent, and may include processing the raw data. On concluding subroutine END_SPILL, the SSP will halt.
At this point, the master may read all the pieces of the event from the subsiduary SSPs, and combine them in buffer. The commands BSPI,EVNT,ESPI would then be repeated until the end of run.
The commands PAUS and CONT are dummies presently.
All the SSPs in the system must collect data from the slaves in their crate segment, and produce a data buffer and address buffer that can be read out by the master at the end of spill. The data buffer may contain raw or processed data. The gathering of the data and filling of the address and data buffers is SSP_dependent, but the final format of the contents of the data and event buffers should be the same for all SSPs.
Additional Information on:
Converted from .HLP to .HTML by HLPTOHTML.