Commit bae7206d authored by Daniel Krebs's avatar Daniel Krebs
Browse files

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

parent 3ee7e073
......@@ -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
......
......@@ -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;
......
......@@ -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 */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment