03-31-2016 12:54 PM
04-04-2016 02:30 AM
Dear all,
Here is the solution to above mentioned problem.
Just flush the cache the cache memory beforing invoking your dma to read the data.
Xil_DCacheFlush();
For me it is working fine "till now".
With Regards
04-03-2016 09:09 AM
04-04-2016 02:30 AM
Dear all,
Here is the solution to above mentioned problem.
Just flush the cache the cache memory beforing invoking your dma to read the data.
Xil_DCacheFlush();
For me it is working fine "till now".
With Regards
04-05-2016 04:17 PM
It's not clear why you are trying to deal with the cache on your own. Are you having some sort of issue?
Altough I have not looked at it recently, the lwip driver used to handle cache issues. For example, in the 2014.2 version, there is a file:
C:\Xilinx\SDK\2014.2\data\embeddedsw\ThirdParty\sw_services\lwip140_v2_1\src\contrib\ports\xilinx\netif\xemacpsif_dma.c
In emacps_recv_handler(), on line 341 you will find:
Xil_DCacheInvalidateRange((unsigned int)p->payload, (unsigned)XEMACPS_MAX_FRAME_SIZE);
and on line 192 in emacps_sgsend you will see:
Xil_DCacheFlushRange((unsigned int)q->payload, (unsigned)q->len);
You are only solving half the problem and not very efficiently since you flush the entire D-cache.
I believe the Xilinx driver is also unncessaryily invalidating the entire XEMACPS_MAX_FRAME_SIZE instead p->len. Xil_DCacheInvalidateRange and Xil_DCacheFlushRange had bugs that may or may not have been fixed (I'm guessing not).
07-04-2017 12:47 PM
Dear vidyut,
First of all, I would like to thank your for sharing your solution.
I have exactly your situation. My application use UDP instead of TCP. In PS side; UDP callback function received payload, and store it in memory DDR3. I used memcpy() function to do that. In PL side; VDMA used to read payload from DDR3.
There are multiple questions, and I hope you can answer:
- In UDP callback function, after receive payload, and store it in DDR3, I will use Xil_DCacheFlush(). Is that right ?
- Did you find better solution than ?
- Have try to change gcc optimization level into (-o2) as recommended in (xapp1026.pdf). If yes then did you see any changes in performance ?
Best Regards,
tsharif