cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,649 Views
Registered: ‎04-26-2018

How to write data into txt file in SDK?

HEY GUYS

 

I've designed a simple design on a FPGA board, each time it write some data in DDR and i use uart in SDK to print data out using xil_printf. I reset the system every second, it overwrite the data in DDR and then i print it out in the console again.

 

So my problem is:

 

1. How can i write the data in a txt file on my computer, instead of copy it from the console.

 

2.Is there some function other than sleep(), so that i can set an delay less than a second?

 

it should be easy, i googled, but don't find an answer...

 

thanks in advance.

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
1,639 Views
Registered: ‎09-12-2007

How you copy the txt file from the PC to your DDR depends on what interface you have available.

Can you list them?

 

0 Kudos
Highlighted
Mentor
Mentor
1,630 Views
Registered: ‎02-24-2014

Use a serial communications program that will log the output from your serial port.   Kermit, Minicom, putty?    You could even use a python script to listen to the port, with the right python module.

Don't forget to close a thread when possible by accepting a post as a solution.
0 Kudos
Highlighted
Visitor
Visitor
1,614 Views
Registered: ‎04-26-2018

thanks for answering, the data was generated by hardware and i am reading it out through serial port.

0 Kudos
Highlighted
Visitor
Visitor
1,609 Views
Registered: ‎04-26-2018

thanks for the response, in fact i was wondering xilinx provided similar tools in SDK, how about question 2 ? is there some delay function other than sleep() that can set delay less than a second?
0 Kudos