mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
rtds2gpu: add struct for memory layout of rtds2gpu buffer
This commit is contained in:
parent
98c98b6855
commit
0cdc05c3d5
1 changed files with 11 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue