title: VHDL file reading program shows an error
body: <p>I was writing a vhdl code to read the image file. I converted the image file into a note pad file having 65536 lines.ie,256 X 256 pixels. Now when I am running the code I am getting a error that says:</p>
  
  <pre><code>Fatal error in ForLoop loop at C:/MentorGraphics/modeltech_6.5c/win32/test.vhd line 39
  # HDL call sequence:
  # Stopped at C:/MentorGraphics/modeltech_6.5c/win32/test.vhd 39 ForLoop loop
  </code></pre>
  
  <p>why it is happening like that.. I am attaching the code below:</p>
  
  <pre><code>library IEEE;
  use IEEE.STD_LOGIC_1164.ALL;
  use IEEE.STD_LOGIC_ARITH.ALL;
  use IEEE.STD_LOGIC_UNSIGNED.ALL;
  use std.textio.all;
  
  entity IMAGE_READ is
  Port ( CLK : in  STD_LOGIC;
  IMAGE_LOAD : IN  STD_LOGIC:='1';
  IMAGE_DONE : OUT  STD_LOGIC);
  end entity;
  
  architecture Behavioral of IMAGE_READ is
  type image is array (1 to 256,1 to 256) of std_logic_vector(7 downto 0);
  file IMAGE_FILE:text open read_mode is "D:\Documents\ORIGINAL IMAGE.txt";
  
  begin
  PROCESS(CLK,ROW,COLUMN,IMAGE_LOAD)
  variable LINE_NUMBER:line;
  variable TEMP_PIXEL_VALUE: bit_vector(7 downto 0);
  variable image_matrix:IMAGE;
  
  BEGIN
  if (clk'event and clk = '1') then 
  
  IF(IMAGE_LOAD='1') THEN
  for i in 1 to 256 loop
  for j in 1 to 256 loop
      readline (IMAGE_FILE, LINE_NUMBER);           
      read (LINE_NUMBER, TEMP_PIXEL_VALUE);                 
      image_matrix(i,j) := to_stdlogicvector(TEMP_PIXEL_VALUE);
          if(i=256 and j=256) then
              TEMP_image_done:='1';
              image_done&lt;='1';
          else
              TEMP_image_done:='0';
              image_done&lt;='0';
          end if;
  END LOOP;
  END LOOP;
  END IF;
  
  END IF;
  END PROCESS;
  
  end Behavioral;
  </code></pre>
  
  <p>How to correct it?</p>