Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FAST DMA transfer + slow file saving problem...any solution

Status
Not open for further replies.

syedshan

Advanced Member level 1
Joined
Feb 27, 2012
Messages
463
Helped
27
Reputation
54
Reaction score
26
Trophy points
1,308
Location
Jeonju, South Korea
Activity points
5,134
hello every one

I am transferring DMA data from FPGA using PCIe which is VERY fast(using c++), and I need to take them and store in .text file, now if I save them normally it takes LOADS of time, hence the benefit of DMA dies completely.

Hence then the solution that comes to my mind is the threads...but I dont have much idea about how to use the threads such that I can save files simultaneously + take new data. I think I need to open and close many files at a time, allocate memory locations etc. and then free them and close files so that PC does not get hanged.

Example tested CASE

When I save files in binary the time it takes is 0.5 seconds for 512 DMA transfers (hence 512 files) while when I do same with the .txt file (without threading), the time it takes for complete process is 15 seconds. Hence I am able to completely draw data from FPGA, but need to make the system faster now.

Any idea would be appreciable. Please see the image for what I am trying to tell
thread_somehing.JPG

thanks
Shan
 

Try saving all of your data in binary, then when all transfers are complete, then convert the binary files to .txt files...
Not sure why it takes so much time to convert binary to text...
 

:O

this is what I am doing now. and my limitation is to reduce time at all cost hence I need time reduction technique and also I cannot stop data coming from the back (from DMA)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top