vtomic85
Newbie level 1
Hi!
I want to read two integer values from a .txt file named "entry.txt", which is located in the project folder, with all of the .vhd files.
When I start the simulation, I get a fatal error: "TEXTIO: Read past end of file "entry.txt"", in the line with the first readline command. My file contains two integers (one in the first line and the other one in the second line), and in the code you can see that I try to read two integers and nothing else.
What could be the problem?
I want to read two integer values from a .txt file named "entry.txt", which is located in the project folder, with all of the .vhd files.
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 -- ... variable inline : line; file inputFile : text open read_mode is "entry.txt"; variable mynum: integer; variable stdmynum: std_logic_vector (N-1 downto 0); -- ... readline(inputFile,inline); read(inline,mynum); stdmynum:= std_logic_vector(to_signed(mynum, stdmynum'length)); mem(0) := stdbroj; readline(inputFile,inline); read(inline,mynum); stdmynum:= std_logic_vector(to_signed(mynum, stdmynum'length)); mem(1) := stdbroj; -- ...
When I start the simulation, I get a fatal error: "TEXTIO: Read past end of file "entry.txt"", in the line with the first readline command. My file contains two integers (one in the first line and the other one in the second line), and in the code you can see that I try to read two integers and nothing else.
What could be the problem?
Last edited: