Skip to content

Commit 779e002

Browse files
authored
Merge pull request #98 from Mu2e/rrivera/betterCFOversionDescription
Better CFO version description
2 parents 2e9150c + a7f6113 commit 779e002

File tree

2 files changed

+102
-93
lines changed

2 files changed

+102
-93
lines changed

cfoInterfaceLib/CFO_Registers.h

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,108 +1456,108 @@ class CFO_Registers : public DTCLib::CFOandDTC_Registers
14561456
[this] { return this->FormatJitterAttenuatorCSR(); },
14571457
[this] { return this->FormatSERDESPLLLocked(); },
14581458
[this] { return this->FormatLinkEnable(); },
1459-
// [this] { return this->FormatRXCDRLockStatus(); },
1459+
[this] { return this->FormatSERDESRXCDRLock(); },
14601460
[this] { return this->FormatSERDESResetDone(); },
14611461
[this] { return this->FormatSERDESReset(); },
14621462
};
14631463

14641464
const std::vector<std::function<RegisterFormatter()>> formattedDumpFunctions_{
1465-
[this]() { return this->FormatDesignVersion(); },
1466-
[this]() { return this->FormatDesignDate(); },
1467-
[this]() { return this->FormatDesignStatus(); },
1468-
[this]() { return this->FormatVivadoVersion(); },
1469-
[this]() { return this->FormatCFOControl(); },
1470-
[this]() { return this->FormatDMATransferLength(); },
1471-
[this]() { return this->FormatSERDESLoopbackEnable(); },
1472-
[this]() { return this->FormatClockOscillatorStatus(); },
1473-
[this]() { return this->FormatLinkEnable(); },
1474-
[this]() { return this->FormatSERDESReset(); },
1475-
[this]() { return this->FormatSERDESRXDisparityError(); },
1476-
[this]() { return this->FormatSERDESRXCharacterNotInTableError(); },
1477-
[this]() { return this->FormatSERDESUnlockError(); },
1478-
[this]() { return this->FormatSERDESPLLLocked(); },
1479-
[this]() { return this->FormatSERDESRXStatus(); },
1480-
[this]() { return this->FormatSERDESResetDone(); },
1481-
[this]() { return this->FormatSERDESRXCDRLock(); },
1482-
[this]() { return this->FormatBeamOnTimerPreset(); },
1483-
[this]() { return this->FormatBeamOnMode(); },
1484-
[this]() { return this->FormatBeamOffMode(); },
1485-
[this]() { return this->FormatClockMarkerIntervalCount(); },
1486-
[this]() { return this->FormatSERDESOscillatorFrequency(); },
1487-
[this]() { return this->FormatSERDESOscillatorControl(); },
1488-
[this]() { return this->FormatSERDESOscillatorParameterLow(); },
1489-
[this]() { return this->FormatSERDESOscillatorParameterHigh(); },
1490-
[this]() { return this->FormatTimestampPreset0(); },
1491-
[this]() { return this->FormatTimestampPreset1(); },
1492-
[this]() { return this->FormatNUMDTCs(); },
1493-
[this]() { return this->FormatFIFOFullErrorFlag0(); },
1494-
[this]() { return this->FormatReceivePacketError(); },
1495-
// [this]() { return this->FormatEventWindowEmulatorIntervalTime(); },
1496-
[this]() { return this->FormatEventWindowHoldoffTime(); },
1497-
[this]() { return this->FormatEventWindowTimeoutError(); },
1498-
[this]() { return this->FormatEventWindowTimeoutInterval(); },
1499-
[this]() { return this->FormatDMAWriteStartAddress(); },
1500-
[this]() { return this->FormatDMAReadStartAddress(); },
1501-
[this]() { return this->FormatDMAReadByteCount(); },
1502-
[this]() { return this->FormatRunPlanBeamOnBaseAddress(); },
1503-
[this]() { return this->FormatRunPlanBeamOffBaseAddress(); },
1504-
[this]() { return this->FormatFireflyCSR(); },
1505-
[this]() { return this->FormatSERDESPRBSControlLink0(); },
1506-
[this]() { return this->FormatSERDESPRBSControlLink1(); },
1507-
[this]() { return this->FormatSERDESPRBSControlLink2(); },
1508-
[this]() { return this->FormatSERDESPRBSControlLink3(); },
1509-
[this]() { return this->FormatSERDESPRBSControlLink4(); },
1510-
[this]() { return this->FormatSERDESPRBSControlLink5(); },
1511-
[this]() { return this->FormatSERDESPRBSControlLink6(); },
1512-
[this]() { return this->FormatSERDESPRBSControlLink7(); },
1513-
// [this]() { return this->FormatCableDelayValueLink0(); },
1514-
// [this]() { return this->FormatCableDelayValueLink1(); },
1515-
// [this]() { return this->FormatCableDelayValueLink2(); },
1516-
// [this]() { return this->FormatCableDelayValueLink3(); },
1517-
// [this]() { return this->FormatCableDelayValueLink4(); },
1518-
// [this]() { return this->FormatCableDelayValueLink5(); },
1519-
// [this]() { return this->FormatCableDelayValueLink6(); },
1520-
// [this]() { return this->FormatCableDelayValueLink7(); },
1521-
// [this]() { return this->FormatCableDelayControl(); },
1522-
[this]() { return this->FormatFPGAPROMProgramStatus(); },
1523-
[this]() { return this->FormatFPGACoreAccess(); }};
1465+
[this] { return this->FormatDesignVersion(); },
1466+
[this] { return this->FormatDesignDate(); },
1467+
[this] { return this->FormatDesignStatus(); },
1468+
[this] { return this->FormatVivadoVersion(); },
1469+
[this] { return this->FormatCFOControl(); },
1470+
[this] { return this->FormatDMATransferLength(); },
1471+
[this] { return this->FormatSERDESLoopbackEnable(); },
1472+
[this] { return this->FormatClockOscillatorStatus(); },
1473+
[this] { return this->FormatLinkEnable(); },
1474+
[this] { return this->FormatSERDESReset(); },
1475+
[this] { return this->FormatSERDESRXDisparityError(); },
1476+
[this] { return this->FormatSERDESRXCharacterNotInTableError(); },
1477+
[this] { return this->FormatSERDESUnlockError(); },
1478+
[this] { return this->FormatSERDESPLLLocked(); },
1479+
[this] { return this->FormatSERDESRXStatus(); },
1480+
[this] { return this->FormatSERDESResetDone(); },
1481+
[this] { return this->FormatSERDESRXCDRLock(); },
1482+
[this] { return this->FormatBeamOnTimerPreset(); },
1483+
[this] { return this->FormatBeamOnMode(); },
1484+
[this] { return this->FormatBeamOffMode(); },
1485+
[this] { return this->FormatClockMarkerIntervalCount(); },
1486+
[this] { return this->FormatSERDESOscillatorFrequency(); },
1487+
[this] { return this->FormatSERDESOscillatorControl(); },
1488+
[this] { return this->FormatSERDESOscillatorParameterLow(); },
1489+
[this] { return this->FormatSERDESOscillatorParameterHigh(); },
1490+
[this] { return this->FormatTimestampPreset0(); },
1491+
[this] { return this->FormatTimestampPreset1(); },
1492+
[this] { return this->FormatNUMDTCs(); },
1493+
[this] { return this->FormatFIFOFullErrorFlag0(); },
1494+
[this] { return this->FormatReceivePacketError(); },
1495+
// [this] { return this->FormatEventWindowEmulatorIntervalTime(); },
1496+
[this] { return this->FormatEventWindowHoldoffTime(); },
1497+
[this] { return this->FormatEventWindowTimeoutError(); },
1498+
[this] { return this->FormatEventWindowTimeoutInterval(); },
1499+
[this] { return this->FormatDMAWriteStartAddress(); },
1500+
[this] { return this->FormatDMAReadStartAddress(); },
1501+
[this] { return this->FormatDMAReadByteCount(); },
1502+
[this] { return this->FormatRunPlanBeamOnBaseAddress(); },
1503+
[this] { return this->FormatRunPlanBeamOffBaseAddress(); },
1504+
[this] { return this->FormatFireflyCSR(); },
1505+
[this] { return this->FormatSERDESPRBSControlLink0(); },
1506+
[this] { return this->FormatSERDESPRBSControlLink1(); },
1507+
[this] { return this->FormatSERDESPRBSControlLink2(); },
1508+
[this] { return this->FormatSERDESPRBSControlLink3(); },
1509+
[this] { return this->FormatSERDESPRBSControlLink4(); },
1510+
[this] { return this->FormatSERDESPRBSControlLink5(); },
1511+
[this] { return this->FormatSERDESPRBSControlLink6(); },
1512+
[this] { return this->FormatSERDESPRBSControlLink7(); },
1513+
// [this] { return this->FormatCableDelayValueLink0(); },
1514+
// [this] { return this->FormatCableDelayValueLink1(); },
1515+
// [this] { return this->FormatCableDelayValueLink2(); },
1516+
// [this] { return this->FormatCableDelayValueLink3(); },
1517+
// [this] { return this->FormatCableDelayValueLink4(); },
1518+
// [this] { return this->FormatCableDelayValueLink5(); },
1519+
// [this] { return this->FormatCableDelayValueLink6(); },
1520+
// [this] { return this->FormatCableDelayValueLink7(); },
1521+
// [this] { return this->FormatCableDelayControl(); },
1522+
[this] { return this->FormatFPGAPROMProgramStatus(); },
1523+
[this] { return this->FormatFPGACoreAccess(); }};
15241524

15251525
/// <summary>
15261526
/// Dump Byte/Packet Counter Registers
15271527
/// </summary>
15281528
const std::vector<std::function<RegisterFormatter()>> formattedCounterFunctions_{
1529-
[this]() { return this->FormatReceiveByteCountLink0(); },
1530-
[this]() { return this->FormatReceiveByteCountLink1(); },
1531-
[this]() { return this->FormatReceiveByteCountLink2(); },
1532-
[this]() { return this->FormatReceiveByteCountLink3(); },
1533-
[this]() { return this->FormatReceiveByteCountLink4(); },
1534-
[this]() { return this->FormatReceiveByteCountLink5(); },
1535-
[this]() { return this->FormatReceiveByteCountLink6(); },
1536-
[this]() { return this->FormatReceiveByteCountLink7(); },
1537-
[this]() { return this->FormatReceivePacketCountLink0(); },
1538-
[this]() { return this->FormatReceivePacketCountLink1(); },
1539-
[this]() { return this->FormatReceivePacketCountLink2(); },
1540-
[this]() { return this->FormatReceivePacketCountLink3(); },
1541-
[this]() { return this->FormatReceivePacketCountLink4(); },
1542-
[this]() { return this->FormatReceivePacketCountLink5(); },
1543-
[this]() { return this->FormatReceivePacketCountLink6(); },
1544-
[this]() { return this->FormatReceivePacketCountLink7(); },
1545-
[this]() { return this->FormatTramsitByteCountLink0(); },
1546-
[this]() { return this->FormatTramsitByteCountLink1(); },
1547-
[this]() { return this->FormatTramsitByteCountLink2(); },
1548-
[this]() { return this->FormatTramsitByteCountLink3(); },
1549-
[this]() { return this->FormatTramsitByteCountLink4(); },
1550-
[this]() { return this->FormatTramsitByteCountLink5(); },
1551-
[this]() { return this->FormatTramsitByteCountLink6(); },
1552-
[this]() { return this->FormatTramsitByteCountLink7(); },
1553-
[this]() { return this->FormatTransmitPacketCountLink0(); },
1554-
[this]() { return this->FormatTransmitPacketCountLink1(); },
1555-
[this]() { return this->FormatTransmitPacketCountLink2(); },
1556-
[this]() { return this->FormatTransmitPacketCountLink3(); },
1557-
[this]() { return this->FormatTransmitPacketCountLink4(); },
1558-
[this]() { return this->FormatTransmitPacketCountLink5(); },
1559-
[this]() { return this->FormatTransmitPacketCountLink6(); },
1560-
[this]() { return this->FormatTransmitPacketCountLink7(); }};
1529+
[this] { return this->FormatReceiveByteCountLink0(); },
1530+
[this] { return this->FormatReceiveByteCountLink1(); },
1531+
[this] { return this->FormatReceiveByteCountLink2(); },
1532+
[this] { return this->FormatReceiveByteCountLink3(); },
1533+
[this] { return this->FormatReceiveByteCountLink4(); },
1534+
[this] { return this->FormatReceiveByteCountLink5(); },
1535+
[this] { return this->FormatReceiveByteCountLink6(); },
1536+
[this] { return this->FormatReceiveByteCountLink7(); },
1537+
[this] { return this->FormatReceivePacketCountLink0(); },
1538+
[this] { return this->FormatReceivePacketCountLink1(); },
1539+
[this] { return this->FormatReceivePacketCountLink2(); },
1540+
[this] { return this->FormatReceivePacketCountLink3(); },
1541+
[this] { return this->FormatReceivePacketCountLink4(); },
1542+
[this] { return this->FormatReceivePacketCountLink5(); },
1543+
[this] { return this->FormatReceivePacketCountLink6(); },
1544+
[this] { return this->FormatReceivePacketCountLink7(); },
1545+
[this] { return this->FormatTramsitByteCountLink0(); },
1546+
[this] { return this->FormatTramsitByteCountLink1(); },
1547+
[this] { return this->FormatTramsitByteCountLink2(); },
1548+
[this] { return this->FormatTramsitByteCountLink3(); },
1549+
[this] { return this->FormatTramsitByteCountLink4(); },
1550+
[this] { return this->FormatTramsitByteCountLink5(); },
1551+
[this] { return this->FormatTramsitByteCountLink6(); },
1552+
[this] { return this->FormatTramsitByteCountLink7(); },
1553+
[this] { return this->FormatTransmitPacketCountLink0(); },
1554+
[this] { return this->FormatTransmitPacketCountLink1(); },
1555+
[this] { return this->FormatTransmitPacketCountLink2(); },
1556+
[this] { return this->FormatTransmitPacketCountLink3(); },
1557+
[this] { return this->FormatTransmitPacketCountLink4(); },
1558+
[this] { return this->FormatTransmitPacketCountLink5(); },
1559+
[this] { return this->FormatTransmitPacketCountLink6(); },
1560+
[this] { return this->FormatTransmitPacketCountLink7(); }};
15611561
};
15621562
} // namespace CFOLib
15631563

dtcInterfaceLib/CFOandDTC_Registers.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ std::string DTCLib::CFOandDTC_Registers::ReadDesignDate(std::optional<uint32_t>
113113
{
114114
auto readData = val.has_value() ? *val : ReadRegister_(CFOandDTC_Register_DesignDate);
115115
std::ostringstream o;
116+
bool isCFO = false;
116117
std::vector<std::string> months({"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"});
117118
size_t mon = ((readData >> 20) & 0xF) * 10 + ((readData >> 16) & 0xF);
118119
if (mon - 1 >= months.size())
@@ -124,7 +125,10 @@ std::string DTCLib::CFOandDTC_Registers::ReadDesignDate(std::optional<uint32_t>
124125
if (((readData >> 28) & 0xF) == 0xA)
125126
o << "SIM-";
126127
else if (((readData >> 28) & 0xF) == 0xC)
128+
{
127129
o << "CFO-";
130+
isCFO = true;
131+
}
128132
else if (((readData >> 28) & 0xF) == 0xD)
129133
o << "DTC-";
130134
else if (((readData >> 28) & 0xF) == 0xE)
@@ -134,7 +138,12 @@ std::string DTCLib::CFOandDTC_Registers::ReadDesignDate(std::optional<uint32_t>
134138
o << months[mon - 1] << "/" << ((readData >> 12) & 0xF) << ((readData >> 8) & 0xF) << "/20" <<
135139
// ((readData>>28)&0xF) <<
136140
20 + ((readData >> 24) & 0xF) << " " << // year 2020 + hex nibble at bit-24
137-
((readData >> 4) & 0x7) << ((readData >> 0) & 0xF) << ":00 " << (((readData >> 7) & 0x1) ? "6-ROC" : "3-ROC") << " raw-data: 0x" << std::hex << readData;
141+
((readData >> 4) & 0x7) << ((readData >> 0) & 0xF) << ":00 ";
142+
if (isCFO)
143+
o << "8-Links";
144+
else
145+
o << (((readData >> 7) & 0x1) ? "6-ROC" : "3-ROC");
146+
o << " raw-data: 0x" << std::hex << readData;
138147
return o.str();
139148
}
140149

0 commit comments

Comments
 (0)