cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vinogradov_rus
Adventurer
Adventurer
7,008 Views
Registered: ‎10-13-2015

memcpy problem with Zynq

Hi,

 

I'm using SDK 2015.1 and have a problem with memcpy() with Zynq SoC

 

If I want to copy

 

src=0x4000 04ba - AXI MIG memory
DST = 0x0020 0030  - PS DDR3 memory
LEN = 1460
memcpy(DST,SRC,LEN);

System fault in Xil_DataAbortHandler. It occures because of unaligned AXI DDR3 addr. So next I write some wrapper, which check src addr, align it to 4 and then I launch

 

 

src=0x4000 04bC // Aligned to 4 
DST = 0x0020 0032  // Aligned to 2
LEN = 1460 // Left the same to exclude length problem
memcpy(DST,SRC,LEN);

And now the same problem is with DST addr. It isn't alligned and application falls down.

I can use memmove or just for-loop to reduce this problem, but it fall down the speed.

 

What's the right way to solve this problem?

 

 

0 Kudos
Reply
0 Replies