#include <SiStripFEDBufferComponents.h>
Definition at line 313 of file SiStripFEDBufferComponents.h.
enum sistrip::FEDBackendStatusRegister::bufferPositions [private] |
Definition at line 369 of file SiStripFEDBufferComponents.h.
enum sistrip::FEDBackendStatusRegister::stateOffsets [private] |
Definition at line 376 of file SiStripFEDBufferComponents.h.
{ STATE_OFFSET_FULL=8, STATE_OFFSET_PARTIAL_FULL=16, STATE_OFFSET_EMPTY=24 };
sistrip::FEDBackendStatusRegister::FEDBackendStatusRegister | ( | const uint32_t | backendStatusRegister | ) | [inline] |
Definition at line 860 of file SiStripFEDBufferComponents.h.
: data_(backendStatusRegister) { }
sistrip::FEDBackendStatusRegister::FEDBackendStatusRegister | ( | const FEDBufferState | qdrMemoryBufferState = BUFFER_STATE_UNSET , |
const FEDBufferState | frameAddressFIFOBufferState = BUFFER_STATE_UNSET , |
||
const FEDBufferState | totalLengthFIFOBufferState = BUFFER_STATE_UNSET , |
||
const FEDBufferState | trackerHeaderFIFOBufferState = BUFFER_STATE_UNSET , |
||
const FEDBufferState | l1aBxFIFOBufferState = BUFFER_STATE_UNSET , |
||
const FEDBufferState | feEventLengthFIFOBufferState = BUFFER_STATE_UNSET , |
||
const FEDBufferState | feFPGABufferState = BUFFER_STATE_UNSET , |
||
const bool | backpressure = false , |
||
const bool | slinkFull = false , |
||
const bool | slinkDown = false , |
||
const bool | internalFreeze = false , |
||
const bool | trackerHeaderMonitorDataReady = false , |
||
const bool | ttcReady = true |
||
) |
Definition at line 581 of file SiStripFEDBufferComponents.cc.
References setBackpressureFlag(), setFEEventLengthFIFOState(), setFEFPGABufferState(), setFrameAddressFIFOState(), setInternalFreezeFlag(), setL1ABXFIFOState(), setQDRMemoryState(), setSLinkDownFlag(), setSLinkFullFlag(), setTotalLengthFIFOState(), setTrackerHeaderFIFOState(), setTrackerHeaderMonitorDataReadyFlag(), and setTTCReadyFlag().
: data_(0) { setInternalFreezeFlag(internalFreeze); setSLinkDownFlag(slinkDown); setSLinkFullFlag(slinkFull); setBackpressureFlag(backpressure); setTTCReadyFlag(ttcReady); setTrackerHeaderMonitorDataReadyFlag(trackerHeaderMonitorDataReady); setQDRMemoryState(qdrMemoryBufferState); setFrameAddressFIFOState(frameAddressFIFOBufferState); setTotalLengthFIFOState(totalLengthFIFOBufferState); setTrackerHeaderFIFOState(trackerHeaderFIFOBufferState); setL1ABXFIFOState(l1aBxFIFOBufferState); setFEEventLengthFIFOState(feEventLengthFIFOBufferState); setFEFPGABufferState(feFPGABufferState); }
bool sistrip::FEDBackendStatusRegister::backpressureFlag | ( | ) | const [inline] |
Definition at line 881 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(4); }
FEDBufferState sistrip::FEDBackendStatusRegister::feEventLengthFIFOState | ( | ) | const [inline] |
Definition at line 933 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_FE_EVENT_LENGTH_FIFO, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_FE_EVENT_LENGTH_FIFO); }
FEDBufferState sistrip::FEDBackendStatusRegister::feFPGABufferState | ( | ) | const [inline] |
Definition at line 938 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_FE_FPGA_BUFFER, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_FE_FPGA_BUFFER); }
FEDBufferState sistrip::FEDBackendStatusRegister::frameAddressFIFOState | ( | ) | const [inline] |
Definition at line 913 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_FRAME_ADDRESS_FIFO, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_FRAME_ADDRESS_FIFO); }
bool sistrip::FEDBackendStatusRegister::getBit | ( | const uint8_t | num | ) | const [inline, private] |
Definition at line 869 of file SiStripFEDBufferComponents.h.
References data_.
Referenced by backpressureFlag(), getBufferState(), internalFreezeFlag(), slinkDownFlag(), slinkFullFlag(), trackerHeaderMonitorDataReadyFlag(), and ttcReadyFlag().
FEDBufferState sistrip::FEDBackendStatusRegister::getBufferState | ( | const uint8_t | bufferPosition | ) | const [private] |
Definition at line 546 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, getBit(), query::result, STATE_OFFSET_EMPTY, STATE_OFFSET_FULL, and STATE_OFFSET_PARTIAL_FULL.
Referenced by feEventLengthFIFOState(), feFPGABufferState(), frameAddressFIFOState(), l1aBxFIFOState(), qdrMemoryState(), totalLengthFIFOState(), and trackerHeaderFIFOState().
{ uint8_t result = 0x00; if (getBit(bufferPosition+STATE_OFFSET_EMPTY)) result |= BUFFER_STATE_EMPTY; if (getBit(bufferPosition+STATE_OFFSET_PARTIAL_FULL)) result |= BUFFER_STATE_PARTIAL_FULL; if (getBit(bufferPosition+STATE_OFFSET_FULL)) result |= BUFFER_STATE_FULL; return FEDBufferState(result); }
bool sistrip::FEDBackendStatusRegister::internalFreezeFlag | ( | ) | const [inline] |
Definition at line 872 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(1); }
FEDBufferState sistrip::FEDBackendStatusRegister::l1aBxFIFOState | ( | ) | const [inline] |
Definition at line 928 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_L1ABX_FIFO, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_L1ABX_FIFO); }
sistrip::FEDBackendStatusRegister::operator uint32_t | ( | ) | const [inline] |
void sistrip::FEDBackendStatusRegister::print | ( | std::ostream & | os | ) | const [inline] |
Definition at line 866 of file SiStripFEDBufferComponents.h.
References data_, and sistrip::printHex().
void sistrip::FEDBackendStatusRegister::printFlags | ( | std::ostream & | os | ) | const |
Definition at line 521 of file SiStripFEDBufferComponents.cc.
References backpressureFlag(), feEventLengthFIFOState(), feFPGABufferState(), frameAddressFIFOState(), internalFreezeFlag(), l1aBxFIFOState(), printFlagsForBuffer(), qdrMemoryState(), slinkDownFlag(), slinkFullFlag(), totalLengthFIFOState(), trackerHeaderFIFOState(), trackerHeaderMonitorDataReadyFlag(), and ttcReadyFlag().
{ if (internalFreezeFlag()) os << "INTERNAL_FREEZE "; if (slinkDownFlag()) os << "SLINK_DOWN "; if (slinkFullFlag()) os << "SLINK_FULL "; if (backpressureFlag()) os << "BACKPRESSURE "; if (ttcReadyFlag()) os << "TTC_READY "; if (trackerHeaderMonitorDataReadyFlag()) os << "HEADER_MONITOR_READY "; printFlagsForBuffer(qdrMemoryState(),"QDR",os); printFlagsForBuffer(frameAddressFIFOState(),"FRAME_ADDRESS",os); printFlagsForBuffer(totalLengthFIFOState(),"TOTAL_LENGTH",os); printFlagsForBuffer(trackerHeaderFIFOState(),"TRACKER_HEADER",os); printFlagsForBuffer(l1aBxFIFOState(),"L1ABX",os); printFlagsForBuffer(feEventLengthFIFOState(),"FE_LENGTH",os); printFlagsForBuffer(feFPGABufferState(),"FE",os); }
void sistrip::FEDBackendStatusRegister::printFlagsForBuffer | ( | const FEDBufferState | bufferState, |
const std::string | name, | ||
std::ostream & | os | ||
) | const [private] |
Definition at line 538 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, and sistrip::BUFFER_STATE_UNSET.
Referenced by printFlags().
{ if (bufferState&BUFFER_STATE_EMPTY) os << name << "_EMPTY "; if (bufferState&BUFFER_STATE_PARTIAL_FULL) os << name << "_PARTIAL_FULL "; if (bufferState&BUFFER_STATE_FULL) os << name << "_FULL "; if (bufferState == BUFFER_STATE_UNSET) os << name << "_UNSET "; }
FEDBufferState sistrip::FEDBackendStatusRegister::qdrMemoryState | ( | ) | const [inline] |
Definition at line 908 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_QDR_MEMORY, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_QDR_MEMORY); }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setBackpressureFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 899 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDBackendStatusRegister().
{ setBit(4,bitSet); return *this; }
void sistrip::FEDBackendStatusRegister::setBit | ( | const uint8_t | num, |
const bool | bitSet | ||
) | [private] |
Definition at line 574 of file SiStripFEDBufferComponents.cc.
References data_.
Referenced by setBackpressureFlag(), setBufferSate(), setInternalFreezeFlag(), setSLinkDownFlag(), setSLinkFullFlag(), setTrackerHeaderMonitorDataReadyFlag(), and setTTCReadyFlag().
void sistrip::FEDBackendStatusRegister::setBufferSate | ( | const uint8_t | bufferPosition, |
const FEDBufferState | state | ||
) | [private] |
Definition at line 555 of file SiStripFEDBufferComponents.cc.
References sistrip::BUFFER_STATE_EMPTY, sistrip::BUFFER_STATE_FULL, sistrip::BUFFER_STATE_PARTIAL_FULL, sistrip::BUFFER_STATE_UNSET, Exception, sistrip::printHex(), setBit(), STATE_OFFSET_EMPTY, STATE_OFFSET_FULL, and STATE_OFFSET_PARTIAL_FULL.
Referenced by setFEEventLengthFIFOState(), setFEFPGABufferState(), setFrameAddressFIFOState(), setL1ABXFIFOState(), setQDRMemoryState(), setTotalLengthFIFOState(), and setTrackerHeaderFIFOState().
{ switch (state) { case BUFFER_STATE_FULL: case BUFFER_STATE_PARTIAL_FULL: case BUFFER_STATE_EMPTY: case BUFFER_STATE_UNSET: break; default: std::ostringstream ss; ss << "Invalid buffer state: "; printHex(&state,1,ss); throw cms::Exception("FEDBuffer") << ss.str(); } setBit(bufferPosition+STATE_OFFSET_EMPTY, state&BUFFER_STATE_EMPTY); setBit(bufferPosition+STATE_OFFSET_PARTIAL_FULL, state&BUFFER_STATE_PARTIAL_FULL); setBit(bufferPosition+STATE_OFFSET_FULL, state&BUFFER_STATE_FULL); }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setFEEventLengthFIFOState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 973 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_FE_EVENT_LENGTH_FIFO, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_FE_EVENT_LENGTH_FIFO,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setFEFPGABufferState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 979 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_FE_FPGA_BUFFER, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_FE_FPGA_BUFFER,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setFrameAddressFIFOState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 949 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_FRAME_ADDRESS_FIFO, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_FRAME_ADDRESS_FIFO,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setInternalFreezeFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 890 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDBackendStatusRegister().
{ setBit(1,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setL1ABXFIFOState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 967 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_L1ABX_FIFO, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_L1ABX_FIFO,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setQDRMemoryState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 943 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_QDR_MEMORY, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_QDR_MEMORY,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setSLinkDownFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 893 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDBackendStatusRegister().
{ setBit(2,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setSLinkFullFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 896 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDBackendStatusRegister().
{ setBit(3,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTotalLengthFIFOState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 955 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_TOTAL_LENGTH_FIFO, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_TOTAL_LENGTH_FIFO,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTrackerHeaderFIFOState | ( | const FEDBufferState | state | ) | [inline] |
Definition at line 961 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_TRACKER_HEADER_FIFO, and setBufferSate().
Referenced by FEDBackendStatusRegister().
{ setBufferSate(BUFFER_POSITION_TRACKER_HEADER_FIFO,state); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTrackerHeaderMonitorDataReadyFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 905 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDBackendStatusRegister().
{ setBit(7,bitSet); return *this; }
FEDBackendStatusRegister & sistrip::FEDBackendStatusRegister::setTTCReadyFlag | ( | const bool | bitSet | ) | [inline] |
Definition at line 902 of file SiStripFEDBufferComponents.h.
References setBit().
Referenced by FEDBackendStatusRegister().
{ setBit(6,bitSet); return *this; }
bool sistrip::FEDBackendStatusRegister::slinkDownFlag | ( | ) | const [inline] |
Definition at line 875 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(2); }
bool sistrip::FEDBackendStatusRegister::slinkFullFlag | ( | ) | const [inline] |
Definition at line 878 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(3); }
FEDBufferState sistrip::FEDBackendStatusRegister::totalLengthFIFOState | ( | ) | const [inline] |
Definition at line 918 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_TOTAL_LENGTH_FIFO, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_TOTAL_LENGTH_FIFO); }
FEDBufferState sistrip::FEDBackendStatusRegister::trackerHeaderFIFOState | ( | ) | const [inline] |
Definition at line 923 of file SiStripFEDBufferComponents.h.
References BUFFER_POSITION_TRACKER_HEADER_FIFO, and getBufferState().
Referenced by printFlags().
{ return getBufferState(BUFFER_POSITION_TRACKER_HEADER_FIFO); }
bool sistrip::FEDBackendStatusRegister::trackerHeaderMonitorDataReadyFlag | ( | ) | const [inline] |
Definition at line 887 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(7); }
bool sistrip::FEDBackendStatusRegister::ttcReadyFlag | ( | ) | const [inline] |
Definition at line 884 of file SiStripFEDBufferComponents.h.
References getBit().
Referenced by printFlags().
{ return getBit(6); }
uint32_t sistrip::FEDBackendStatusRegister::data_ [private] |
Definition at line 379 of file SiStripFEDBufferComponents.h.
Referenced by getBit(), operator uint32_t(), print(), and setBit().