04-05-2016 07:44 AM
I am using the lwip design, given in bist project of VC707, to transfer a 2GB hex file to fpga. The project uses DMA that has been connected to cached BRAM. So, the received packets lie in BRAM. Now, I want to copy data from each received packet to a DDR3, that is connected to peripheral AXI.
Microblaze is cloked at 100MHz.
I receive data at 4.7 MBytes/sec.
I have tried both memcopy and memmove. Both give nearly same speed of about 1.5 MBytes/sec.
When I connect DDR3 to Cache AXI interconnect, the speed increases a bit (about 2 MBytes/sec. )
I cannot connect DDR3 to Cache AXI interconnect, because then I won't be able to use 2GB DDR3.This speed is quite slow :(
Please help me. How can I accelerate the speed.
04-05-2016 08:41 AM
The hex file is sent as 1KB data packets.
Even if I don't do anything with received tcp/ip packets, the file still gets transmitted at about 4.7 MBytes/sec. I have completely copied the bist project design in block diagram as well and sdk. I do not know where the problem lies...
04-05-2016 09:32 AM
Linux or standalone sotfware stack? What is the implementation of memcpy and memmove - do they back onto your DMA peripheral or is the processor implementing them? If it is the latter, you are bottlenecked by microblaze itself. You need to rearchitect such that microblaze only sets up the DMA transaction, and a DMA peripheral does the bulk copy for you. Are you using the AXI CDMA peripharal? This it probably the right IP. A screenshot of your architecture would also help.
04-06-2016 12:27 AM
Standalone software stack, with microblaze implementing the memcpy/memmove functions. A screenshot of relevent part is attached. I am using DMA.
04-06-2016 02:01 AM
If I use a simple c loop to copy data in chunks of 8 bytes (u64), the transfer speed is MUCH better (about 2.7 MB/s). Perhaps memcpy/memmove transfer byte by byte...
04-06-2016 09:33 AM
Is that fast enough yet?
You only have DMA for your ethernet, you don't have DMA for your memcpy. If you add CDMA hardware for the memcpy, you should be able to get even faster by having mb setup bulk DMA transactions and let the DMA engine do it all for you.
04-07-2016 03:33 AM
Thanks a lot pete_128. You are right. These memcpy/memmove functions, if implemented by microblaze, perform poorly. I am now able to get transmission to about 3.4 MB/s. Still less than what I had hoped for. But I cannot get more than ~4.7 MB/s anywas... So, I will have to live with it.
Thanks a lot again for your time and kind guidance. I really appreciate it :) Stay blessed.