Commit 1bb92b5f authored by Daniel Krebs's avatar Daniel Krebs
Browse files

rtds2gpu: add struct for memory layout of rtds2gpu buffer

parent c182f622
Pipeline #62073 failed with stages
in 1 minute and 15 seconds
......@@ -2,6 +2,7 @@
#define REGISTER_TYPES_H
#include <stdint.h>
#include <cstddef>
union axilite_reg_status_t {
uint32_t value;
......@@ -27,4 +28,14 @@ union reg_doorbell_t {
};
};
template<size_t N, typename T = uint32_t>
struct Rtds2GpuMemoryBuffer {
static constexpr size_t valueCount = N;
static constexpr size_t dataOffset = offsetof(Rtds2GpuMemoryBuffer, data);
static constexpr size_t doorbellOffset = offsetof(Rtds2GpuMemoryBuffer, doorbell);
T data[N];
reg_doorbell_t doorbell;
} __attribute__((packed));
#endif // REGISTER_TYPES_H
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