Definition_of_terms

For the purposes of this note, the word "SSP" refers to any SSP in the system. Anything referred to as "SSP_dependent" means that it may take a different meaning for every SSP, anything "SSP_independent" must have the same meaning for all SSPs in the system.

SSPs in the system apart from the MASTER_SSP are referred to as "SUBSIDUARY SSPs". Examples of these are the DRIFT_CHAMBER_SSP (the SSP reading the the drift chamber TDCs) and the TRIGGER_SSP (the SSP reading the ADCs for the event trigger). *

The FASTBUS system of SSPs is controlled by the "master". For subsiduary SSPs, the master will normally be the MASTER_SSP, or, if a direct path to a host computer exists for test purposes, the master may alternatively be the host computer.

Therefore, in this note, the word "master" refers to the controller of the SSP at the time, that is, either the MASTER_SSP, or the host computer.

New_version

A number of SSP data memory locations are assigned as "defined" or "fixed" locations for SSP code written for the BNL787 experiment. The present version represents a large change from previous versions.

A number of the locations previously defined have been found to be redundant, and these have been removed or replaced. Because of this, the size of the space reserved for defined locations has been substantially reduced, meaning user code starts at DM400 instead of DM800.

Many of the defined locations have been regrouped into blocks to enable a FASTBUS block read or write to easily access them. Some of the defined locations need to be written only at the beginning of a run, others must be written on every command. Similarly, some locations must be read after every command has been executed, others only at the end of a run. It is more efficient for the master to use one FASTBUS operation to block read or write a group of locations than to use many single word read/write operations.

In common with the previous version, space has been reserved so that extra locations may be added later. Blocks of reserved space in low data memory for SSP_dependent counters and data tables have been removed. Instead, parameters for the start address and length of blocks of memory reserved for these counters and tables have been substituted.

In this way, the lowest 4K of memory (which is valuable to SSP programmers) is not wasted.

--------------------------------------------- * Note that in the experiment the TRIGGER_SSP may become the master during the event. In this case, the MASTER_SSP will act as a subsiduary SSP for the duration.

Files

All the files mentioned in this document (except where specifically noted) are to be found in the account 787SSP:

The defined locations are listed in the files

BNL787_RES_D.MAR BNL787_DEF_D.MAR

THESE FILES MUST NOT BE ALTERED

The files BNL787_DEF.MAR and BNL787_RES.MAR are normally identical to BNL787_DEF_D.MAR and BNL787_RES_D.MAR. It is the files BNL787_DEF.MAR and BNL787_RES.OBJ that are actually used in the cross assembling and linking process for the BNL787 SSP code (see 787DOC:787_SSP_SYS.MEM).

Cross_assembling_and_linking

The file 787DOC:787_SSP_SYS.MEM gives details of cross assembling and linking code for the BNL787 system. A brief summary is given here.

The file 787SSP:BNL787_DEF.MAR is the definition file needed for cross-assembling using the DCROSS command. Its use with BNLSYS version 4.0 and higher is optional, since the CROSS command is sufficient.

The DLINK command must always be used for linking BNL787 code, irrespective of whether the command CROSS or DCROSS was used for cross-assembling.

The command : $DLINK FILE

links the code in the file FILE.OBJ to the files BNL787_RES.OBJ and USER_RES.OBJ Note that the files FILE.OBJ and USER_RES.OBJ reside in the user's own account. The file BNL787_RES_D.MAR not only defines the names of the defined locations, but fills them with an initial value, which is their own address in DM.

*********************************************

The file of defined locations for the BNL787 data acquisition system will be BNL787_RES_D.MAR, copied and renamed BNL787_RES.MAR. Therefore all SSP programs must expect that the initial contents of all BNL787 defined locations will be that of BNL787_RES_D.MAR. Thus, the SSP programs and/or the master programs are responsible for writing desired initialization values into BNL787 defined locations.

*********************************************

Temporary_version_of_BNL787_RES

When debugging and testing SSP code, often the master is not available to fill the initial contents of the defined locations. For example, if an SSP file is being tested using only SNOOPY (or SSPAR) without the DAQ data producer program, it is very tedious for the programmer always to type in default values of locations that should be filled by the master. For this reason, programmers may wish to make their own version of 787SSP:BNL787_RES.MAR, which is a version of BNL787_RES_D.MAR but with default values supplied for locations that should be written by the master.

An example of this can be found in 787SSP:BNL787_RES_TDC.MAR. This file differs from BNL787_RES_D.MAR only in that suitable values have been supplied as defaults in the (SSP_dependent) locations $MAX_VAR,$MIN_VAR,$MOD_MAX,$RETRY_MAX.

To replace BNL787_RES with this file, it would be cross assembled (using the CROSS command), and the resulting object module renamed BNL787_RES.OBJ. This file would then be used for all DLINK commands, system wide. Clearly, altering BNL787_RES.OBJ must be done with caution, and all those writing SSP code on that system must be informed.

Note that only the contents of SSP dependent locations should be changed as described above. On no account must new locations be added (even if reserved ones are used).

Addition_of_defined_locations

It is essential that the names and position in DM of defined locations are not changed, except by common agreement. Code written for the SSPs should be relocatable in SSP memory, so it is very easy to expand or contract the size of the defined locations in DM, without affecting existing code.

The author is responsible for updating the files 787SSP:BNL787_RES_D.MAR, BNL787_DEF_D.MAR (and BNL787.INC) with new defined locations, and distributing the new versions to computer systems used by BNL787 SSP programmers (currently ERICH and KAON at TRIUMF, and BNL787 at Brookhaven).

Therefore, suggestions for new BNL787 defined locations should be sent to the author (mail to SUZ@TRIUMFCL), bearing in mind that the labels of BNL787 defined locations should begin with "$", and must not conflict with

o Names of BNLSYS locations

o Names of existing BNL787 defined locations

o The following defined subroutine names $INITIALIZE,$START,$BEGIN_SPILL,$EVENT,$END_SPILL, $PAUSE_DATA,$CONTINUE

FORTRAN_INCLUDE_file

The INCLUDE file for the FORTRAN programs that access the BNL787 defined locations (787SSP:BNL787.INC) must agree with the locations defined in BNL787_RES_D.MAR, and therefore must not be changed.

See PARAMETERS_FOR_DATA_PRODUCER for a description of BNL787.INC.

Converted from .HLP to .HTML by HLPTOHTML.