cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
10,328 Views
Registered: ‎04-05-2016

Slow copy from BRAM (Cached) to DDR3 (Periph)

Hi,

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. 

 

Regards

0 Kudos
6 Replies
Highlighted
Visitor
Visitor
10,311 Views
Registered: ‎04-05-2016

Re: Slow copy from BRAM (Cached) to DDR3 (Periph)

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...

 

0 Kudos
Highlighted
Anonymous
Not applicable
10,301 Views

Re: Slow copy from BRAM (Cached) to DDR3 (Periph)

Hi,

 

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.

0 Kudos
Highlighted
Visitor
Visitor
10,247 Views
Registered: ‎04-05-2016

Re: Slow copy from BRAM (Cached) to DDR3 (Periph)

 

Standalone software stack, with microblaze implementing the memcpy/memmove functions. A screenshot of relevent part is attached. I am using DMA. 

system.jpg
0 Kudos
Highlighted
Visitor
Visitor
10,238 Views
Registered: ‎04-05-2016

Re: Slow copy from BRAM (Cached) to DDR3 (Periph)

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... 

0 Kudos
Highlighted
Anonymous
Not applicable
10,207 Views

Re: Slow copy from BRAM (Cached) to DDR3 (Periph)

Sounds right,

 

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.

 

HTH

0 Kudos
Highlighted
Visitor
Visitor
10,128 Views
Registered: ‎04-05-2016

Re: Slow copy from BRAM (Cached) to DDR3 (Periph)

Hi,

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.

0 Kudos