FPGA Groups

FPGA Groups (http://www.fpgacentral.com/group/index.php)
-   FPGA (http://www.fpgacentral.com/group/forumdisplay.php?f=14)
-   -   Strange VHDL Error (http://www.fpgacentral.com/group/showthread.php?t=63190)

Sascha Frank 11-12-2007 03:55 PM

Strange VHDL Error
 
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!


Sascha Frank 11-12-2007 04:20 PM

Re: Strange VHDL Error
 
Sascha Frank wrote:

>
> When I am running it with Modelsim I get the following error:
>
> Package_LTRISC32ca_gen.vhd(355): near "package": expecting: ';'
>


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

end RISC_Pkg;

Cheers!

Dave 11-12-2007 04:32 PM

Re: Strange VHDL Error
 
On Nov 12, 9:55 am, Sascha Frank <[email protected]> wrote:
> 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!


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


Sascha Frank 11-12-2007 04:47 PM

Re: Strange VHDL Error
 

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


HT-Lab 11-12-2007 05:13 PM

Re: Strange VHDL Error
 

"Sascha Frank" <[email protected]> wrote in message
news:[email protected]
>
>> 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?


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

Hans
www.ht-lab.com




>
> Many thanks!
>




Duane Clark 11-12-2007 08:03 PM

Re: Strange VHDL Error
 
HT-Lab wrote:
> "Sascha Frank" <[email protected]> wrote in message
> news:[email protected]
>>> 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?

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


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


All times are GMT +1. The time now is 03:07 PM.

Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved