- 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??
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??