////////////////////////////////////////////////////////////////////////////// // File: L1_Tcc_Monit_Data_FwGlobal.hpp // Created: 07-OCT-2001 Philippe Laurens (split away from Tcc_Monit_Data.hpp) ////////////////////////////////////////////////////////////////////////////// #ifndef __L1_Tcc_Monit_Data_FwGlobal__ #define __L1_Tcc_Monit_Data_FwGlobal__ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // array dimension parameters (used in definition or usage of some of the structures Below) #define kTcc_L1fw_Tot_CorrGlobDis 4 // Total Number of Sources of Correlated Global SpTrg Disable #define kTcc_L1fw_Tot_DeCorrGlobDis 4 // Total Number of Sources of DeCorrelated Global SpTrg Disable #define kTcc_L1fw_Tot_GatedScalers 16 // Total Number of L1 Gated Scalers (in monitoring data) #define kTcc_L2fw_Tot_HelperScalers 8 // Total Number of L2 Helper Scalers #define kTcc_L1fw_Tot_L3TransfNumber 8 // Total Number of copies of L3 Transfer Number #define kTcc_L1fw_Tot_l1Qualifier 32 // Total Number of L1 Qualifiers (2 groups of 16) #define kTcc_L1fw_Tot_L1Strobe 4 // Total Number of copies of L1 Trigger Strobe #define kTcc_L1fw_Tot_SkipNext 4 // Total Number of copies of Skip Next Crossing #define kTcc_L1fw_Tot_SkipNext_N 4 // Total Number of Skip Next N Crossing #define kTcc_L1fw_Tot_L1SpTrgOverlap 4 // Total Number of Spec Trig Overlap Diagnostics Scalers #define kTcc_L1fw_Tot_L1AoitOverlap 8 // Total Number of Andor Term Overlap Diagnostics Scalers #define kTcc_L2fw_Tot_Fpga_Fifo_L1Fired 32 // 2*16 FPGAs in L2FW receive L1 Fired Mask from L1 FW #define kTcc_L2fw_Tot_Fpga_Fifo_L1Auxiliary 16 // 1*16 FPGAs in L2FW receive L1 Auxiliary Data from L1 FW #define kTcc_L2fw_Tot_Fpga_Fifo_L2Answer 32 // 2*16 FPGAs in L2FW receive L2 Decision from L2 Global /////////////////////////////////////////////////////////////////////////////////// // Global Sources of Disable Monitoring Sub-Structure (used in definition of Monitoring Data Blocks) // This data structure is obsolete in implementation phase 6 // as this information is included in L1_Tcc_Fw_Glob_Info_Brief /////////////////////////////////////////////////////////////////////////////////// // These sources are global for all 128 Spec Triggers. // Each Specific Trigger may be programmed to obey or ignore these global sources #ifdef TCC_SUPPORT_PHASE3_MONIT_DATA struct Tcc_L1fw_Global_Disable { // SpTrg Correlated Global Disable Count // Correlated Source #0: Unused // Correlated Source #1: Unused // Correlated Source #2: Unused // Correlated Source #3: Skip Next Beam Crossing uint64 auqCorr[kTcc_L1fw_Tot_CorrGlobDis] ; // SpTrg Correlated Global Disable Count // Correlated Source #0: Unused // Correlated Source #1: Unused // Correlated Source #2: Unused // Correlated Source #3: TCC Global Disable, a.k.a COOR Pause uint64 auqDeCorr[kTcc_L1fw_Tot_DeCorrGlobDis] ; } ; #endif // TCC_SUPPORT_PHASE3_MONIT_DATA /////////////////////////////////////////////////////////////////////////////////// // Trigger Framework Global Info Monitoring Sub-Structure (used in definition of Monitoring Data Blocks) // This is implemented in Phase 6 /////////////////////////////////////////////////////////////////////////////////// // This information describes the L1 and L2 Framework in general // as opposed to individual Spec Trig, Exposure Gorups, or Geo Section. struct L1_Tcc_Fw_Glob_Info_Brief // For general use, e.g. Daq Monitor { // Global L1 Scalers captured at L1 Decision time (some are about L2 FW) // #0 : Global L1 Accept Scaler // #1 : Global L2 Accept Scaler // #2 : Global L2 Cycles Scaler // #3..14 : spare // #15 : Outstanding L1 Decisions (L1 Awaiting L2) uint32 aulL1fwScaler[kTcc_L1fw_Tot_GatedScalers] ; // Global L2 Scalers captured at L2 Decision time // #0 : Global L2 Framework Cycles Scaler // #1 : Global L2 Framework Accept Scaler // #2 : Global L2 Framework Reject Scaler // #3 : Number of Beam Crossings spent in L2 Cycles // #4 : Number of BX Spent Waiting with L2 Busies // #5 : BXs Waiting to advertize L2 answer over SCL // #6-7: spare // use ulBeamX_For_L2FwData from the L1_Tcc_Fw_BeamX_Data // to convert these scalers to rate or percentage uint32 aulL2fwScaler[kTcc_L2fw_Tot_HelperScalers] ; // Current Luminosity Block Number uint32 ulLuminosityBlockNumber ; // Byte wide bitmask with miscellaneous state flags // bit #0 : reporting wheather the L1 FW is currently paused by COOR // 0 = Running, 1 = Paused // bit #1 : reporting wheather the L2 FW is currently faking L2 answers // and bypassing the L2 Answers from L2 Global // 0 = Normal, 1 = Bypass // bit #2..7: Reserved uint8 ubGlobalFlags ; // Tot Number of Specific Triggers currently allocated by COOR uint8 ubTotAllocSpTrg ; // Tot Number of Exposure Groups currently allocated by COOR uint8 ubTotAllocExpGrp ; // Tot Number of Geographic Sections currently allocated by COOR uint8 ubTotAllocGeoSect ; // Scalers counting the number of L1 Qualifiers issued uint32 aulL1Qual[kTcc_L1fw_Tot_l1Qualifier] ; // SpTrg Correlated Global COOR Disable Count uint64 uqCoorPause ; // This is a time stamp captured when TCC was last told // to configure the Framework FPGAs // This time stamp is recorded as the number of seconds elapsed since // midnight (00:00:00), January 1, 1970, coordinated universal time, // according to TCC's system clock. // This signed integer will not reach 2^31 for centuries. int32 ilTimeStampLastConfig ; // This is a time stamp captured when TCC was last told // to initialize the L1 Frameworks (and L1 Cal Trig) // cf. above quantity for format details. int32 ilTimeStampLastInit ; // Trigger Control Software (TRICS) Version // as recorded in the data block (via a SHED) // MSByte TRICS Version compound of two fields // MSNibble Major Version ID (0:15) // MSNibble Minor Version ID (0:15) // LSByte TRICS Revision ID // The Revision ID is typically expressed as // an uppercase letter (0=A, 1=B,... 25=Z) uint16 uwTricsVersion ; // Global Flags (but not yet implemented, currently filled with 0xcafe) // as recorded in the data block (via a SHED) uint16 uwDataBlockFlags ; // Reserved uint32 ulReserved1 ; uint32 ulReserved2 ; uint32 ulReserved3 ; } ; ////////////////////////////////////////////////////////////////////////////// struct L1_Tcc_Fw_Glob_Info_Full // For the Trigger Expert { // Global L1 Scalers captured at L1 Decision time (some are about L2 FW) // #0 : Global L1 Accept Scaler // #1 : Global L2 Accept Scaler // #2 : Global L2 Cycles Scaler // #3..14 : spare // #15 : Outstanding L1 Decisions (L1 Awaiting L2) uint32 aulL1fwScaler[kTcc_L1fw_Tot_GatedScalers] ; // Global L2 Scalers captured at L2 Decision time // #0 : Global L2 Framework Cycles Scaler // #1 : Global L2 Framework Accept Scaler // #2 : Global L2 Framework Reject Scaler // #3 : Number of Beam Crossings spent in L2 Cycles // #4 : BXs Waiting to advertize L2 answer over SCL // #5 : Number of BX Spent Waiting with L2 Busies // #6-7 : spare // use ulBeamX_For_L2FwData from the L1_Tcc_Fw_BeamX_Data // to convert these scalers to rate or percentage uint32 aulL2fwScaler[kTcc_L2fw_Tot_HelperScalers] ; // Current Luminosity Block Number uint32 ulLuminosityBlockNumber ; // Byte wide bitmask with miscellaneous state flags // bit #0 : reporting wheather the L1 FW is currently paused by COOR // 0 = Running, 1 = Paused // bit #1 : reporting wheather the L2 FW is currently faking L2 answers // and bypassing the L2 Answers from L2 Global // 0 = Normal, 1 = Bypass // bit #2..7: Reserved uint8 ubGlobalFlags ; // Tot Number of Specific Triggers currently allocated by COOR uint8 ubTotAllocSpTrg ; // Tot Number of Exposure Groups currently allocated by COOR uint8 ubTotAllocExpGrp ; // Tot Number of Geographic Sections currently allocated by COOR uint8 ubTotAllocGeoSect ; // L3 Transfer Number as seen on SCL and by L3 ETG (only 16 bits) // This number increments with L2 Accepts, but is only 16 bits long // There are muliple copies of this number as each Fpga generates 4 bits // [0..3] are used for Geo Sect seeing L1 Qualifiers 0..15 // [4..7] are used for Geo Sect seeing L1 Qualifiers 16..31 uint16 uwL3TransferNumber[kTcc_L1fw_Tot_L3TransfNumber] ; // Scalers counting the number of L1 Qualifiers issued uint32 aulL1Qual[kTcc_L1fw_Tot_l1Qualifier] ; // Scalers counting the number of L1 Trigger Strobe uint32 aulL1Strobe[kTcc_L1fw_Tot_L1Strobe] ; // Scalers counting the number of Skip Next Crossing uint32 aulSkipNext[kTcc_L1fw_Tot_SkipNext] ; // Scalers counting the number of Skip Next N Crossing uint32 aulSkipNext_N[kTcc_L1fw_Tot_SkipNext_N] ; // Scalers counting the number of Spec Trig Fired Overlap uint32 aulL1SpTrgOverlap[kTcc_L1fw_Tot_L1SpTrgOverlap] ; // Correlated SpTrg Global Disable Count // Correlated Source #0: Unused // Correlated Source #1: Unused // Correlated Source #2: Unused // Correlated Source #3: Skip Next Beam Crossing uint64 auqCorrGlobDis[kTcc_L1fw_Tot_CorrGlobDis] ; // SpTrg Correlated Global Disable Count // Correlated Source #0: Unused // Correlated Source #1: Unused // Correlated Source #2: Unused // Correlated Source #3: TCC Global Disable, a.k.a COOR Pause uint64 auqDeCorrGlobDis[kTcc_L1fw_Tot_DeCorrGlobDis] ; // List of Geographic Sections in the L2 Data Path // - bit #n of uqGeoSectL2DataPath_m_p is set to 1 // when the corresponding Geo Sect (#m+n) // must be sent an L1 Accept for every L1 Trigger to guarantee // that the L2 PreProcessors will always receive their input data uint64 uqGeoSectL2DataPath_0_63 ; // LSB is Geo Sect #0 uint64 uqGeoSectL2DataPath_64_127 ; // MSB is Geo Sect #127 // Current Fifo Depth used by the L2 FW to hold the L1 SpTrg Fired Mask // after the L1 Trigger Framework has issued an L1 Accept // and until the L2 Trigger Framework issues the corresponding L2 Decision uint8 aubFifoDepthL1Fired[kTcc_L2fw_Tot_Fpga_Fifo_L1Fired] ; // Current Fifo Depth used by the L2 FW to hold the L1 Auxiliary Data // after the L1 Trigger Framework has issued an L1 Accept // and until the L2 Trigger Framework issues the corresponding L2 Decision uint8 aubFifoDepthL1Auxiliary[kTcc_L2fw_Tot_Fpga_Fifo_L1Auxiliary] ; // Current Fifo Depth used by the L2 FW to hold the L2 Answer // after the L2 Global has sent its mask of Spec Triger Accepted // and until the L2 FW starts processing the corresponding L2 Cycle uint8 aubFifoDepthL2Answer[kTcc_L2fw_Tot_Fpga_Fifo_L2Answer] ; // This is a time stamp captured when TCC was last told // to configure the Framework FPGAs // This time stamp is recorded as the number of seconds elapsed since // midnight (00:00:00), January 1, 1970, coordinated universal time, // according to TCC's system clock. // This signed integer will not reach 2^31 for centuries. int32 ilTimeStampLastConfig ; // This is a time stamp captured when TCC was last told // to initialize the L1 Frameworks (and L1 Cal Trig) // cf. above quantity for format details. int32 ilTimeStampLastInit ; // Trigger Control Software (TRICS) Version // as recorded in the data block (via a SHED) // MSByte TRICS Version compound of two fields // MSNibble Major Version ID (0:15) // MSNibble Minor Version ID (0:15) // LSByte TRICS Revision ID // The Revision ID is typically expressed as // an uppercase letter (0=A, 1=B,... 25=Z) uint16 uwTricsVersion ; // Global Flags (but not yet implemented, currently filled with 0xcafe) // as recorded in the data block (via a SHED) uint16 uwDataBlockFlags ; // Reserved uint32 ulReserved1 ; uint32 ulReserved2 ; uint32 ulReserved3 ; } ; // parameters to use as an index with the auq*Corr fields of the Tcc_L1fw_Global_Disable data structure // use the same parameters as an index with the auq*CorrGlobDis fields of L1_Tcc_Fw_Glob_Info_Full #define kTcc_L1fw_CorrGlobDisable_SkipNext 3 //Skip Next Beam Crossing #define kTcc_L1fw_DeCorrGlobDisable_CoorTCC 3 //TCC Global Disable, a.k.a COOR Pause // parameters to use as an index with the aulL1fwScaler field of L1_Tcc_Fw_Glob_Info_Brief and L1_Tcc_Fw_Glob_Info_Full #define kTcc_L1fwScaler_L1Accept 0 // Global L1 Accept Scaler #define kTcc_L1fwScaler_L2Accept 1 // Global L2 Accept Scaler #define kTcc_L1fwScaler_L2Cycle 2 // Global L2 Cycles Scaler // 3..14 // spare #define kTcc_L1fwScaler_L1AL2 15 // Outstanding L1 Decisions (L1 Awaiting L2) // parameters to use as an index with the aulL2fwScaler field of L1_Tcc_Fw_Glob_Info_Brief // Note that these scalers should all be interpreted using the L2FW beam crossing snapshot, // (available as ulBeamX_For_L2FwData in the L1_Tcc_Fw_BeamX_Data data structure) // instead of the L1FW Beam Crossing snapshot, as the data is not captured at the same time. // To the extent that events are flowing through the system, the same event that was captured // by the L1FW for a monitoring block is captured by the L2FW, thus later, // and moreover after an unpredictable amount of time. #define kTcc_L2fwScaler_L2Cycle 0 // Global L2 Framework Cycles Scaler #define kTcc_L2fwScaler_L2Accept 1 // Global L2 Framework Accept Scaler #define kTcc_L2fwScaler_L2Reject 2 // Global L2 Framework Reject Scaler #define kTcc_L2fwScaler_BxInL2Cycles 3 // Number of Beam Crossings spent in L2 Cycles #define kTcc_L2fwScaler_BxWaitingAnswerDelay 4 // BXs Waiting to advertize L2 answer over SCL #define kTcc_L2fwScaler_BxWaitingWithL2Busy 5 // Number of BX Spent Waiting with L2 Busies // 6 // spare // parameters to use as a mask to exctrace individual bits from the ubGlobalFlags field // of L1_Tcc_Fw_Glob_Info_Brief and L1_Tcc_Fw_Glob_Info_Full #define kTcc_GlobalFlag_L1fwCoorPause 0x01 // bit shows if COOR has L1FW paused #define kTcc_GlobalFlag_L2fwBypassMode 0x02 // bit shows if L2FW bypass L2 Global // parameters to use as an index with the aulL1QualScaler field of L1_Tcc_Fw_Glob_Info_Brief // and L1_Tcc_Fw_Glob_Info_Full // the l1 Qualifiers are not yet fully assigned //#define kTcc_L1fwQualifier_CaptureMonitData_1 0 // Capture Monitoring Data Flag //#define kTcc_L1fwQualifier_CaptureMonitData_2 16 // Capture Monitoring Data Flag ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// #endif // __L1_Tcc_Monit_Data_FwGlobal__