![]() |
|
|
|
#1 |
|
Hi All,
I am trying to access text files with binary data in it using the TEXTIO package, but i get errors saying cant access files or file does not exist...below is the copy of the program i am using, please correct me if i am doing anything wrong: USE WORK.TEXTIO.ALL; ENTITY square IS PORT( go : IN std_logic); END square; ARCHITECTURE simple OF square IS BEGIN PROCESS(go) FILE infile : TEXT IS IN "/1.txt"; FILE outfile : TEXT IS OUT "/2.txt"; VARIABLE out_line, my_line : LINE; VARIABLE int_val : INTEGER; BEGIN WHILE NOT( ENDFILE(infile)) LOOP -- read a line from the input file READLINE( infile, my_line); -- read a value from the line READ( my_line, int_val); if(int_val='0') THEN int_val := '1'; elsif(int_val='1') THEN int_val := '0'; else int_val := '0'; end if; -- write the changed value to the line WRITE( out_line, int_val); -- write the line to the output file WRITELINE( outfile, out_line); END LOOP; END PROCESS; END simple; strykaar |
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Convert Video files to PSP | ivan | DVD Video | 4 | 06-17-2008 11:16 AM |
| How to copy *.vob files on DVD to the hard disk and merge them together | zengpeiwen1719 | Software | 0 | 05-24-2008 10:33 AM |
| Convert Video files to MP4 for iPod | ivan | DVD Video | 0 | 04-26-2006 08:38 AM |
| Very slow recognising DVD disc | Terry Pinnell | DVD Video | 1 | 03-28-2006 06:53 PM |
| Now I introduce some popular software of multimedia | eightsome@gmail.com | DVD Video | 0 | 03-28-2006 02:29 PM |