Hi,
currently I'm trying to synthesize a project (including a ROM) on a Spartan3
FPGA.
I've to initialize the ROM with a text file (from a Sys-C Co-simulation).
Unfortunatelly the initialization seems not to work using the synplify compiler.
The VHDL code I'm using is quite similar to this (see also _www_.xilinx.com/itp/xilinx8/books/data/docs/xst/xst0027_5.html#wp657988 - Initializing RAM from an External File):
Alltough it compiles and works fine simulating with Modelsim, I can't
compile it with Synplify.
The compiler always quits with the error message "@E:CD541 Expecting ;".
The concerned line is "FILE RomFile : text is in RomFileName;". However, the
syntax is OK.
My first intention was, that the synplify compiler is not able to work with
such a VHDL87 language construct. Nevertheless changing to syntax to
VHDL93 doesn't help.
Any ideas? Thanks!
currently I'm trying to synthesize a project (including a ROM) on a Spartan3
FPGA.
I've to initialize the ROM with a text file (from a Sys-C Co-simulation).
Unfortunatelly the initialization seems not to work using the synplify compiler.
The VHDL code I'm using is quite similar to this (see also _www_.xilinx.com/itp/xilinx8/books/data/docs/xst/xst0027_5.html#wp657988 - Initializing RAM from an External File):
Code:
architecture rtl of rom_vhdl is
type RomType is array(0 to 7) of bit_vector(31 downto 0);
impure function InitRomFromFile (RomFileName : in string) return RomType is
FILE RomFile : text is in RomFileName;
variable RomFileLine : line;
variable ROM : RomType;
begin
for I in RamType'range loop
readline (RamFile, RamFileLine);
read (RamFileLine, RAM(I));
end loop;
return ROM;
end function;
signal ROM : RomType := InitRomFromFile(a_generic_file_name);
begin
...
end rtl;
Alltough it compiles and works fine simulating with Modelsim, I can't
compile it with Synplify.
The compiler always quits with the error message "@E:CD541 Expecting ;".
The concerned line is "FILE RomFile : text is in RomFileName;". However, the
syntax is OK.
My first intention was, that the synplify compiler is not able to work with
such a VHDL87 language construct. Nevertheless changing to syntax to
VHDL93 doesn't help.
Any ideas? Thanks!