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

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: ...@@ -19,7 +19,7 @@ public:
bool init(); 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); bool startOnce(size_t frameSize);
size_t getMaxFrameSize(); size_t getMaxFrameSize();
......
...@@ -32,7 +32,7 @@ public: ...@@ -32,7 +32,7 @@ public:
bool init(); 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); bool startOnce(const MemoryBlock& mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset);
......
...@@ -39,7 +39,7 @@ Gpu2Rtds::startOnce(size_t frameSize) ...@@ -39,7 +39,7 @@ Gpu2Rtds::startOnce(size_t frameSize)
return true; return true;
} }
void Gpu2Rtds::dump(spdlog::level::level_enum logLevel) bool Gpu2Rtds::dump(spdlog::level::level_enum logLevel)
{ {
const auto frame_size = *registerFrameSize; const auto frame_size = *registerFrameSize;
auto status = *registerStatus; auto status = *registerStatus;
...@@ -54,6 +54,8 @@ void Gpu2Rtds::dump(spdlog::level::level_enum logLevel) ...@@ -54,6 +54,8 @@ void Gpu2Rtds::dump(spdlog::level::level_enum logLevel)
logger->log(logLevel, " Last count: {}", getStatusLastCount(status)); logger->log(logLevel, " Last count: {}", getStatusLastCount(status));
logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr); logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr);
logger->log(logLevel, " Max. frame size: {}", getStatusMaxFrameSize(status)); 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) //bool Gpu2Rtds::startOnce(const MemoryBlock& mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset)
......
...@@ -31,7 +31,7 @@ bool Rtds2Gpu::init() ...@@ -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 baseaddr = XRtds2gpu_Get_baseaddr(&xInstance);
const auto data_offset = XRtds2gpu_Get_data_offset(&xInstance); const auto data_offset = XRtds2gpu_Get_data_offset(&xInstance);
...@@ -40,6 +40,7 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel) ...@@ -40,6 +40,7 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
if(not updateStatus()) { if(not updateStatus()) {
logger->warn("Couldn't read status register (not ready), values may be wrong"); 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); logger->log(logLevel, "Rtds2Gpu registers (IP base {:#x}):", xInstance.Ctrl_BaseAddress);
...@@ -55,6 +56,8 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel) ...@@ -55,6 +56,8 @@ void Rtds2Gpu::dump(spdlog::level::level_enum logLevel)
logger->log(logLevel, " Last count: {}", getStatusLastCount(status)); logger->log(logLevel, " Last count: {}", getStatusLastCount(status));
logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr); logger->log(logLevel, " Last seq. number: {}", status.last_seq_nr);
logger->log(logLevel, " Max. frame size: {}", getStatusMaxFrameSize(status)); 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) bool Rtds2Gpu::startOnce(const MemoryBlock& mem, size_t frameSize, size_t dataOffset, size_t doorbellOffset)
......
Supports Markdown
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