UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
5,149 Views
Registered: ‎07-14-2010

DMA ACP data transfer

Jump to solution

Hi all

I am creating a design to test data transfere using Zynq ACP port the design is simply a loop back using axi data FIFO through DMA in poll mode, Ii wrote a c code in the SDK to send a 10 element array and wait untill the axi dma is not busy, then readthe data from DMA and wait untill the DMA finish the print the result, the problem is that when i print the received array i find that the data is not completly recieved,some elements has the correct values and the others shows dummy data

0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
8,605 Views
Registered: ‎07-14-2010

Re: DMA ACP data transfer

Jump to solution

I found the solution, after i changed the destination array type to static I can see the correct recieved data, but i dont know why

0 Kudos
2 Replies
Adventurer
Adventurer
8,606 Views
Registered: ‎07-14-2010

Re: DMA ACP data transfer

Jump to solution

I found the solution, after i changed the destination array type to static I can see the correct recieved data, but i dont know why

0 Kudos
Scholar ronnywebers
Scholar
4,016 Views
Registered: ‎10-10-2014

Re: DMA ACP data transfer

Jump to solution

I think the 'static' has nothing to do with your problem.

 

It looks like you have a cache coherence problem :

 

* before you transfer the array 'A', you should indeed Flush this range

* however, there's no need to flush the range of the 'Result' array before the DMA transfer

 

so this is sufficient before you kick off the transfer :

 

Xil_DCacheFlushRange((unsigned int)A,dma_size);

 

afterthe DMA completes, you should however 'invalidate' the Result buffer to make sure you're not looking at wrongly cached results :

 

Xil_DCacheInvalidateRange((u32)(&Result), sizeof(Result));

for(i=0;i<=9;i++)
{
printf("Result =%f\n\r",Result[i]);

}

 

 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **