BilalM
Newbie
First of all, thank you so much for your help.
I need to read data (0's and 1's) from an external file, even a (Matlab) or text file for my testbench.
I tried to do so using the textio package, but I get this error "(vcom-1600) No feasible entries for subprogram "READ""
I am not expert in VHDL, please help me with this issue
here is the part from the testbench where I use the textio package:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_TEXTIO.ALL;
USE IEEE.NUMERIC_STD.ALL;
LIBRARY WORK;
USE WORK.mem_types.ALL;
LIBRARY STD;
USE STD.TEXTIO.ALL;
--read from file--------------
File fin: TEXT OPEN READ_MODE IS "codeword.txt";
variable current_read_line: line; --current_read_line
variable current_read_field: B(34 downto 0); --current_read_field
begin
while (not endfile(fin)) loop
readline(fin,current_read_line);
read(current_read_line,current_read_field);
in1 <= current_read_field;
end loop;
------------------------------
B is declared as
TYPE B1 IS ARRAY (7 downto 0) of STD_LOGIC;
TYPE B IS ARRAY (NATURAL RANGE <>) of B1;
Thank you so much for your time
I need to read data (0's and 1's) from an external file, even a (Matlab) or text file for my testbench.
I tried to do so using the textio package, but I get this error "(vcom-1600) No feasible entries for subprogram "READ""
I am not expert in VHDL, please help me with this issue
here is the part from the testbench where I use the textio package:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_TEXTIO.ALL;
USE IEEE.NUMERIC_STD.ALL;
LIBRARY WORK;
USE WORK.mem_types.ALL;
LIBRARY STD;
USE STD.TEXTIO.ALL;
--read from file--------------
File fin: TEXT OPEN READ_MODE IS "codeword.txt";
variable current_read_line: line; --current_read_line
variable current_read_field: B(34 downto 0); --current_read_field
begin
while (not endfile(fin)) loop
readline(fin,current_read_line);
read(current_read_line,current_read_field);
in1 <= current_read_field;
end loop;
------------------------------
B is declared as
TYPE B1 IS ARRAY (7 downto 0) of STD_LOGIC;
TYPE B IS ARRAY (NATURAL RANGE <>) of B1;
Thank you so much for your time