Functionality and Processing Flow in the Run II Level 1 Framework ------------------------------------------------------------------- Rev. 20-OCT-1995 The Level 1 Framework manages the selection of Level 1 Triggers and the readiness of the DAQ system to receive L1 Accept signals. The event to event dynamic inputs are: -------------------------------------- 1. Signals (And-Or Input Terms) from the Level 1 Triggers 2. Front-End Busy signals from the 128 Geographic Sections 3. "Geographic Section with L1 Error" signals from the 128 Geographic Sections. 4. Disable signals e.g. L2 Disable 5. Master Clock signals. 6. Special signals for foreign scalers Programming inputs to the Level 1 Framework: -------------------------------------------- 1. Programming information to define up to 64 Specific Triggers: A. And-Or Input Terms for each Specific Trigger (required Hi, required Low, for each required term is it a "Physics" term or a "Beam Condition" term. Probably as 2 separate lists of andor term (with possible overlap) that generate the 2 signals driving the andor fired scaler and the beam condition scalers. Maybe only allow 4 (?) different "Beam Conditions" combinations to simplify accounting? B. List of Geographic Sections that receive a "Start Digitization" signal when a given L1 Specific Trigger fires. C. L1 Pre Scale value for each L1 Specific Trigger. D. Obey-Ignore L2 disable and other disable signals 2. Programming information that indicates what Geographic Sections are currently in use. 3. Maps to collect the L1 Spec Trigs into groups for scaling 4. Program special purpose And-Or Terms (e.g. Bunch Select described below) High Speed outputs from the Level 1 Framework: ---------------------------------------------- 1. Signals to the Geographic Sections: A. Master Clock (53.104 MHz, 7.59 MHz signals) B. Current 132 ns period ID and Type C. Beginning of Turn Marker D. L1 Accept/Reject signals to each Geographic Section E. L2 Processing Required/Not Required to each Geo Sect F. L1 Trigger Number (turn and 132 ns period ID) of beam crossing which caused the L1 Accept G. Initialize all Geographic Sections 2. Signals used as clocks and gates to scalers. 3. Information to the L2 Trigger Framework A. Mask of Specific Triggers Fired B. L1 Trigger Number (turn and 132 ns period ID) Data Block Readout from the Level 1 Framework: ---------------------------------------------- 1. Readout of the L1 Framework Data Block (via SAR modules). all State information is readout for the Previous, Current, and Next Beam Crossings (or at least the ones with a "*"). All Scaler counts are readout for the Current Beam Crossing only. A. For each And-Or Input Term the State of its * And-Or Input Term B. For each Spec Trig the State of its Fired Signal * Exposed Signal * Physics Andor Term Fired Signal * Beam condition Andor Fired Signal the Count from the following Fast Readout scalers: L1 Fired L1 Exposed (per bunch? what exactly is this quantity?) D. For each Geographic Section the State of its L1 Accept signal. Front-End Busy signal. E. Beam Crossing number(s) (Absolute, or turn+bunch, or whatever) F. Level 1 Trigger Number G. Level 0 States (part of L1 CT?) + Scalers H. Absolute Time Low Speed Readout from the Level 1 Framework: --------------------------------------------- 1. Readout (via a private path) of data needed by - TrgMon, - Global_Mon - Luminosity Server For all scalers, we need both the absolute count (for absolute reading and ability to compute longer integration times on host), along with an increment over a specified time segment (for instantaneous display of rates and percentages over a default integration time), currently 5 sec. An * indicates a quantity that should be read out at regular intervals (order of 0.2 Hz) for use in monitoring. Unmarked quantities should be available for interrogation but not read out at regular intervals. Read out of these latter quantities may (or may not) require temporarily suspending the operation of the Framework. A. For ALL of the And-Or Input Terms * The State for the current crossing B. For ALL of the And-Or Input Terms * The Count of Andor Fired C. For each Spec Trig the State of its * Fired Signal * Exposed Signal (what makes up this quantity?) * Physics Andor Term Fired Signal * Beam condition Andor Fired Signal * Mask of disable sources the count from the following Fast Readout scalers (a copy of): * L1 Fired * L1 Exposed the count from the following Slow Readout scalers: * Physics And-Or Fired * Beam Conditions And-Or Fired * COOR Disable count * L3 Disable count * Front-End Busy Disable count * PreScale Disable count * Autodisable count D. For each Geographic Section the State of its * L1 Accept signal. * Front-End Busy signal. the count from the following slow Readout scalers: * L1 Accept signal. * Front-End Busy signal. the count from the following TRICS scalers * Acquisition synchronization errors * E. Beam Crossing number(s) (Absolute, or turn+bunch, or whatever) * F. Level 1 Trigger Number * G. Level 0 States (part of L1 CT?) + Scalers * H. Bunch Scalers * I. Foreign scalers J. The programming of the Specific Triggers Enable/Disable Prescale Ratio Autodisable List of Physics And-Or List of Beam Condition And-Or List of Geographic sections to digitize Maps to collect the L1 Spec Trigs into groups for scaling 3. Begin/End run files (for luminosity server) A. Dump all Level 1 scalers B. Dump all Specific Trigger prescaler ratios Description of the Functional Blocks ------------------------------------ Term Receiver Module -------------------- This block receives the 256 And-Or Input Terms and synchronizes them and provides the "front-end" buffering and readout of their State in the L1 FW Data Block. With each L1 Trigger this State information is readout for the Previous, Current, and Next Beam Crossings. Some scalers will also be provided by this module. Data from these scalers is available only to TrgMon. The few scalers provided will have a multiplexer in front of them to let them look one at a time at a number of And-Or Input Terms. This module also provides "Lemo Outputs" to monitor the arrival time of a selected And-Or Input Term Signal vs a Master Clock signal. This is an aid to properly setting up the timing between an L1 Trigger and the L1 Framework. And-Or Network Module --------------------- This module receives 128 input terms (either And-Or Input Terms or Front-End Busy signals) and builds up to 64 logical "AND" combinations of these terms and their complements. No other functions are provided by this module. Nothing is readout from this module to either the L1 Data Block or to TrgMon. Trigger Decision Module ----------------------- For each of 16 Specific Triggers separately combine the AND of the "Beam Condition" terms with: L2_disables, Pre-Scale disable, Front-End Busy disable, and the COOR disable signal to make the "Exposed to Live Crossing" signal for each of the Specific Triggers. Then separately for each of the Specific Triggers AND its "Live Crossing" signal with the AND of its "Physics" terms to make the Specific Trigger Fired signal for that Specific Trigger. This module provides slow readout scalers to monitor for each of the 16 Specific Triggers: L2 Disable Count, Front-End Busy Disable count, COOR Disable count, and PreScale Disable count, and the OR of all of these. For each of the 16 Specific Triggers this module provides fast readout into the L1 Data Block the State of each of the following items: Physics And-Or, Beam Condition And-Or, OR of all the Disables, Exposed, Fired. With each L1 Trigger this State information is readout for the Previous, Current, and Next Beam Crossings. For each Specific Trigger the following high speed output signals are provided: two copies of L1 Specific Trigger Fired, one copy of Specific Trigger Exposed. AND of +-----+ State State Selected >--------| | | +-----+ | "Physics" | AND |---------+----------------------- | | +--> Terms >--------| | | AND |--+--> +-----+ +---| | Spec | +-----+ Trig | Fired AND of +-----+ State | Selected >------| | | +-----+ | +--State "Beam Condition" | AND |-- -----+----------| | | | Terms >------| | | AND |---+---+----------> +-----+ +-----| | To the OR of | +-----+ Exposed to Selected Scaler +-------+ | Live Front-End >-------+---------| | | Crossing Busy signals | | | Scaler Scaler | NOR | | L2 Disables >-------+---------| 0----+-+--Scaler | | | Scaler | | | L2 Disables >-------+---------| | +--State | | +-----+ +---| | | Pre | | | | ? >----|Scale|--+ +-------+ |Divid| | +-----+ +-----Scaler L1 Framework Output Module -------------------------- The Output module receives all 64 Specific Trigger Fired signals, maps them into which Geographic Sections should receive a "L1 Trigger Accept" signal, and generates the L1 Specific Trigger Fired Strobe signal. This module also provides readout, into the L1 Data Block, of the list of which Geographic Sections received a "L1 Trigger Accept" signal. With each L1 Trigger this State information is readout for the Previous, Current, and Next Beam Crossings. This module can also be used to group a set of the L1 Specific Triggers together for some common monitoring purpose, e.g. overlap studies. Error Map Module ---------------- The Error Map Module watches to see if any of the Geographic Sections are reporting that they have an error in handling the commands received from the L1 Framework. This module allows the Geographic section with the L1 Error to quickly stop the flow of L1 Trigger Accept signals and to begin the process of L1 initializing all of the Geographic Sections. The state of all 128 "Geographic Section with L1 Error" signals can be read from this module over the VME bus. Stop the +-------+ flow of | 128 | +--------> L1 accept | input | single | signals +------->--| "OR" |-----------+ wake up +-----+ | 128 | Gate | signal | TCC 128 | L | | | | | Geo Sec | A | | +-------+ | -------->---| T |------+ | with | C | | | L1 Error | H | | +---------<------+ Signals +-----+ | | ^ | V | | +-----+ 132 nsec | | | L | ------->-------+ | 128 | A | VME Readable Clock +------->--| T |----------> Latch Output | C | e.g. 8 | H | 16 bit VME +-----+ Words Scaler Module Fast Readout --------------------------- The Fast Readout scaler module provides 16 channels each of which have a separate GATE and Clock input. The output of these scalers is stored in a "front-end" buffer so when they are readout the count at the proper beam crossing will be read. Only the data from the Current Beam Crossing is normally readout. There are 32 bit electrical outputs from a two of these scalers for such purposes as: counting the L1 Trigger Number and the Bunch Number and sending this information to the Serial link interface module. This module can be used for general purpose scaling. It is not yet understood how many per bunch scalers are required. Scaler Module Monitor Readout ------------------------------ The Monitor Readout scaler module provides 64 channels each of which have a separate GATE and Clock input. These count in these scalers is synchronously captured and readout via the slow path to TrgMon. These scalers are used to monitor the Front-End Busy rates of the 128 Geographic Sections. Support Functions Module ------------------------ A number of specialized support functions will be provided by the two types of Support Functions Modules. These modules control the generation of certain And-Or Input Terms. The Support Function provided by these two modules are shown in the following drawings Bunch Selector This is a programmable comparator to select a specified beam crossing from a full turn around the accelerator. Bunch Number +------------+ from the Bunch -------->| | Number Counter | | | Comparator |-----------> And-Or Input Programmable | | Term "Requested" -------->| | Bunch Number +------------+ This can be used with "Direct-In-Test-Triggers" so that a system can request a Level 1 trigger on a specific crossing in the turn around the accelerator. Using this Bunch Selector this can be accomplished without critical timing between the requesting system and the L1 Framework. Crossings with Beam Mask This is used to mark all crossings that actually have beam in them. This can be used as a term on the Physics triggers to make sure that only the crossings with beam are selected, or this could be used (required low) to select background events or to initiate other activity that needs to take place during the beam gaps. +------------+ Bunch Number | Mask of | from the Bunch -------->| Crossings |-----------> And-Or Input Number Counter | with Beam | Term +------------+ Direct-In-Test-Trigger Processing This function is similar to the Direct- In-Test-Trigger operation with the Run 1 Framework. This function receives 32 Direct-In-Test-Trigger request signals and processes them into And-Or Input Terms. A Direct-In-Test-Trigger request signal can only set its corresponding And-Or Input Term high for one beam crossing period. This relaxes the timing requirement for systems needing a test trigger. Skip Beam Crossing This function is similar to the Skip Beam Crossing function provided in the Run 1 Framework. After any L1 Spec Trig fires this function forces the skipping of the next "n" Beam Crossings ("n" is programmable). This allows front-end buffer pipelines to refill before the next L1 accept.