mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-23 00:00:01 +01:00

Using CUDA, memory can be allocated on the GPU and shared to peers on the PCIe bus such as the FPGA. Furthermore, the DMA on the GPU can also be used to read and write to/from other memory on the PCIe bus, such as BRAM on the FPGA.
16 lines
319 B
C++
16 lines
319 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <cuda_runtime.h>
|
|
|
|
namespace villas {
|
|
namespace gpu {
|
|
|
|
__global__ void
|
|
kernel_mailbox(volatile uint32_t *mailbox, volatile uint32_t* counter);
|
|
|
|
__global__ void
|
|
kernel_memcpy(volatile uint8_t* dst, volatile uint8_t* src, size_t length);
|
|
|
|
} // namespace villas
|
|
} // namespace gpu
|