transferring a large amount of data

Questions and discussions about the Xillybus IP core and drivers

transferring a large amount of data

Postby Jason »

Hi there,
My name is Jason and I have one question about tranferring a large amount of data by using memwrite.
According to the document, I can only tranfer one word at a time with the command "./memwrite /dev/xillybus_mem_8 3 170.(for example)" However, if need to tranfer more than one word such as 256 words, do I need to type the command 256 times or write a simple script? Is there any other alternatives? Any suggestions would be highly appreciated!

Regards,
Jason
Jason
 
Posts: 2
Joined:

Re: transferring a large amount of data

Postby support »

Hello,

I suggest reading section 6.1 ("Seekable streams") in the Xillybus host application programming guide that applies to your operating system. The guide is available at the website's Documentation section.

To answer your question in short, you may modify the memwrite and memread example utilities so that they write more than one byte at a time. When multiple bytes are read or written, the first byte relates to the address given by lseek(), and the following bytes relate to the sequential addresses (sort-of autoincrement, or view the memory array as a file one can seek in). So set the address with lseek() and write those 256 bytes, and it will do what you probably wanted.

Regards,
Eli
support
 
Posts: 802
Joined:

Re: transferring a large amount of data

Postby Jason »

Hi Eli,
Thanks for the reply. I have modified the program based on your documentation and it ran smoothly! :D

Regards,
Jason
Jason
 
Posts: 2
Joined:


Return to Xillybus

cron