!------------------------------------------------------------------------------ ! This file type holds Trigger Tower Info and Control Values for one, several, ! or typically the whole set of L1 Calorimeter Trigger Towers. ! This information includes the DAC values needed to achieve the nominal Zero ! Input Energy Response out of the ADCs (i.e. the Pedestal Control DAC Values). ! This information includes the Prom Lookup Coefficients needed to describe ! the content of the Output Et Energy Lookup Proms. ! Comments start with an exclamation mark ("!") anywhere on a line. ! See end of file for more syntax information. !------------------------------------------------------------------------------ ! Revision: 09-May-2006 ! This file is a template ! and a list of the syntax rules for Trigger Tower Info Files !-------------------------------------------------------------------- ! Define some cosmetic constants to make the rest easier to read ! Trigger Tower Channel Type $TT_EM_Channel= 0 $TT_HD_Channel= 1 ! Trigger Tower Eta Sign $TT_Eta_Pos= 0 $TT_Eta_Neg= 1 !--------------------------- ! Define Pedestal DAC Values !--------------------------- TT_Channel: $TT_EM_Channel ! use a cosmetic constant to specify channel type TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 TT_Phi: 1 Pedestal_DAC: 12 TT_Eta_Magn: 1 TT_Phi: 2 Pedestal_DAC: 14 !--------------------------------- ! Define Relative Alignment Delay !--------------------------------- TT_Channel: $TT_EM_Channel ! use a cosmetic constant to specify channel type TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 2 TT_Phi: 1 Alignment_Delay: 5 TT_Phi: 2 Alignment_Delay: 6 !--------------------------------------------------------- ! Define Zero Energy Repsonse in and out of the Et Lookup ! (typically constant for all TTs) !--------------------------------------------------------- TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos !note: from-to values order is flexible:

= TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 Zero_Energy_Adc_E: 50 ! Zero Energy Response for ADC and Filtered E (i.e. input of lookup) Zero_Energy_Output_Et: 8 ! Zero Energy Response of Ouput Et (i.e. output of lookup) !---------------------------- ! Define PROM Lookup Slopes !---------------------------- TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos !note: from-to values order is flexible:

= TT_Phi: 1 To_TT_Phi: 32 TT_Eta_Magn: 1 Lookup_Slope: 1.0 TT_Eta_Magn: 2 Lookup_Slope: 0.8 ! - - - - - - - - - - - - - - - ! note: floating point numbers ! - - - - - - - - - - - - - - - TT_Eta_Sign: $TT_Eta_Neg TT_Eta_Magn: 1 TT_Phi: 1 Lookup_Slope: 0.0980 !these are all equivalent representations Lookup_Slope: .0980 Lookup_Slope: .98e-1 Lookup_Slope: 0.98e-1 Lookup_Slope: 9.8e-2 Lookup_Slope: 98e-3 Lookup_Slope: 98.e-3 Lookup_Slope: 98.0e-3 Lookup_Slope: 0 !these are all equivalent representations Lookup_Slope: 0x00 !floating point numbers can be entered as integers Lookup_Slope: 0b0 Lookup_Slope: 0. Lookup_Slope: 0.0 Lookup_Slope: 0e0 Lookup_Slope: 0.e0 Lookup_Slope: 0.e+0 Lookup_Slope: 0.e-0 Lookup_Slope: 1 !these are all equivalent representations Lookup_Slope: 0x1 Lookup_Slope: 0b1 Lookup_Slope: 1. Lookup_Slope: 1e0 Lookup_Slope: 1E0 Lookup_Slope: 1.e0 Lookup_Slope: 1.0e0 Lookup_Slope: .1e1 Lookup_Slope: 0.1e1 Lookup_Slope: 0.1e+1 Lookup_Slope: 10e-1 Lookup_Slope: 10.e-1 Lookup_Slope: 10.0e-1 !--------------------------------- ! Define Raw ADC Simulated data !--------------------------------- TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 TT_Phi: 1 Tick: 1 SubTick: 0 RawAdc_Simu: 50 SubTick: 1 RawAdc_Simu: 50 SubTick: 2 RawAdc_Simu: 50 SubTick: 3 RawAdc_Simu: 50 Tick: 2 SubTick: 0 RawAdc_Simu: 50 SubTick: 1 RawAdc_Simu: 50 SubTick: 2 RawAdc_Simu: 100 SubTick: 3 RawAdc_Simu: 50 ! ... Tick: 159 SubTick: 0 RawAdc_Simu: 50 SubTick: 1 RawAdc_Simu: 100 SubTick: 2 RawAdc_Simu: 100 SubTick: 3 RawAdc_Simu: 50 TT_Phi: 2 Tick: 1 SubTick: 0 RawAdc_Simu: 50 SubTick: 1 RawAdc_Simu: 50 SubTick: 2 RawAdc_Simu: 50 SubTick: 3 RawAdc_Simu: 50 TT_Channel: $TT_HD_Channel ! paint the whole space with zero energy response TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 Tick: 1 To_Tick: 159 SubTick: 0 To_SubTick: 3 RawAdc_Simu: 50 ! come back and overwrite a few values TT_Eta_Magn: 1 TT_Phi: 1 Tick: 57 SubTick: 0 RawAdc_Simu: 100 !--------------------------------- ! Define Output Et Simulated data !--------------------------------- TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 TT_Phi: 1 Tick: 1 AdfOut_Simu: 8 Tick: 2 AdfOut_Simu: 45 ! ... Tick: 159 AdfOut_Simu: 8 TT_Phi: 2 Tick: 1 To_Tick: 159 AdfOut_Simu: 8 Tick: 57 AdfOut_Simu: 100 TT_Channel: $TT_HD_Channel ! paint the whole space with zero energy response TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 Tick: 1 To_Tick: 159 AdfOut_Simu: 8 ! come back and overwrite a few values TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 TT_Phi: 1 Tick: 57 AdfOut_Simu: 100 TT_Eta_Magn: 2 TT_Phi: 5 Tick: 34 AdfOut_Simu: 100 !--------------------------------- ! Control ADF Raw ADC Multiplexer ! ! The mode specified gets translated into the programming of bit 12 of the ! "Per TT Register 2". ! Setting this value does not modify any of the other bits in this register. !--------------------------------- $RawAdc_MuxMode_BlsAligned= 0 ! define cosmetic constants $RawAdc_MuxMode_SimuTurn= 1 ! to describe the control values TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 RawAdc_MuxMode: $RawAdc_MuxMode_BlsAligned !--------------------------------- ! Control ADF Raw ADC Memory ! ! The mode specified gets *translated* into the programming of bit 12 of the ! "Per TT Register 2" and bits 0:3 of "Global Register 0". !--------------------------------- $RawAdc_MemMode_CaptureMonitor= 0 ! define cosmetic constants ! If the corresponding Address Generator (shared FPGA-wide) was not already setup that way ! Stop Address Generator ! Write 0x000E into Glb_Reg 0 (i.e. Free Run and Follow SCLD and Write Enable) ! Clear bit #14 of TT_Reg 2 (i.e. Follow Global Write Enable from Addr Generator) ! Start Address Generator $RawAdc_MemMode_CaptureAtThresh= 1 ! If the corresponding Address Generator (shared FPGA-wide) was not already setup that way ! Stop Address Generator ! Write 0x000A into Glb_Reg 0 (i.e. Free Run and Write Enable) ! Set bit #14 of TT_Reg 2 (i.e. Stop Write at End of Turn passing Raw ADC Threshold) ! Start Address Generator $RawAdc_MemMode_CaptureImmediate= 2 ! If the corresponding Address Generator (shared FPGA-wide) was not already setup that way ! Stop Address Generator ! Write 0x0008 into Glb_Reg 0 (i.e. Write Enable) ! Clear bit #14 of TT_Reg 2 (i.e. Follow Global Write Enable from Addr Generator) ! Start Address Generator $RawAdc_MemMode_PlaySimuTurn= 3 ! If the corresponding Address Generator (shared FPGA-wide) was not already setup that way ! Stop Address Generator ! Write 0x0002 into Glb_Reg 0 (i.e. Free Run) ! Clear bit #14 of TT_Reg 2 (i.e. Follow Global Write Enable from Addr Generator) ! Start Address Generator TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 RawAdc_MemMode: $RawAdc_MemMode_CaptureAtThresh !--------------------------------- ! Define ADF Raw ADC Threshold ! ! The value specified gets programmed in the lower 8 bits of the ! "Per TT Register 2". ! Setting this value does not modify the other bits control by this ! control register (e.g. does not modify the Raw ADC Multiplexer setting) ! As described in description_of_dp_test_fws.txt : ! > This is an 8 bit comparison on the 8 High ! > order bits of the 10 bits of raw ADC data. ! > If TCC wants to set the "Stop Writting ! > Threshold" in terms of Et it will need to ! > take a number of things into consideration. !--------------------------------- TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 RawAdc_Thresh: 55 !--------------------------------- ! Control ADF Output Et Multiplexer ! ! The mode specified gets *translated* into the programming of bits 8:10 of the ! "Per TT Register 4". ! Setting this value does not modify any of the other bits in this register. !--------------------------------- $AdfOut_MuxMode_Filtered_Always= 0 ! define cosmetic constants $AdfOut_MuxMode_Filtered_LiveX= 1 ! to describe the control values $AdfOut_MuxMode_Constant_Always= 2 $AdfOut_MuxMode_Prn_Always= 3 $AdfOut_MuxMode_Prn_LiveX= 4 $AdfOut_MuxMode_SimuTurn_Always= 5 $AdfOut_MuxMode_SimuTurn_LiveX= 6 TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 AdfOut_MuxMode: $AdfOut_MuxMode_Filtered_LiveX !--------------------------------- ! Define Output Et Constant Value used for non-live Crossings ! ! The value specified gets programmed in the lower 8 bits of the ! "Per TT Register 4". ! Setting this value does not modify the other bits control by this ! control register (e.g. does not modify the Output Multiplexer setting) !--------------------------------- TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 AdfOut_Const: 8 !--------------------------------- ! Control ADF Output Et Memory ! ! The mode specified gets *translated* into the programming of bit 12 of the ! "Per TT Register 4" and bits 0:3 of "Glb_Reg 3". !--------------------------------- $AdfOut_MemMode_CaptureMonitor= 0 ! define cosmetic constants $AdfOut_MemMode_CaptureAtThresh= 1 ! to describe the control values $AdfOut_MemMode_CaptureImmediate= 2 $AdfOut_MemMode_PlaySimuTurn= 3 TT_Channel: $TT_EM_Channel TT_Eta_Sign: $TT_Eta_Neg To_TT_Eta_Sign: $TT_Eta_Pos TT_Eta_Magn: 1 To_TT_Eta_Magn: 20 TT_Phi: 1 To_TT_Phi: 32 AdfOut_MemMode: $AdfOut_MemMode_CaptureMonitor !Call_File: /users/default/Another.Tti !------------------------------------------------------------------------------ ! 01-May-2006 ! * Recommended file extension is ".TTI" (but not required). ! ! Syntax rules: ! ! - Blank lines are ignored. ! ! - Comments start after an exclamation mark ("!") anywhere on a line. ! ! * Recognized Keywords are (with colon required) ! TT_Channel: (0= EM Channel, 1= HD Channel) ! TT_Eta_Sign: (0= Positive Eta, 1= Negative Eta) ! To_TT_Eta_Sign: (Optional specification of an upper Eta Sign in a range) ! TT_Eta_Magn: (Trg Twr Eta Magnitude in the range [1..20]) ! TT_Phi: (Trg Twr Phi in the range [1..32]) ! To_TT_Eta_Magn: (Optional specification of an upper Eta Magn in a range) ! To_TT_Phi: (Optional specification of an upper Phi in a range) ! ! Alignment_Delay: (BLS Signal Alignment Delay in the range [0..15]) ! ! Pedestal_DAC: (Pedestal DAC Value in range [0..4095]) ! ! Zero_Energy_Adc_E: (Zero Energy Response for the ADC output,) ! (and the Filtered E input to the Et Lookup) ! (specified as an integer in units of output counts.) ! ! Zero_Energy_Output_Et: (Zero Energy Response for the Output Et Energy) ! (as sent to the TAB cards) ! (specified as an integer in units of output counts.) ! ! Lookup_Slope: (PROM Transfer Slope, specified as) ! (a floating point number in the range [0..1]) ! ! Tick: (Beam Crossing Tick Number [1..159]) ! To_Tick: (Optional specification of an upper Tick Number[1..159]) ! ! SubTick: (SubTick i.e. Raw ADC oversample [0..3]) ! To_SubTick: (Optional specification of an upper SubTick Number [0..3]) ! ! ! RawAdc_MuxMode: (Raw ADC Multiplexer Output Selector Code [0..1]) ! 0 = Input Select BLS Aligned Data ! 1 = Input Select Simulated Turn Data ! ! RawAdc_MemMode: (Raw ADC Memory Mode Code [0..3]) ! 0 = Memory Captures a Turn of Monitoring Data ! 1 = Memory Captures a Turn when Raw ADC above Threshold ! 2 = Memory Captures a Turn Immediately ! 3 = Memory Plays whole Turns of fixed Simulated Data ! ! RawAdc_Thresh: (Threshold value [0..255] used to capture energy deposit) ! (in some settings of RawAdc_MemMode or AdfOut_MemMode) ! (The value is directly programmed into the ADF card,) ! (without trying to adjust for Zero_Energy_Adc_E) ! ! RawAdc_Simu: (Raw ADC E value to be used for simulation [0..1023]) ! (Each Oversampled Raw ADC in a simulated turn can be set) ! (by specifying a single, or a range of, Tick and SubTick) ! ! ! AdfOut_MuxMode: (ADF Output Et Multiplexer Output Selector Code [0..6]) ! 0 = Output Select Filtered Always ! 1 = Output Select Filtered LiveX ! 2 = Output Select Constant Always ! 3 = Output Select Prn Always ! 4 = Output Select Prn LiveX ! 5 = Output Select Simu Turn Always ! 6 = Output Select Simu Turn LiveX ! ! AdfOut_MemMode: (ADF Output Et Memory Mode Code [0..3]) ! 0 = Memory Captures a Turn of Monitoring Data ! 1 = Memory Captures a Turn when Raw ADC above Threshold ! 2 = Memory Captures a Turn Immediately ! 3 = Memory Plays whole Turns of fixed Simulated Data ! ! AdfOut_Const: (Constant [0..255] used for non Live Crossings) ! (with some settings of AdfOut_MuxMode) ! ! AdfOut_Simu: (ADF Output Et Energy Value to be used for simulation [0..255]) ! (Each Output Et Value in a simulated turn can be set) ! (by specifying a single, or a range of, Tick) ! ! ! Call_File: (Recursive call to another TTI file) ! ! - Keywords are NOT case-sensitive. ! ! - Each Keyword must be followed by one and only one positive integer Value ! (with the exception of the Called_File Keyword). ! ! - One or more Keyword/Value pair may appear on a same line. ! ! - a Keyword and its matching Value may be separated by any number of spaces, ! and/or Tabs, but must appear on the same line. ! ! - Successive Keyword/Value pairs may be separated by any number of spaces, ! Tabs and/or Carriage_Returns (blank lines), or comments. ! ! * Pedestal Control DAC Value(s) will be programmed into the hardware ! when a "Pedestal_DAC:" Keyword is encountered. ! ! * Alignement Delay Value(s) will be programmed into the hardware ! when a "Alignment_Delay:" Keyword is encountered. ! ! * All Trigger Tower Coordinate Keywords ( "TT_Channel:", "TT_Eta_Sign:", ! "TT_Eta_Magn:", "TT_Phi:", and optionally "To_TT_Eta_Sign:", ! "To_TT_Eta_Magn:", and "To_TT_Phi:") must have been specified before a ! "Pedestal_DAC:", or "Alignment_Delay:", or "Lookup_Slope:", or ! "RawAdc_MuxMode:", or "RawAdc_MemMode:", or "RawAdc_Thresh:", or ! "RawAdc_Simu:", or "AdfOut_MuxMode:", or "AdfOut_MemMode:", or ! "AdfOut_Const:", or "AdfOut_Simu:" Keyword may be specified. ! ! * All Trigger Tower Coordinate Keywords ( "TT_Channel:", "TT_Eta_Sign:", ! "TT_Eta_Magn:", "TT_Phi:", and optionally "To_TT_Eta_Sign:", ! "To_TT_Eta_Magn:", and "To_TT_Phi:") must have been specified before ! a "Pedestal_DAC:", or "Alignment_Delay:", or "Lookup_Slope:" ! Keyword may be specified. ! ! * A "TT_Eta_Magn:" (resp. "TT_Eta_Sign:" or "TT_Phi:") Keyword must have ! been specified before a "To_TT_Eta_Magn:" (resp. "To_TT_Eta_Sign:" or ! "To_TT_Phi:") may be specified. ! ! * Specifyinfg a new "TT_Eta_Magn:" (resp. "TT_Eta_Sign:" or "TT_Phi:") Keyword ! invalidates any previously defined "To_TT_Eta_Magn:" (resp. "To_TT_Eta_Sign:" ! or "To_TT_Phi:"). ! ! * The syntax parsing is tolerant of reversed range boundaries, namely where ! "To_TT_Eta_Magn:" (resp. "TT_Eta_Sign:" or "To_TT_Phi:") is smaller than ! "TT_Eta_Magn:" (resp. "To_TT_Eta_Sign:" or "TT_Phi:") ! ! * A pair of "TT_Eta_Magn:" and "To_TT_Eta_Magn:" (resp. "TT_Eta_Sign:" and ! "To_TT_Eta_Sign:" or "TT_Phi:" and "To_TT_Phi:") values specify a Range ! of consecutive Trigger Tower Eta Magniture (resp. Trigger Tower Eta Sign ! or Trigger Tower Phi) that will receive the Control Value specified ! with the next "Pedestal_DAC:" (or other) Keyword. ! ! * Keyword/Values for Trigger Tower Coordinates specified for a previous ! Control Value are still active for subsequent Control Values until they ! are explicitely overwritten. ! * Exception: A new "TT_Eta_Magn:" (resp. "TT_Eta_Sign:", or "TT_Phi:") ! Keyword must be specified after a "To_TT_Eta_Magn:" (resp. ! "To_TT_Eta_Sign:", or "To_TT_Phi:") before another "To_TT_Eta_Magn:" ! (resp. "To_TT_Eta_Sign:", or "To_TT_Phi:") Keyword may be specified. ! ! * A "Tick:" value or range of values must also have been specified before ! a "AdfOut_Simu:" Keyword may be specified. ! ! * A "Tick:" and a "SubTick:" value or range of values must have been specified ! before a "RawAdc_Simu:" Keyword may be specified. ! ! * A "Tick:" (resp. "SubTick:") Keyword must have been specified before ! a "To_Tick:" (resp. "To_SubTick:") may be specified. ! ! * Specifyinfg a new "Tick:" (resp. "SubTick:") Keyword invalidates any ! previously defined "To_Tick:" (resp. "To_SubTick:"). ! ! * The syntax parsing is tolerant of reversed range boundaries, namely where ! "To_Tick:" (resp. "To_SubTick:") is smaller than "Tick:" (resp. "SubTick:") ! ! * A pair of "Tick:" and "To_Tick:" (resp. "SubTick:" and "To_SubTick:") values ! specify a Range of consecutive Tick Values (resp. SubTick Values) ! that will receive the Control Value specified with the next "AdfOut_Simu:" ! (or other) Keyword. ! ! * Keyword/Values for Tick or SubTick Coordinates specified for a previous ! Control Value are still active for subsequent Control Values until they ! are explicitely overwritten. ! * Exception: A new "Tick:" (resp. "SubTick:") Keyword must be specified ! after a "To_Tick:" (resp. "To_SubTick:") before another "To_Tick:" ! (resp. "To_SubTick:") Keyword may be specified. ! ! - The "MilliSecond_Sleep:" Keyword causes the execution of the command file ! to be suspended for the number of milliseconds specified in the associated ! value (integer values only). ! ! - The "Call_File" Keyword causes a recursive call to read the specified file. ! ! - Full local Keyword/Value context present before the "Call_File" Keyword ! is still valid after. i.e. Context changes made in the Called file are ! NOT propagated back to the Calling file. ! ! - The syntax rules within a called file are the same as described here. ! The local Keyword/Value context present before the Call_File Keyword ! is imported into the Called File. i.e. You can define some Keyword Values ! in the Calling File which will be valid inside the Called File. !------------------------------------------------------------------------------ ! - Symbol usage in command files: ! ! Symbols may be defined and used in command files. ! A symbol name must start with a dollar sign "$". ! ! A symbol is defined by giving it a numeric value. ! A symbol is defined using a Keyword/Value syntax where the Keyword is ! the symbol's name, starting with its own dollar sign but with an additional ! equal character appended to the end of the symbol name, while the value ! is the desired symbol value. ! e.g. To define a symbol named "$Slot_AONM" and give it a value "5" ! enter the following: ! $Slot_AONM= 5 ! The equal sign "=" is required and must appear directly after the last ! character of the symbol name, with no space or tab in-between. ! Any number of spaces, or tabs may appear between the symbol definition and ! its value, but the symbol and its value must appear on the same line. ! Previously defined symbols can be re-defined to change their value. ! Previously defined symbols cannot be un-defined. ! ! A symbol may be used anywhere a value is required, i.e. in any Keyword/Value ! pair and the symbol value will be substituted. e.g. ! Slot: $Slot_AONM ! A symbol must have been defined before it can be used. ! There are no predefined symbols. ! Symbols are NOT case sensitive. ! Symbol names may include any alpha numeric characters (e.g. _[(}./$< ), ! (but no space, tabs, or end of line). For clarity one should avoid ! using embedded quotation marks, equal signs, colon. ! A symbol value may be used to define another new symbol. ! ! All symbols defined before a "Call_File" Keyword are propagated into ! the Called File. i.e. You can define symbols in the Calling File ! and use those symbols (or modify them) inside the Called File. ! Symbols created or modified inside a Called File are NOT propagated ! back to the Calling file. !------------------------------------------------------------------------------