Changeset 10719 for trunk


Ignore:
Timestamp:
05/16/11 16:09:54 (14 years ago)
Author:
tbretz
Message:
Added some comments.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/HeadersFTM.h

    r10708 r10719  
    2222
    2323        // 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
    2727        kFtmCalib   = 4,
    2828    };
     
    3434        kCmdRead           = 0x0001, ///< Request data
    3535        kCmdWrite          = 0x0002, ///< Send data
    36         kCmdStartRun       = 0x0004, ///< Start the trigger
    37         kCmdStopRun        = 0x0008, ///< Stop the trigger
     36        kCmdStartRun       = 0x0004, ///< Enable the trigger output
     37        kCmdStopRun        = 0x0008, ///< Disable the trigger output
    3838        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
    4040        kCmdDisableReports = 0x0040, ///< Disable transmission of rate-reports (dynamic data)
    4141        kCmdToggleLed      = 0xc000,
     
    4747
    4848        // second word for StartRun
    49         kStartRun          = 0x0001,
    50         kTakeNevents       = 0x0002,
     49        kStartRun          = 0x0001, ///< ...until kCmdStopRun
     50        kTakeNevents       = 0x0002, ///< ...fixed number of events
    5151    };
    5252
     
    7373    struct Header
    7474    {
    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
    78         uint16_t fState;          /// State of the FTM state machine
    79         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)
    8383
    8484        Header() { init(*this); }
     
    135135    struct StaticDataBoard
    136136    {
    137         uint16_t fEnable[4];   // 4x9bits
    138         uint16_t fDAC[5];      // 4x12bit + 1xN/40
    139         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
    140140
    141141        StaticDataBoard() { init(*this); }
     
    149149        enum Limits
    150150        {
    151             kMaxMultiplicity    = 40,      ///< Maximum for required trigger multiplicity
    152             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,   ///<
    157157            kMaxSequence        = 0x1f,
     158            kMaxDAC             = 0xfff,
    158159            kMaskSettings       = 0xf,
    159160            kMaskLEDs           = 0xf,
     
    162163        enum GeneralSettings
    163164        {
    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
    172174        };
    173175
    174         uint16_t fGeneralSettings;         // only 8 bit used
     176        uint16_t fGeneralSettings;         // Enable for different trigger types / select for TIM/ClockConditioner output (only 8 bit used)
    175177        uint16_t fStatusLEDs;              // only 8 bit used
    176         uint16_t fTriggerInterval;         // only 10 bit used
    177         uint16_t fTriggerSequence;         // 3x5bit
     178        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
    178180        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, R15
    185         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
    187189        uint16_t fDummy1;
    188190
    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)
    192194
    193195        StaticData() { init(*this); }
Note: See TracChangeset for help on using the changeset viewer.