The LHCb Timing and Fast Control ================================== Z. Guzik, R. Jacobsson and B. Jost To be presented by R. Jacobsson Abstract ---------------- In this paper we describe the LHCb Timing and Fast Control (TFC) system. It is different from that of the other LHC experiments in that it has to support two levels of high-rate triggers. Furthermore, emphasis has been put on partitioning and on locating the TFC mastership in one type of module: the Readout Supervisor. The Readout Supervisor handles all timing, trigger, and control command distribution. It generates auto-triggers as well as control the trigger rates. Partitioning is handled by a programmable patch panel/switch introduced in the TTC distribution network between a pool of Readout Supervisors and the Front-End electronics. Summary ---------------- The LHCb Timing and Fast Control (TFC) system is in the prototyping phase. Although the backbone of the timing, trigger and control distribution network is based on the CERN RD12 system (TTC), several components are unique to the LHCb experiment due to the fact that the readout system is different from that of the other experiments in several respects. Firstly, the LHCb TFC system has to handle two levels of high-rate triggers: a Level 0 (L0) trigger with an accept rate of maximum 1.1 MHz and a Level 1 (L1) trigger with an accept rate of maximum 60 kHz. Secondly the TFC architecture focuses on partitioning. A partition is in LHCb defined as a configurable ensemble of parts of a sub-detector, an entire sub-detector or a combination of sub-detectors that can be run in parallel, independently and with a different timing, trigger and control configuration than any other partition. Furthermore, the aim has been to locate the entire TFC mastership of a partition in a single module: the Readout Supervisor (RS). The idea is to have a pool of such Readout Supervisors, in which one is interfaced to the two central trigger decision units and is used for physics data taking. The others are fully configurable masters for testing, debugging and calibrating any partition stand-alone. The Readout Supervisors receive the LHC bunch clock via the LHC machine interface. The RS used for physics data taking also receives the L0 and L1 triggers from the central L0 and L1 decision units. One task of the Readout Supervisor is to distribute these, as well as internally generated triggers and various synchronous control commands, to the Front-End electronics via the TTC network. The L0 decisions are transmitted on channel A of the TTC system, and the L1 decision as well control commands share channel B and are transmitted as short broadcasts. The six user-definable bits of the short broadcasts allow qualifying the L1 triggers and encoding different types of control commands. The RS also acts as a trigger rate controller by converting positive trigger decisions to negative whenever data congestion occurs in the system. Fast buffers such as in the L0 Front-End electronics cannot feed back overflow signals and their occupancies are therefore emulated in the RS. Slower parts of the system signal congestion via hardware. The partitioning is implemented by introducing a programmable patch panel/switch in the TTC distribution network between a pool of Readout Supervisors and the Front-End electronics. The switch can be configured to define independent distribution networks between the Readout Supervisors and sets of sub-detector components (partitions). The Readout Supervisors can thus trigger and control different partitions independently. In order to feed back the overflow signals from different sub-detector components to the appropriate RS, a second configurable "OR switch" has been devised. It performs an OR of the signals coming from components belonging to the same partition.