D
Dkthechamp
Hi,
i am trying to read a txt file with binary strings as content but the
snippet written below reads only one line, wheras the txt file has
many entries. The "output" is of type std_logic_vector with the same
length of 's'.
Thanks in advance.
DK
-- snippet
FILE inFile : TEXT open read_mode is "tb.txt";
VARIABLE inLine : LINE;
VARIABLE s : std_logic_vector(159 downto 0);
begin
if(clock'event and clock='1') then
while (not endfile(inFile)) loop
readline(inFile, inLine);
read(inLine,s);
output <= s after 10 ns;
end loop;
end if;
i am trying to read a txt file with binary strings as content but the
snippet written below reads only one line, wheras the txt file has
many entries. The "output" is of type std_logic_vector with the same
length of 's'.
Thanks in advance.
DK
-- snippet
FILE inFile : TEXT open read_mode is "tb.txt";
VARIABLE inLine : LINE;
VARIABLE s : std_logic_vector(159 downto 0);
begin
if(clock'event and clock='1') then
while (not endfile(inFile)) loop
readline(inFile, inLine);
read(inLine,s);
output <= s after 10 ns;
end loop;
end if;