From 568c009ca8290a73f49913a91c90dc65fc01f5d3 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Tue, 25 Jul 2023 17:44:22 +0200 Subject: [PATCH 1/3] update fpga submodule Signed-off-by: Niklas Eiling --- fpga | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpga b/fpga index ce8612379..7c262b5e6 160000 --- a/fpga +++ b/fpga @@ -1 +1 @@ -Subproject commit ce8612379de62f50a52e172fe8eaee924d5d8822 +Subproject commit 7c262b5e6ec75a4ff254ae38494457f99dff048b From 554515fe306f3545390012c586a54dfeb38e5086 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Tue, 25 Jul 2023 18:16:51 +0200 Subject: [PATCH 2/3] fix fpga node type to work with current fpga master Signed-off-by: Niklas Eiling --- include/villas/nodes/fpga.hpp | 1 + lib/nodes/fpga.cpp | 15 +++++++-------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/villas/nodes/fpga.hpp b/include/villas/nodes/fpga.hpp index e03f36e20..b76aa784e 100644 --- a/include/villas/nodes/fpga.hpp +++ b/include/villas/nodes/fpga.hpp @@ -14,6 +14,7 @@ #include #include +#include #include #include diff --git a/lib/nodes/fpga.cpp b/lib/nodes/fpga.cpp index 1462e7468..af884406e 100644 --- a/lib/nodes/fpga.cpp +++ b/lib/nodes/fpga.cpp @@ -149,14 +149,13 @@ int FpgaNode::prepare() auto &alloc = HostDmaRam::getAllocator(); - auto memRx = alloc.allocate(0x100 / sizeof(int32_t)); - auto memTx = alloc.allocate(0x100 / sizeof(int32_t)); + const std::shared_ptr blockRx = alloc.allocateBlock(0x100 * sizeof(float)); + const std::shared_ptr blockTx = alloc.allocateBlock(0x100 * sizeof(float)); + villas::MemoryAccessor memRx = *blockRx; + villas::MemoryAccessor memTx = *blockTx; - blockRx = std::unique_ptr(&memRx.getMemoryBlock()); - blockTx = std::unique_ptr(&memTx.getMemoryBlock()); - - dma->makeAccesibleFromVA(*blockRx); - dma->makeAccesibleFromVA(*blockTx); + dma->makeAccesibleFromVA(blockRx); + dma->makeAccesibleFromVA(blockTx); // Show some debugging infos auto &mm = MemoryManager::get(); @@ -176,7 +175,7 @@ int FpgaNode::_read(Sample *smps[], unsigned cnt) assert(cnt == 1); dma->read(*blockRx, blockRx->getSize()); // TODO: calc size - const size_t bytesRead = dma->readComplete(); + const size_t bytesRead = dma->readComplete().bytes; read = bytesRead / sizeof(int32_t); auto mem = MemoryAccessor(*blockRx); From 00d72982a07f9595c048601a65e31914700a7196 Mon Sep 17 00:00:00 2001 From: Niklas Eiling Date: Tue, 25 Jul 2023 18:26:49 +0200 Subject: [PATCH 3/3] update fpga to make ci happy Signed-off-by: Niklas Eiling --- fpga | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fpga b/fpga index 7c262b5e6..1cac3fafd 160000 --- a/fpga +++ b/fpga @@ -1 +1 @@ -Subproject commit 7c262b5e6ec75a4ff254ae38494457f99dff048b +Subproject commit 1cac3fafde6ef3098a145f9d5d936a2dc6b7d7c0