Skip to content

Commit f5653aa

Browse files
committed
Fix SIU status output
1 parent d7d3dfb commit f5653aa

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/CommandLineUtilities/ProgramSiuStatus.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,11 @@ class ProgramSiuStatus: public Program
6868
return;
6969
}
7070

71+
std::stringstream ss;
72+
ss << "0x" << std::setfill('0') << std::hex << std::get<1>(siuStatus);
73+
7174
getLogger() << "SIU HW info: " << std::get<0>(siuStatus) << InfoLogger::endm;
72-
getLogger() << "SIU Status Register: 0x" << std::setfill('0') << std::setw(8) << std::hex << std::get<1>(siuStatus) << InfoLogger::endm;
75+
getLogger() << "SIU Status Register: " << ss.str() << InfoLogger::endm;
7376
auto statusStrings = crorc.ddlInterpretIfstw(std::get<1>(siuStatus));
7477

7578
for(auto const& string: statusStrings) {

src/Crorc/Crorc.cxx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,12 +1084,15 @@ uint32_t Crorc::ddlPrintStatus(int destination, int time)
10841084
std::tuple<std::string, uint32_t> Crorc::siuStatus()
10851085
{
10861086
DiuConfig diuConfig = initDiuVersion();
1087+
resetCommand(Rorc::Reset::SIU, diuConfig);
1088+
sleep_for(100ms);
1089+
10871090
long long int time = Ddl::RESPONSE_TIME * diuConfig.pciLoopPerUsec;
10881091

10891092
std::string hwInfo = ddlGetHwInfo(Ddl::Destination::SIU, time);
10901093
uint32_t siuStatus;
10911094
try {
1092-
ddlPrintStatus(Ddl::Destination::SIU, time);
1095+
siuStatus = ddlPrintStatus(Ddl::Destination::SIU, time);
10931096
} catch (const Exception& e){
10941097
throw e;
10951098
}

src/Crorc/CrorcDmaChannel.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ void CrorcDmaChannel::startDataGenerator()
252252
std::this_thread::sleep_for(100ms); // XXX Why???
253253
getCrorc().assertLinkUp();
254254
getCrorc().siuCommand(Ddl::RandCIFST);
255+
getCrorc().diuCommand(Ddl::RandCIFST);
255256
}
256257

257258
if (LoopbackMode::Diu == mLoopbackMode) {

0 commit comments

Comments
 (0)