Synthesizing error!!

Joined
Apr 21, 2008
Messages
1
Reaction score
0
Hi everybody,
I want to read a text file which contains lots of real numbers. I write a function for read these values and replace them to real_vector. The function works well with ModelSim.
Text File
Code:
732.39	1
44.04	55.0
72.04	90.0
87.04	50.0
157.12	55.0
160.10	55.0
175.10	55.0
185.12	90.0
200.12	50.0
203.10	55.0
270.21	55.0
289.14	55.0
298.21	90.0
304.14	55.0
313.21	50.0
332.14	55.0
Function
Code:
function readfile(lncount: integer) return real_vector is
	 variable expspec: real_vector (1 to lncount-1);
	 variable charge: real;
    variable precursormass: real;
	 variable pos: integer:=1;
	 file myfile:text open read_mode is "c:/testSpectrum";
	 variable liinee: line;
begin
	readline(myfile,liinee);
   read(liinee,precursormass);
   read(liinee,charge);
   while not endfile(myfile) loop
		readline(myfile,liinee);
      read(liinee, expspec(pos));
      pos:=pos+1;
   end loop;
	return expspec;
end readfile;

but when synthesizing my function called readfile gives me error like that:
ERROR:Xst:1924 - "C:/Users/Engin/PTMpredictor/PTMpredictor.vhd" line 117: Line <liinee> has illegal bit value "7".
I'm almost new in vhdl and I can't understand why it gives me error? Can someone help me?
 
Joined
Apr 25, 2007
Messages
4
Reaction score
0
As far as I know, the TextIO package (which includes readline, read, etc) is for simulation only. It cannot be synthesized.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top