title: Reading .hex file in VHDL
body: <p>I'm trying to read an intel .hex file using the following VHDL code snippet. My synthesizer is having a problem with the part of the code that is supposed to check for and discard the ':' character at the start of a line. The synthesis tool gives this error "Call to procedure without body" (line marked with comment). I have never seen this error and don't know what it means. Is there a solution for this error (or an alternate way to discard the ':' character)?</p>
  
  <pre><code>function Load_Data(constant x: in integer) return ROM_Data is
      use std.textio.all;
      use ieee.std_logic_textio.all;
  
      file ROMFILE: TEXT open READ_MODE is "IIU_Code.hex";
  
      variable newline: line;
      variable newchar: character;
      variable newbyte: std_logic_vector(7 downto 0);
      variable newword: std_logic_vector(15 downto 0);
  
      variable NextAddr, ByteCount: integer;
      variable NewROM: ROM_Data := (others =&gt; (others =&gt; '0'));
      variable valid: boolean := True;
  begin
      while (valid) loop
          readline(ROMFILE, newline);
          read(newline,newchar,valid);                      --ERROR HERE!!!
          if (newchar = ':') and (valid = True) then
              hread(newline,newbyte);
              ByteCount := to_integer(unsigned(newbyte));
              hread(newline,newword);
              NextAddr := to_integer(unsigned(newword));
              hread(newline,newbyte);
              if newbyte = X"01" then     --check for EOF marker
                  valid := False;
              end if;
              for i in 1 to ByteCount loop
                  hread(newline,newbyte);
                  NewROM(NextAddr) := newbyte;
                  NextAddr := NextAddr + 1;
              end loop;
          end if;
      end loop;
  
      file_close(ROMFILE);
      return NewROM;
  end;
  </code></pre>