Initializing a ram from file-- problem??

Joined
Nov 13, 2008
Messages
1
Reaction score
0
hi,
I am writing a lookup table for float point numbers in vhdl using vhdl-2006 float point library.
I use a ram to store the data:
type RamType is array (INTEGER range <>, natural range <>) of float32;
I initialize my ram it from a file:
impure function InitRamFromFile (RamFileName : in string) return RamType is

FILE RamFile : text is in RamFileName;
variable RamFileLine : line;
variable temp_real : real;
begin
for I in RamType'range loop
readline (RamFile, RamFileLine);
read (RamFileLine, temp_real)
…..
….
….
--and then I convert the real numbers to float32
--……..
end loop;
return RAM;
end function;

the problem is that my code works fine in modelsim but when I want to synthesis it by synplify it says that:
@E: CD300 :"C:\FloatLibrary\LookUpTable.vhd":59:46:59:46|Call to procedure without body
This error points to “read (RamFileLine, temp_real)” function.
When I change the type of the temp_real variable from real to integer then the synthesizer works fine.
I think the problem is to read real numbers from file
Do you know how to solve this problem??
 

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

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top