00001 /****************************************************************************** 00002 * 00003 * Title : ABCDscans.h 00004 * Version: 07 January 2003 00005 * Revised: 12 August 2004 00006 * Revised: 02 September 2004 00007 * 00008 * Description: Definitions of variable type numbers 00009 * Extracted from SCTDAQ's "sct_scans.h" 00010 * The numbering scheme is largely historic and may seem crazy 00011 * but I wish to keep it for reasons of backward compatibility 00012 * 00013 * Related files: ABCDconfig.c 00014 * Documentation: http://s.home.cern.ch/s/sct/public/sctdaq/sctdaq.html 00015 * 00016 * Author: Peter W Phillips, P.W.Phillips@rl.ac.uk 00017 * 00018 ******************************************************************************/ 00019 #ifndef ABCD_SCANS_H /* multiple inclusion protection */ 00020 #define ABCD_SCANS_H 00021 00022 /****************************************************************************** 00023 * Definitions * 00024 ******************************************************************************/ 00025 /* For 1D scans: */ 00026 #define NO_SCAN 255 00027 #define SCAN_NONE 255 00028 00029 /* ABCD3T DAC and Delay Settings */ 00030 00031 /* Elapsed == elapsed time; equivalent of a NOP to permit general monitoring */ 00032 #define ST_ELAPSED 0 00033 00034 #define ST_VTHR 1 00035 #define ST_VCAL 2 00036 #define ST_STROBE_DELAY 3 00037 #define ST_PREAMP 4 00038 #define ST_SHAPER 5 00039 00040 #define ST_TRIM 6 /* set trim value of all channels */ 00041 #define ST_MASK 7 /* predefined mask patterns used during testing */ 00042 #define ST_ROLE 8 00043 #define ST_NMASK 9 /* number of channels to be masked */ 00044 00045 /* ABCD3T Config Register Settings */ 00046 #define ST_CAL_MODE 10 /* calibMode */ 00047 #define ST_COMPRESSION 11 /* readoutMode */ 00048 #define ST_TRIM_RANGE 12 /* trimRange */ 00049 #define ST_EDGE_DETECT 13 /* edgeDetect */ 00050 #define ST_SEND_MASK 14 /* mask */ 00051 #define ST_ACCUMULATE 15 /* accumulate */ 00052 00053 #define ST_BYPASS 17 /* predefined redundancy configurations 00054 to be used during production testing 00055 PWP 01.11.00 */ 00056 #define ST_ACTIVE 18 /* set ACTIVE or INACTIVE */ 00057 00058 #define ST_TOKEN 19 /* a bit pattern that defines the bypass 00059 scheme allowing all combinations. A '1' 00060 means that the chip is read out, a '0' 00061 means that the chip is bypassed/dead */ 00062 00063 /* ROD-generated trigger stream delays. DELAY1 => 1st encountered 00064 DELAY command in the trigger stream, DELAY2 => 2nd encountered 00065 DELAY command: */ 00066 #define ST_TRIG_DELAY1 25 00067 #define ST_TRIG_DELAY2 26 00068 #define ST_TRIGGER_DELAY ST_TRIG_DELAY1 00069 00070 00071 #define ST_SELECT 38 /* Selection Flag set or not */ 00072 #define ST_FEEDTHROUGH 39 /* Place chips in clk/2 mode */ 00073 00074 00075 /* Adjustment of ABCD3T DAC settings using the calibration (RC) data */ 00076 #define ST_QTHR 41 00077 #define ST_QCAL 42 00078 #define ST_TARGET 43 /* Record of Trim Target PWP 06.12.02 */ 00079 #define ST_TTHR 44 /* Threshold in mV set wrt Trim Target PWP 06.12.02 */ 00080 00081 /* 00082 * BOC parameters 00083 * Several of these have direct parallels in SCTDAQ 00084 * - hence this might look a little wierd PWP 25.03.03 00085 */ 00086 00087 #define ST_RX_DELAY 20 /* same as ST_STREAM_DELAY in SCTDAQ */ 00088 #define ST_RX_DELAY0 21 /* same as ST_STREAM_DELAY0 in SCTDAQ */ 00089 #define ST_RX_DELAY1 22 /* same as ST_STREAM_DELAY1 in SCTDAQ */ 00090 00091 #define ST_RX_THRESHOLD 50 /* same as ST_OPTO_RX_THR in SCTDAQ */ 00092 #define ST_RX_THRESHOLD0 51 /* same as ST_OPTO_RX_THR0 in SCTDAQ */ 00093 #define ST_RX_THRESHOLD1 52 /* same as ST_OPTO_RX_THR1 in SCTDAQ */ 00094 00095 #define ST_TX_CURRENT 53 /* same as ST_OPTO_TX_DAC in SCTDAQ */ 00096 #define ST_TX_MARKSPACE 54 /* ??? ST_OPTO_TX_MKSNEG ??? */ 00097 #define ST_TX_DELAY 55 /* *** no direct parallel *** */ 00098 #define ST_TX_COARSE 56 /* same as ST_OPTO_TX_CDELAY */ 00099 #define ST_TX_FINE 57 /* same as ST_OPTO_TX_FDELAY */ 00100 00101 #define SCAN_STAGED 0 /* ==> The calibration line is altered during the scan. */ 00102 #define SCAN_STATIC 1 /* ==> The calibration line is not used/changed. */ 00103 00104 #endif /* multiple inclusion protection */