- Timestamp:
- 05/16/11 16:09:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/HeadersFTM.h
r10708 r10719 22 22 23 23 // FTM internal states 24 kFtmIdle = 1, 25 kFtmConfig = 2, 26 kFtmRunning = 3, 24 kFtmIdle = 1, ///< Trigger output disabled, configuration possible 25 kFtmConfig = 2, ///< FTM and FTUs are being reconfigured 26 kFtmRunning = 3, ///< Trigger output enabled, configuration ignored 27 27 kFtmCalib = 4, 28 28 }; … … 34 34 kCmdRead = 0x0001, ///< Request data 35 35 kCmdWrite = 0x0002, ///< Send data 36 kCmdStartRun = 0x0004, ///< Start the trigger37 kCmdStopRun = 0x0008, ///< Stop the trigger36 kCmdStartRun = 0x0004, ///< Enable the trigger output 37 kCmdStopRun = 0x0008, ///< Disable the trigger output 38 38 kCmdPing = 0x0010, ///< Ping all FTUs (get FTU list) 39 kCmdCrateReset = 0x0020, 39 kCmdCrateReset = 0x0020, ///< Reboot (no power cycle) all FTUs and FADs of one crate 40 40 kCmdDisableReports = 0x0040, ///< Disable transmission of rate-reports (dynamic data) 41 41 kCmdToggleLed = 0xc000, … … 47 47 48 48 // second word for StartRun 49 kStartRun = 0x0001, 50 kTakeNevents = 0x0002, 49 kStartRun = 0x0001, ///< ...until kCmdStopRun 50 kTakeNevents = 0x0002, ///< ...fixed number of events 51 51 }; 52 52 … … 73 73 struct Header 74 74 { 75 uint16_t fDelimiter; /// Start delimiter76 uint16_t fType; /// Type of the data to be received after the header77 uint16_t fDataSize; /// Size in words to be received after the header78 uint16_t fState; /// State of the FTMstate machine79 uint64_t fBoardId; 80 uint16_t fFirmwareId; 81 uint32_t fTriggerCounter; 82 uint64_t fTimeStamp; 75 uint16_t fDelimiter; ///< Start delimiter 76 uint16_t fType; ///< Type of the data to be received after the header 77 uint16_t fDataSize; ///< Size in words to be received after the header (incl end delim.) 78 uint16_t fState; ///< State of the FTM central state machine 79 uint64_t fBoardId; ///< FPGA device DNA (unique chip id) 80 uint16_t fFirmwareId; ///< Version number 81 uint32_t fTriggerCounter; ///< FTM internal counter of all trigger decision independant of trigger-line enable/disable (reset: start/stop run) 82 uint64_t fTimeStamp; ///< Internal counter (micro-seconds, reset: start/stop run) 83 83 84 84 Header() { init(*this); } … … 135 135 struct StaticDataBoard 136 136 { 137 uint16_t fEnable[4]; // 4x9bits138 uint16_t fDAC[5]; // 4x12bit + 1xN/40139 uint16_t fPrescaling; 137 uint16_t fEnable[4]; /// enable of 4x9 pixels coded as 4x9bits 138 uint16_t fDAC[5]; /// 0-3 (A-D) Threshold of patches, 4 (H) Threshold for N out of 4 (12 bit each) 139 uint16_t fPrescaling; /// Internal readout time of FTUs for trigger counter 140 140 141 141 StaticDataBoard() { init(*this); } … … 149 149 enum Limits 150 150 { 151 kMaxMultiplicity = 40, ///< M aximum forrequired trigger multiplicity152 kMaxWindow = 0xf, 153 kMaxDeadTime = 0xffff, 154 kMaxDelayTimeMarker = 0x3ff, 155 kMaxDelayTrigger = 0x3ff, 156 kMaxTriggerInterval = 0x3ff, 151 kMaxMultiplicity = 40, ///< Minimum required trigger multiplicity 152 kMaxWindow = 0xf, ///< (4ns * x + 8ns) At least N (multiplicity) rising edges (trigger signal) within this window 153 kMaxDeadTime = 0xffff, ///< (4ns * x + 8ns) 154 kMaxDelayTimeMarker = 0x3ff, ///< (4ns * x + 8ns) 155 kMaxDelayTrigger = 0x3ff, ///< (4ns * x + 8ns) 156 kMaxTriggerInterval = 0x3ff, ///< 157 157 kMaxSequence = 0x1f, 158 kMaxDAC = 0xfff, 158 159 kMaskSettings = 0xf, 159 160 kMaskLEDs = 0xf, … … 162 163 enum GeneralSettings 163 164 { 164 kTrigger = 0x80, 165 kPedestal = 0x40, 166 kLPext = 0x20, 167 kLPint = 0x10, 168 kExt2 = 0x08, 169 kExt1 = 0x04, 170 kVeto = 0x02, 171 kTimeMarker = 0x01, 165 kTrigger = 0x80, ///< Physics trigger decision (PhysicTrigger) 166 kPedestal = 0x40, ///< Pedestal trigger (artifical) 167 kLPext = 0x20, ///< Enable trigger decision after light pulse (CalibrationTrigger, LP1) 168 kLPint = 0x10, ///< Enable artificial trigger after light pulse (LP2) 169 kExt2 = 0x08, ///< External trigger signal 2 170 kExt1 = 0x04, ///< External trigger signal 1 171 kVeto = 0x02, ///< Veto trigger decision / artifical triggers 172 // -===> ClockCond 173 kTimeMarker = 0x01, ///< Select clock conditioner frequency (1) / time marker (0) as output 172 174 }; 173 175 174 uint16_t fGeneralSettings; // only 8 bit used176 uint16_t fGeneralSettings; // Enable for different trigger types / select for TIM/ClockConditioner output (only 8 bit used) 175 177 uint16_t fStatusLEDs; // only 8 bit used 176 uint16_t fTriggerInterval; // only 10 bit used177 uint16_t fTriggerSequence; // 3x5bit178 uint16_t fTriggerInterval; // [ms] Interval between two artificial triggers (no matter which type) minimum 1ms, 10 bit 179 uint16_t fTriggerSequence; // Ratio between trigger types send as artificial trigger (in this order) 3x5bit 178 180 uint64_t fDummy0; 179 uint16_t fMultiplicityPhysics; 180 uint16_t fMultiplicityCalib; 181 uint16_t fDelayTrigger; 182 uint16_t fDelayTimeMarker; 183 uint16_t fDeadTime; 184 uint32_t fClockConditioner[8]; // R0, R1, R8, R9, R11, R13, R14, R15185 uint16_t fWindowPhysics; 186 uint16_t fWindowCalib; 181 uint16_t fMultiplicityPhysics; /// Required trigger multiplicity for physcis triggers (0-40) 182 uint16_t fMultiplicityCalib; /// Required trigger multiplicity calibration (LPext) triggers (0-40) 183 uint16_t fDelayTrigger; /// (4ns * x + 8ns) FTM internal programmable delay between trigger decision and output 184 uint16_t fDelayTimeMarker; /// (4ns * x + 8ns) FTM internal programmable delay between trigger descision and time marker output 185 uint16_t fDeadTime; /// (4ns * x + 8ns) FTM internal programmable dead time after trigger decision 186 uint32_t fClockConditioner[8]; // R0, R1, R8, R9, R11, R13, R14, R15 187 uint16_t fWindowPhysics; /// (4ns * x + 8ns) At least N (multiplicity) rising edges (trigger signal) within this window 188 uint16_t fWindowCalib; /// (4ns * x + 8ns) At least N (multiplicity) rising edges (trigger signal) within this window 187 189 uint16_t fDummy1; 188 190 189 StaticDataBoard fBoard[4][10]; // 4 crates * 10 boards 190 191 uint16_t fActiveFTU[4]; // 4 crates * 10 bits 191 StaticDataBoard fBoard[4][10]; // 4 crates * 10 boards (Crate0/FTU0 == readout time of FTUs) 192 193 uint16_t fActiveFTU[4]; // 4 crates * 10 bits (FTU enable) 192 194 193 195 StaticData() { init(*this); }
Note:
See TracChangeset
for help on using the changeset viewer.