ALCT-2001 algorithm description. Alex Madorsky, University of Florida/Physics This document describes the basics of the ALCT-384-2001 algorithm, which is implemented in XCV600E FPGA. This description is provided only for the reference for program model writers, and does not include some information (timing, some control registers, DAQ readout description, etc.). The algorithm is pipelined. Shown below are the steps of this pipeline: 1. Pulse extenders. Pulse extenders detect the rising edge on each of the 384 input bits, and start the output pulse at this moment. The output pulse duration is 6 clocks (150 ns). This is used to allow any drifting ions created by the charged particle to reach the wires. 2. Pattern detectors The outputs of the pulse extenders are supplied to the pattern detectors. There are 64 of them – because there are 64 key wire groups for which the patterns can be found. Each pattern detector can detect the following patterns: Two programmable “collision” patterns (A and B) One fixed “accelerator” pattern The input data for the collision pattern detector are selected as shown below: n-2 n-1 n n-1 n n n n+1 n n+1 n+2 n n+1 n+2 Layer Layer Layer Layer Layer Layer 1 2 3 4 5 6 n in this diagram is the key wire group number, which this particular pattern detector is searching the patterns for. As you can see, the input bits form the pattern envelope identical to the pattern used in the ALCT-2000 design. The programming of the two programmable collision patterns A and B is implemented as a simple masking-out of the bits, which we do not want to include in the pattern. Shown below is the pseudo-language formula for pattern detection: number of layers hit for collision pattern A or (L1[n-2]& m1) | (L1[n-1]& m2) | (L1[n] & m3) (L2[n-1]& m4) | (L2[n] & m5) (L3[n] & m6) (L4[n] & m7) | (L5[n] & m9) | (L6[n] & m12) | B = + + + (L4[n+1]& m8) + (L5[n+1]& m10) | (L5[n+2]& m11) + (L6[n+1]& m13) | (L6[n+2]& m14) ; Lx in this expression means Layer x, [y] means bit y (from the layer), mz means collision pattern A or B mask bit z. The user can program different masks for collision patterns A and B. Accelerator pattern is a vertical pattern which cannot be reprogrammed. The formula for it looks like this (see “formula for collision pattern diagram” above for explanation): number of layers hit in the accelerator pattern = L1[n] + L2[n] + L3[n] + L4[n] + L5[n] + L6[n] ; Each pattern detector reports the number of the layers hit in collision and accelerator patterns minus (nph_pattern - 1) value. These outputs are called “quality of the track” (see explanation below). One collision and one accelerator pattern are reported. patb output bit shows which collision pattern (A or B) was found. There are several parameters which user can adjust that change the functionality of the pattern detector. They are described very well in the ALCT-2000 document, page 55. The names are: trig_mode nph_thresh nph_pattern drift_delay 3. Ghost Cancellation Logic (GCL) The outputs of the pattern detectors are connected to the ghost cancellation logic. This block is totally new to ALCT-2001 design, it was not present in the ALCT-2000. Tracks passing through the chamber often get registered by two or more pattern detectors, especially if the user programmed wide patterns. This way the “ghost” track(s) are reported along with the actual track. To avoid that, GCL analyzes the pattern detector’s outputs, and the ghost gets cancelled if: There is track in the neighboring key wire group This other track has better quality than the ghost This other track was detected in the same clock or up to 4 clocks before the ghost Please note that if the ghost and the actual track have the same quality, nothing is cancelled, because the algorithm does not know which track is ghost. (We are still thinking how to improve that) The cancellation is done separately for collision and accelerator patterns. 4. Best track searcher. The outputs of the GCL are connected to the best track searcher, which simply selects the track with the best quality. The algorithm for it is directly borrowed from the ALCT-2000 design. 5. Track promotion. The best collision and accelerator tracks that are found in the previous step are modified according to the following configuration variable: alct_amode Please see ALCT-2000 document page 56 for details. 6. Mask out the best track. This step just masks out the best track in the data coming from pattern detectors, so the next steps can search for the second best track. 7. Second best track search and promotion. This step repeats steps 4 and 5 for the second best track. Finally, the following parameters for each of the two best tracks are reported to the output of the board: Quality of the track Key wire group Pattern B flag (0 means pattern A was found, 1 means pattern B) Accelerator muon flag (1 means accelerator pattern was found)