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

ips/dma: rename pingpong to memcpy and always connect loopback

This commit is contained in:
Daniel Krebs 2018-05-15 17:18:05 +02:00
parent c818c242f3
commit 8f3833bc73
3 changed files with 9 additions and 3 deletions

View file

@ -55,7 +55,7 @@ public:
bool readComplete()
{ return hasScatterGather() ? readCompleteSG() : readCompleteSimple(); }
bool pingPong(const MemoryBlock& src, const MemoryBlock& dst, size_t len);
bool memcpy(const MemoryBlock& src, const MemoryBlock& dst, size_t len);
inline bool
hasScatterGather() const

View file

@ -132,8 +132,14 @@ Dma::reset()
bool
Dma::pingPong(const MemoryBlock& src, const MemoryBlock& dst, size_t len)
Dma::memcpy(const MemoryBlock& src, const MemoryBlock& dst, size_t len)
{
if(len == 0)
return true;
if(not connectLoopback())
return false;
if(this->read(dst, len) == 0)
return false;

View file

@ -55,7 +55,7 @@ Test(fpga, dma, .description = "DMA")
cr_assert(len == lenRandom, "Failed to get random data");
/* Start transfer */
cr_assert(dma.pingPong(src.getMemoryBlock(), dst.getMemoryBlock(), len),
cr_assert(dma.memcpy(src.getMemoryBlock(), dst.getMemoryBlock(), len),
"DMA ping pong failed");
/* Compare data */