reading_from_file : process ( IN_GLOBAL_RESET , IN_CLOCK ) is
file text_file : text open read_mode is "C:\some_file.txt" ;
variable current_line : line ;
variable incoming_data : integer ;
variable data_coutner : integer := 0 ;
begin
if IN_GLOBAL_RESET = '1' then
data <= ( others => '0' ) ;
elsif rising_edge ( IN_CLOCK ) then
if not endfile ( text_file ) then
if data_coutner = 0 then
readline ( text_file , current_line ) ;
end if;
read ( current_line , incoming_data ) ;
data <= std_logic_vector ( to_unsigned ( incoming_data , data ' length ) ) ;
data_coutner := ( data_coutner + 1 ) rem 4 ;
end if ;
end if ;
end process reading_from_file ;