Mar 23, 2013 #1 P praveenvanaparthy Newbie level 6 Joined Jun 19, 2011 Messages 14 Helped 3 Reputation 6 Reaction score 3 Trophy points 1,283 Activity points 1,376 hi .. i have a problem of read&write text/doc files in verilog. i want to read in.txt file and write the data into out.txt . am using $readmemb("in.txt",w); and $fopenr("in.txt"); and for writing i open a file=$fopen("out.txt"); the program shows errors. am write one separate prog for reading, its working. but i didn't get how to write the same data into other file. could you give some suggestions and examples.
hi .. i have a problem of read&write text/doc files in verilog. i want to read in.txt file and write the data into out.txt . am using $readmemb("in.txt",w); and $fopenr("in.txt"); and for writing i open a file=$fopen("out.txt"); the program shows errors. am write one separate prog for reading, its working. but i didn't get how to write the same data into other file. could you give some suggestions and examples.
Mar 23, 2013 #2 D dave_59 Advanced Member level 3 Joined Dec 15, 2011 Messages 838 Helped 365 Reputation 734 Reaction score 360 Trophy points 1,353 Location Fremont, CA, USA Activity points 7,369 If you are just looking to read in a memory and then write it out, use $readmemb("in.txt",w); $writememb("out.txt",w); If you are getting errors, you need to tell people exactly what those errors are for people to help you.
If you are just looking to read in a memory and then write it out, use $readmemb("in.txt",w); $writememb("out.txt",w); If you are getting errors, you need to tell people exactly what those errors are for people to help you.