////////////////////////////////////////////////////////////////////////////// // File: L1_Tcc_Monit_Data_GeoSect.hpp // Created: 07-OCT-2001 Philippe Laurens (split away from Tcc_Monit_Data.hpp) ////////////////////////////////////////////////////////////////////////////// #ifndef __L1_Tcc_Monit_Data_GeoSect__ #define __L1_Tcc_Monit_Data_GeoSect__ ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // array dimension parameters (used in definition or usage of some of the structures Below) #define kTcc_L1fw_Tot_GeoSect 128 // Total Number of Geographic Sections /////////////////////////////////////////////////////////////////////////////////// // Geographis Section Sub-Structure (used in definition of Monitoring Data Blocks) // This data structure is obsolete in implementation phase 6 // It is replaced by L1_Tcc_Fw_Geographic_Section below /////////////////////////////////////////////////////////////////////////////////// #ifdef TCC_SUPPORT_PHASE3_MONIT_DATA struct Tcc_L1fw_Geographic_Section { // Geographic Section Allocated: // Non-Zero if COOR has allocated this Geographic Section uint8 ubAllocated ; // padding to preserve 64-bit alignment uint8 ubReserved1 ; uint8 ubReserved2 ; uint8 ubReserved3 ; // L1 Busy Scaler: i.e. No buffer to store data awaiting L2 Decision uint64 uqL1Busy ; // L2 Busy Raw Scaler: i.e. No buffer to store data awaiting Transfer to L3 uint64 uqL2BusyRaw ; // L2 Busy Delay Scaler: i.e. L2 Busy while a L2 cycle is waiting on this Geo Sect uint64 uqL2BusyDelay ; // L2 Busy Cycles Scaler: i.e. Number of L2 cycles that had to wait because of this Geo Sect uint64 uqL2BusyCycles ; } ; #endif // TCC_SUPPORT_PHASE3_MONIT_DATA /////////////////////////////////////////////////////////////////////////////////// // Geographis Section Sub-Structure (used in definition of Monitoring Data Blocks) // This is the expanded definition for Phase 6 /////////////////////////////////////////////////////////////////////////////////// struct L1_Tcc_Fw_Geographic_Section { // Geographic Section Allocated: // Non-Zero if COOR has allocated this Geographic Section uint8 ubAllocated ; // Reserved to reach 16 bit boundary uint8 ubReserved ; // L1 Error Count // How many times this Geo Sect was found with its L1 Error Flag set // when starting an SCL Initialize sequence uint16 uwL1Error ; // L2 Error Count // How many times this Geo Sect was found with its L1 Error Flag set // when starting an SCL Initialize sequence uint16 uwL2Error ; // Current Geographic Section Status bitmask. // The first 9 bits (0:8) are read by TCC from the SCL Trigger Status Concentrators // as defined in http://www-ese.fnal.gov/d0trig/D0TriggerSystem.pdf // The MSB is TCC's conclusion about current Geo Sect // bit #0 : 1 = L1 Busy // bit #1 : 1 = L1 Error // bit #2 : 1 = L2 Busy // bit #3 : 1 = L2 Error // bit #4 : 1 = GS Sync Err // bit #5 : 1 = Init Ack // bit #6 : 1 = Spare 1 // bit #7 : 1 = Spare 2 // bit #8 : 1 = Cable Disconnected // bit #9:11 : Unused // bit #12 : Summary Status computed by TCC // 0 = Bad, 1 = Ok // A Geographic Section will be considered "good" if it is // one of the non-readout crates (which may not even have a status cable) // or if none of the following signals is found asserted // - L1 Error // - L2 Error // - Init Ack // - GS Sync Err // - Cable Disconnected // bit #13:14 : Unused uint16 uwStatusMask ; // L1 Accept Scaler uint32 ulL1Accept ; // L2 Accept Scaler // To compute a L2 Accept fraction, devide ulL2fwAccept by ulL2fwProcessed. // The L2 Reject fraction is the complement to 1 of the L2 Accept fraction. uint32 ulL2fwAccept ; // L1 Busy Scaler: i.e. Number of Beam Crossings while the Geographic Section // is saying it has No buffer to store data awaiting L2 Decision uint64 uqL1Busy ; // L2 Busy Raw Scaler: i.e. Number of Beam Crossings while the Geographic Section // is saying it has No buffer to store data awaiting Transfer to L3 uint64 uqL2BusyRaw ; // L2 Busy Delay Scaler: i.e. Number of Beam Crossings while the Geographic Section // is saying it is L2 Busy but ONLY while a L2 cycle is waiting on this Geo Sect uint64 uqL2BusyDelay ; // L2 Busy Cycles Scaler: i.e. Number of L2 cycles that had to wait because of this Geo Sect uint32 ulL2BusyCycles ; // Reserved uint32 ulReserved ; } ; ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // parameter to use to parse the uwStatusMask field of // the L1_Tcc_Fw_Geographic_Section structure above #define kTcc_GSect_Status_Msk_L1Busy 0x0001 #define kTcc_GSect_Status_Msk_L1Error 0x0002 #define kTcc_GSect_Status_Msk_L2Busy 0x0004 #define kTcc_GSect_Status_Msk_L2Error 0x0008 #define kTcc_GSect_Status_Msk_GS_Sync_Err 0x0010 #define kTcc_GSect_Status_Msk_Init_Ack 0x0020 #define kTcc_GSect_Status_Msk_Spare_1 0x0040 #define kTcc_GSect_Status_Msk_Spare_2 0x0080 #define kTcc_GSect_Status_Msk_Cable_Disc 0x0100 #define kTcc_GSect_Status_Msk_Summary 0x1000 #endif // __L1_Tcc_Monit_Data_GeoSect__