This file can be found as pseudo_term_functionality.txt in http://www.pa.msu.edu/hep/d0/ftp/l1/framework/andor_terms/ L1 TFW Pseudo And-Or Input Terms ---------------------------------- Original Rev: 22-MAY-2003 Current Rev: 05-JUN-2003 This is a summary of the functionality, limitations, and numbering convention for the "P-Term upgrade" to the L1 TFW. Review: ------- The L1 TFW currently implements 256 And-Or Terms; their full name is L1 TFW Hardware And-Or Input Terms. Each of the 128 L1 Specific Triggers may be programmed by COOR to require one or more of these 256 Hardware And-Or Terms to be in a particular state in order for that L1 trigger to fire. In order for a given L1 Specific Trigger to fire, COOR can specify a set of And-Or Terms that must be HI and another set of And-Or Terms that must be LOW. The remainder of the And-Or Terms do not participate in the L1 decision for that L1 Specific Trigger. All 128 L1 Specific Trigger decisions are evaluated beam crossing by beam crossing. COOR's programming of the 8 Exposure Groups makes the same type of requirements on the And-Or Terms as are used for the L1 Specific Triggers. P-Terms: -------- Two sets of 48 P-Terms are being added; their full name is L1 TFW Pseudo And-Or Input Terms. These additional Trigger Terms do NOT correspond to additional physical inputs to the L1 TFW. They are formed by fixed combinations of the existing Hardware And-Or Input Terms. The state of each P-Term is computed by the L1 TFW for each Beam Crossing using the states of the Hardware And-Or Terms for that Beam Crossing. The P-Terms in the first set of 48 P-Terms are formed from fixed combinations of the lower 128 Hardware And-Or Terms (#0-127). The P-Terms in the second set of 48 are formed from fixed combinations of the upper 128 Hardware And-Or Terms (#128-255). No P-Term definition can ever combine a mixture of upper (above #128) and lower (below #127) Hardware And-Or Terms. The current layout of And-Or Input Terms was explicitely chosen to take this limitation into account, and matches the P-Term requirements planned or envisioned at the time (D0 Note 3683). If future ideas for using the P-Term functionality require the relocation of some of the Hardware And-Or Term inputs, e.g. from the upper half to the lower half, cables can be moved and COOR resource files updated accordingly. A P-Term definition can be any arbitrary logical combination (within reason) of its corresponding 128 Hardware And-Or Input Terms. The P-Term logical combinations are implemented by the L1 TFW FPGA Firmware. The logical combinations making the P-Terms is NOT dynamically programmable. These definitions can NOT be changed by COOR from Run to Run. The Trigger Board must specify to MSU the desired 2 sets of 48 P-Term definitions in advance and MSU can compile new Firmware to implement these P-Term definitions. Once the Firmware is configured into the TFW, the definition of each P-Term is frozen until the next TFW Firmware update. Numbering convention: -------------------- The P-Terms will be handled by COOR and TCC as an extension of the Hardware And-Or Term resources. The P-Terms requirements for a given L1 Specific Trigger are programmed just like the requirements placed on the Hardware And-Or Terms, using the standard And-Or Term Programming syntax between COOR and TCC. COOR and TCC need to agree on a numbering scheme. By convention the P-Terms will use the And-Or Term indices directly above the Hardware And-Or Terms (#0-255). The first set of 48 P-Terms is numbered #256-303 and forms the Lower P-Terms. Their meaning is defined as arbitrary but fixed combinations of Hardware And-Or Terms #0-127. The second set of 48 P-Terms is numbered #304-351 and forms the Upper P-Terms. Their meaning is defined as arbitrary but fixed combinations of Hardware And-Or Terms #128-255. The first set of P-Terms expected to be implemented will be combinations of "standard" L1 Cal Trig And-Or Terms #128-159, and will thus live in the upper (#304-351) subset. The P-Terms corresponding to the original motivation of Cal-Track matching will use the (not yet available) "topological" L1 Cal Trig Terms #0-32 and will thus live in the lower (#256-303) subset. The P-Terms are not limited to Specific Triggers, and the same P-Terms are also available for the programming of the 8 Exposure Groups. It is not clear that this will be a useful feature, but the L1 TFW will be ready to include P-Terms in Exposure Groups. Caution: hidden level of indirection -------- While the logical combination of Hardware And-Or Input Terms used to make a P-Term is fixed by the L1 TFW Firmware, the meaning of some And-Or Input Terms could still vary from run to run. Changing the meaning of an underlying Hardware And-Or Input Term will change the effective meaning of the P-Terms formed from it. An example using L1 Calorimeter Trigger And-Or Input Terms: At trigger download time COOR can pick any one of the 4 EM Reference Sets to implement the 5 GeV EM Trigger Tower threshold on. COOR may also pick either one of the 2 Count Comparators that is attached to each EM Ref Set to use for a given count threshold. Thus a term like CEM(1,5) could appear on any one of 8 Hardware And-Or Term inputs to the L1 TFW. Exactly which Hardware And-Or Term input carries the CEM(1,5) term can thus vary from run to run, e.g. if COOR were to load triggers and allocate resources in a different order. In the past COOR was designed to take full advantage of this flexibility. COOR was using physical resources only as needed, while dynamically and incrementally allocating and programming these resources. Now if a term like CEM(1,5) is used in the definition of a P-Term, and before any Specific Trigger may be programmed to require this P-Term, the CEM(1,5) And-Or Term must be "locked" to always appear as the Hardware And-Or Input Term Number that was used for this P-Term definition. Additional References: --------------------- L1 TFW And-Or Input Terms http://www.pa.msu.edu/hep/d0/l1/framework/andor_terms.html Original P-Term proposal D0 Note 3683, Sept 1999 http://www-d0.fnal.gov/d0pub/d0_private/3683/m_pterm.ps L1 TFW Resource Programming http://www.pa.msu.edu/hep/d0/ftp/tcc/coor/coor_to_tcc_l1fw_message_syntax.txt