http://www.pa.msu.edu/hep/d0/ftp/tcc/trics_ii/scl_initialization_steps.txt -------------------------------------------------------------------------------- List of things TCC needs to do at SCL Initialize time Updated: 10-May-2004: Trics V10.5 Rev D (replace fixed 0.1 s wait to flush L2 Global with up to 1s wait for L2FW to be quiescent=idle) There are two separate contexts =============================== - Triggered by a front-end L1/L2 Error (not yet implemented) - Explicit request from COOR (or Trics dialog boxes) for an SCL_Initialize or as an implicit consequence of a Start_Run message from COOR SCL Initialization Steps ======================== 0) If system is flagged "Non-Operational": Abort and do nothing (i.e. skip all steps below) while returning a "bad" acknowlegement with an explict text "L1FW wasn't Initialized, get expert assistance" 1) If system is not already paused: pause the L1 Framework. This stops the L1FW from issuing further L1_Accepts. 2) Wait up to 1 second (in increments of 0.1 s) for the L2 Global to process all pending L1_Accepts and issue all corresponding L2 Decisions (L2_Accept or L2_Reject). (This matters only when events are flowing when an SCL_init is requested, which is rarely the case, but is not impossible). 3) Force and Hold the L2 Helper State engine to its Reset State. (This is to prevent the L2 FW from starting another L2 cycle during the SCL_Init Sequence) 4) Wait 1 second (to let things settle down after the pause) 5) Read (before the actual SCL_Init is sent to the Front-Ends) the Status of all GeoSect Channels (only the ones currently allocated by COOR) in the Trigger Status Concentrator Cards of the SCL Hub End Crate. Display a set of lists of all GeoSect. This starts with the list of GeoSect Examined (i.e. currently allocated by COOR) and continues with sub-lists of GeoSects without and with errors flagged for all possible error types. e.g. : I$ GeoSect Examined List: 0:127 I$ GeoSect with No Error: 0:1 3:7 9:31 33:74 76:99 101:127 W$ GeoSect with L1 Error: 2 W$ GeoSect with L2 Error: 8 W$ GeoSect with Init Ack: 32 W$ GeoSect with Sync Err: 75 W$ GeoSect Not Connected: 100 Note: The "Errors" are only displayed as warnings (bright white) and not as errors (red). Note: Here we could start incrementing "Whodunit scalers". This is not done yet. 6) Execute the \Trics\D0_COnfig\SCL_Initialize.mcf Master Command File which calls the Initialize_SCL.rio register IO command file which actually sends the Init request over the SCL by: setting Reg 8 of the SCL Helper at 0/2/21/13 to 1, waiting 1 second, setting the above register back to 0. 7) Read again (after the actual SCL_Init was sent to the Front-Ends) the Status of all GeoSect Channels. This is exactly like in step #5. 8) Clean up the L2 FW: 8.a) Reset the L2FW TRM input FIFO receiving the L1 Spec Trig Fired and clear errors 8.b) Reset the L2FW TRM input FIFO receiving the Auxiliary Data and clear errors 8.c) Reset the L2FW TRM input FIFO receiving the L2 Answer and clear errors 8.d) Reset the Thermometer of L1 Awaiting L2 Event Count 8.e) Release the L2 Helper State Engine 9) Wait 1 second (to let things settle down before the resume) 10) If system was not already paused before step #1 above: resume the L1FW 11) Call the Increment_LBN message handler which will push a Lum Monit Data Block out the door. Not Done: ========= - Directly handle SCL Initialize protocol (The SCL_Initialize.rio file pulses the SCL Helper register, not TRICS) - Listen to and react to L1/L2 Errors - Record whodunnit if triggered by a front-end (now being addressed) - Generate L1 Framework and L1 CT SCL Status Data - Grab a copy of every L2 crate's SCL Status Data. This data is supposed to be accessible to the rest of DZero.