cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
s3s_elec
Participant
Participant
784 Views
Registered: ‎09-28-2018

General usage of udmabuf

Jump to solution
Using the Zynq(Z-7045) board and Petalinux 2016.2,
I'm creating a process to do DMA from PS to PL using udmabuf.
 
I'm sorry for the simple question...
Is memcpy() the fastest way to move data between source data address and udmabuf (CMA) address obtained by mmap()?
 
If there is a better way, please let me know.
 
After that I use CDMA with a setting that uses the CMA region as the source address and PL DDR as the destination address.
 
Thank you.
 
0 Kudos
1 Solution

Accepted Solutions
718 Views
Registered: ‎04-20-2017

As far as I remember having the same question the fastest was posix write(..) directly  to the opw  /dev/udmabuf device file descriptor

But there was not much difference to mmap+memcpy

Next fastest was 4byte ptr access

 

 

 

View solution in original post

4 Replies
719 Views
Registered: ‎04-20-2017

As far as I remember having the same question the fastest was posix write(..) directly  to the opw  /dev/udmabuf device file descriptor

But there was not much difference to mmap+memcpy

Next fastest was 4byte ptr access

 

 

 

View solution in original post

s3s_elec
Participant
Participant
654 Views
Registered: ‎09-28-2018

Hi juergen.kratochwill@grapho-metronic.com ,

 

Thank you for the useful information.

 

I try write() and compare it to mmap+memcpy() and choose the faster one.

 

Thanks!

0 Kudos
614 Views
Registered: ‎04-20-2017

did you find a significan difference?

0 Kudos
s3s_elec
Participant
Participant
608 Views
Registered: ‎09-28-2018

Hi juergen.kratochwill@grapho-metronic.com,

I'm sorry, I didn't report the results.

In my process, there didn't seem to be any big difference between the two.

I'm probably having a problem with my system, but I'm using write() because memcpy() sometimes causes my process to hang.

Thank you.

0 Kudos