Commit 2561a7a0 authored by Daniel Krebs's avatar Daniel Krebs

rtds2gpu: make dump return true if cannot access status register

parent 98cf7227
Pipeline #73361 failed with stages
in 55 seconds
......@@ -19,7 +19,7 @@ public:
bool init();
void dump(spdlog::level::level_enum logLevel = spdlog::level::info);
bool dump(spdlog::level::level_enum logLevel = spdlog::level::info);
bool startOnce(size_t frameSize);
size_t getMaxFrameSize();
......
......@@ -32,7 +32,7 @@ public:
bool init();
void dump(spdlog::level::level_enum logLevel = spdlog::level::info);
bool dump(spdlog::level::level_enum logLevel = spdlog::level::info);
bool startOnce(const MemoryBlock& mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset);
......
......@@ -39,7 +39,7 @@ Gpu2Rtds::startOnce(size_t frameSize)
return true;
}
void Gpu2Rtds::dump(spdlog::level::level_enum logLevel)
bool Gpu2Rtds::dump(spdlog::level::level_enum logLevel)
{
const auto frame_size = *registerFrameSize;
auto status = *registerStatus;
......@@ -54,6 +54,8 @@ void Gpu2Rtds::dump(spdlog::level::level_enum logLevel)
logger->log(logLevel, " Last count: {}", getStatusLastCount(status));
logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr);
logger->log(logLevel, " Max. frame size: {}", getStatusMaxFrameSize(status));
return true;
}
//bool Gpu2Rtds::startOnce(const MemoryBlock& mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset)
......
......@@ -31,7 +31,7 @@ bool Rtds2Gpu::init()
void Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
bool Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
{
const auto baseaddr = XRtds2gpu_Get_baseaddr(&xInstance);
const auto data_offset = XRtds2gpu_Get_data_offset(&xInstance);
......@@ -40,6 +40,7 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
if(not updateStatus()) {
logger->warn("Couldn't read status register (not ready), values may be wrong");
return false;
}
logger->log(logLevel, "Rtds2Gpu registers (IP base {:#x}):", xInstance.Ctrl_BaseAddress);
......@@ -55,6 +56,8 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
logger->log(logLevel, " Last count: {}", getStatusLastCount(status));
logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr);
logger->log(logLevel, " Max. frame size: {}", getStatusMaxFrameSize(status));
return true;
}
bool Rtds2Gpu::startOnce(const MemoryBlock& mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment