Strange VHDL Error

Nov 12, 2007 5 Replies

Hi



I have a simple package that looks as follows:



library IEEE; use IEEE.std_logic_1164.all; use IEEE.std_logic_arith.all;


package RISC_Pkg is



-- Clock type subtype T_clk is std_logic;



-- Reset type subtype T_rst is std_logic;



subtype T_PIPE_REG_CTRL is std_logic;



subtype T_PREG_FE_DC_dest_pi is unsigned(7 downto 0); subtype T_FLAG_PREG_FE_DC_dest_pi is std_logic; subtype T_DATABUS_FE_DC_dest_pi is unsigned(7 downto 0); subtype T_FLAGBUS_FE_DC_dest_pi is std_logic;



.....



subtype T_DATABUS_data_mem is unsigned(31 downto 0); subtype T_FLAGBUS_data_mem is std_logic;



end package RISC_Pkg;



When I am running it with Modelsim I get the following error:



Package_LTRISC32ca_gen.vhd(355): near "package": expecting: ';'



But there is clearly a semicolon at "end package LTRISC32ca_PKG". I havent forgotten any semicolons in between? Anyone an idea what the issue could be?



Many thanks!



Just found the error, I just have to leave out the package in the end then it works.

end RISC_Pkg;

Cheers!

Maybe just use "end package;" instead of "end package RISC_Pkg;"?

Thanks for your answer Dave. The problem is, that I am using Modelsim

5.7 and that I have a tool that is compatible with Modelsim 6.1.

In other words, I have to do a lot of work by hand so that it works with the older Modelsim version.

The tool outputs

component TEST is

whereas the older Modelsim just accepts

component TEST

so there are some issiues. Anyone an idea for a workaround? Or do I have to right a PERL script that parses me the VHDL file and corrects it accordingly?

Many thanks!

You are using VHDL93 syntax with VHDL87, try vcom -93 xx.vhd

Hans

formatting link

Or in the project.mpf file, in the [vcom] section, add or uncomment the line: VHDL93 = 1

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required