Changeset 11156


Ignore:
Timestamp:
06/23/11 22:11:25 (13 years ago)
Author:
tbretz
Message:
Added new bits in Status word; removed obsolete ref clock too high; added new command enable busy.
Location:
trunk/FACT++/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/HeadersFAD.cc

    r11130 r11156  
    5151                << "2:" << ((PLLLCK()&4)?"yes":"no") << " "
    5252                << "3:" << ((PLLLCK()&8)?"yes":"no") << endl;
    53     if (IsRefClockTooHigh())
    54         out << " (too high)";
     53//    if (IsRefClockTooHigh())
     54//        out << " (too high)";
    5555    if (IsRefClockTooLow())
    5656        out << " (too low)";
    5757    out << endl;
    58     out << "  Domino wave (Denable):   " << (HasDenable()?"enabled":"disabled") << endl;
    59     out << "  DRS sampling (Dwrite):   " << (HasDwrite()?"enabled":"disabled") << endl;
    60     out << "  Dig.clock manager (DCM): " << (IsDcmLocked()?"locked":"unlocked");
     58    out << "  Domino wave (Denable):     " << (HasDenable()?"enabled":"disabled") << endl;
     59    out << "  DRS sampling (Dwrite):     " << (HasDwrite()?"enabled":"disabled") << endl;
     60    out << "  Dig.clock manager (DCM):   " << (IsDcmLocked()?"locked":"unlocked");
    6161    out << " / " << (IsDcmReady()?"ready":"not ready") << endl;
    62     out << "  SPI Serial Clock (SCLK): " << (HasSpiSclk()?"enabled":"disabled") << endl;
     62    out << "  SPI Serial Clock (SCLK):   " << (HasSpiSclk()?"enabled":"disabled") << endl;
     63    out << "  Busy enabled:              " << (HasBusy()?"enabled":"disabled") << endl;
     64    out << "  Trigger line enabled:      " << (HasTriggerEnabled()?"enabled":"disabled") << endl;
     65    out << "  Continous trigger enabled: " << (HasContTriggerEnabled()?"enabled":"disabled") << endl;
     66    out << "  Data transmission socket:  " << (IsInSock17Mode()?"Socket 0":"Sockets 1-7") << endl;
    6367}
    6468
  • trunk/FACT++/src/HeadersFAD.h

    r11154 r11156  
    2525        kCmdContTriggerOff  = 0x2000,
    2626        kCmdRun             = 0x2200,  // CMD_Start/Stop
     27        kCmdBusy            = 0x2400,  //
    2728        kCmdResetTriggerId  = 0x2A00,  //
    2829        kCmdSocket          = 0x3000,  // CMD_mode_command/CMD_mode_all_sockets
     
    100101            kDenable       = 1<<11,
    101102            kDwrite        = 1<<10,
    102             kRefClkTooHigh = 1<< 9,
     103            //kRefClkTooHigh = 1<< 9,
    103104            kRefClkTooLow  = 1<< 8,
    104105            kDcmLocked     = 1<< 7,
    105106            kDcmReady      = 1<< 6,
    106107            kSpiSclk       = 1<< 5,
     108            kBusy          = 1<< 4,  // Busy enabled
     109            kTriggerLine   = 1<< 3,  // Trigger line enabled
     110            kContTrigger   = 1<< 2,  // Cont trigger enabled
     111            kSock17        = 1<< 1,  // Socket 1-7 for data transfer
    107112        };
    108113#endif
     
    249254        bool HasDenable() const        { return fStatus&kDenable; }
    250255        bool HasDwrite() const         { return fStatus&kDwrite; }
    251         bool IsRefClockTooHigh() const { return fStatus&kRefClkTooHigh; }
     256//        bool IsRefClockTooHigh() const { return fStatus&kRefClkTooHigh; }
    252257        bool IsRefClockTooLow() const  { return fStatus&kRefClkTooLow; }
    253258        bool IsDcmLocked() const       { return fStatus&kDcmLocked; }
    254259        bool IsDcmReady() const        { return fStatus&kDcmReady; }
    255260        bool HasSpiSclk() const        { return fStatus&kSpiSclk; }
     261        bool HasBusy() const           { return fStatus&kBusy; }
     262        bool HasTriggerEnabled() const { return fStatus&kTriggerLine; }
     263        bool HasContTriggerEnabled() const { return fStatus&kContTrigger; }
     264        bool IsInSock17Mode() const    { return fStatus&kSock17; }
    256265
    257266        uint16_t Crate() const { return fBoardId>>8; }
  • trunk/FACT++/src/fadctrl.cc

    r11139 r11156  
    13671367            (boost::bind(&StateMachineFAD::CmdEnable, this, _1, FAD::kCmdSrclk))
    13681368            ("Set SRCLK");
     1369        T::AddEvent("ENABLE_BUSY", "B:1")
     1370            (boost::bind(&StateMachineFAD::CmdEnable, this, _1, FAD::kCmdBusy))
     1371            ("Set BUSY");
    13691372        T::AddEvent("ENABLE_SCLK", "B:1")
    13701373            (boost::bind(&StateMachineFAD::CmdEnable, this, _1, FAD::kCmdSclk))
Note: See TracChangeset for help on using the changeset viewer.