mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
Merge pull request #694 from VILLASframework/update-fpga
update fpga submodule
This commit is contained in:
commit
5185c25ba7
3 changed files with 9 additions and 9 deletions
2
fpga
2
fpga
|
@ -1 +1 @@
|
|||
Subproject commit ce8612379de62f50a52e172fe8eaee924d5d8822
|
||||
Subproject commit 1cac3fafde6ef3098a145f9d5d936a2dc6b7d7c0
|
|
@ -14,6 +14,7 @@
|
|||
#include <villas/timing.hpp>
|
||||
|
||||
#include <villas/fpga/card.hpp>
|
||||
#include <villas/fpga/pcie_card.hpp>
|
||||
#include <villas/fpga/node.hpp>
|
||||
#include <villas/fpga/ips/dma.hpp>
|
||||
|
||||
|
|
|
@ -149,14 +149,13 @@ int FpgaNode::prepare()
|
|||
|
||||
auto &alloc = HostDmaRam::getAllocator();
|
||||
|
||||
auto memRx = alloc.allocate<uint32_t>(0x100 / sizeof(int32_t));
|
||||
auto memTx = alloc.allocate<uint32_t>(0x100 / sizeof(int32_t));
|
||||
const std::shared_ptr<villas::MemoryBlock> blockRx = alloc.allocateBlock(0x100 * sizeof(float));
|
||||
const std::shared_ptr<villas::MemoryBlock> blockTx = alloc.allocateBlock(0x100 * sizeof(float));
|
||||
villas::MemoryAccessor<float> memRx = *blockRx;
|
||||
villas::MemoryAccessor<float> memTx = *blockTx;
|
||||
|
||||
blockRx = std::unique_ptr<const MemoryBlock>(&memRx.getMemoryBlock());
|
||||
blockTx = std::unique_ptr<const MemoryBlock>(&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<uint32_t>(*blockRx);
|
||||
|
|
Loading…
Add table
Reference in a new issue