Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Am I breaking a rule?

Reply
Thread Tools

Am I breaking a rule?

 
 
Tricky
Guest
Posts: n/a
 
      03-05-2010
I have this setup in a file:

type pt is protected
end protected pt;

type pt is protected body
file ft : text;
end protected body pt;


When I compile it in modelsim I get the error: Unknown method "ft"
pointing at the end of the the protected type declaration.

Am I breaking a VHDL rule (ie. files cant be put inside protected
types) is it a modelsim bug?
 
Reply With Quote
 
 
 
 
Jonathan Bromley
Guest
Posts: n/a
 
      03-05-2010
On Fri, 5 Mar 2010 10:16:13 -0800 (PST), Tricky <>
wrote:

>I have this setup in a file:
>
>type pt is protected
>end protected pt;
>
>type pt is protected body
> file ft : text;
>end protected body pt;
>
>
>When I compile it in modelsim I get the error: Unknown method "ft"
>pointing at the end of the the protected type declaration.
>
>Am I breaking a VHDL rule (ie. files cant be put inside protected
>types) is it a modelsim bug?


Just guessing here, but... did you remember to
use std.textio.all;
to get the definition of "text"?

If that's the problem, then the error message is,
how shall we say, less than helpful...
--
Jonathan Bromley

 
Reply With Quote
 
 
 
 
Tricky
Guest
Posts: n/a
 
      03-05-2010
On Mar 5, 6:32*pm, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
> On Fri, 5 Mar 2010 10:16:13 -0800 (PST), Tricky <trickyh...@gmail.com>
> wrote:
>
> >I have this setup in a file:

>
> >type pt is protected
> >end protected pt;

>
> >type pt is protected body
> > *file ft *: text;
> >end protected body pt;

>
> >When I compile it in modelsim I get the error: Unknown method "ft"
> >pointing at the end of the the protected type declaration.

>
> >Am I breaking a VHDL rule (ie. files cant be put inside protected
> >types) is it a modelsim bug?

>
> Just guessing here, but... did you remember to
> * use std.textio.all;
> to get the definition of "text"?
>
> If that's the problem, then the error message is,
> how shall we say, less than helpful...
> --
> Jonathan Bromley


Yes I have included std.textio. Had the problem in 2 different files

Ill raise the issue with mentor
 
Reply With Quote
 
Kenn Heinrich
Guest
Posts: n/a
 
      03-06-2010
Tricky <> writes:

> I have this setup in a file:
>
> type pt is protected
> end protected pt;
>
> type pt is protected body
> file ft : text;
> end protected body pt;
>
>
> When I compile it in modelsim I get the error: Unknown method "ft"
> pointing at the end of the the protected type declaration.
>

When I use the following source code:
-- --------------------
use std.textio.all;
entity e is

end e;

architecture a of e is
type pt is protected
end protected pt;

type pt is protected body
file ft : text;
end protected body pt;
begin -- a
end a;
-- --------------------

I get a fatal internal error from

Model Technology ModelSim XE III vcom 6.4b Compiler 2008.11 Nov 15 2008
-- Loading package standard
-- Loading package textio
-- Compiling entity e
-- Compiling architecture a of e
** Fatal: Unexpected signal: 11.
** Error: rule.vhd(12): VHDL Compiler exiting

But I get no issues from a newer full blown version:

Model Technology ModelSim SE-64 vcom 6.5b Compiler 2009.05 May 21 2009
-- Loading package standard
-- Loading package textio
-- Compiling entity e
-- Compiling architecture a of e


> Am I breaking a VHDL rule (ie. files cant be put inside protected
> types) is it a modelsim bug?


You're allowed to declare files in a body. Looks like the latter.

- Kenn

--
 
Reply With Quote
 
Tricky
Guest
Posts: n/a
 
      03-06-2010
On Mar 6, 3:24*am, Kenn Heinrich <kwhei...@uwaterloo.ca> wrote:
> Tricky <trickyh...@gmail.com> writes:
> > I have this setup in a file:

>
> > type pt is protected
> > end protected pt;

>
> > type pt is protected body
> > * file ft *: text;
> > end protected body pt;

>
> > When I compile it in modelsim I get the error: Unknown method "ft"
> > pointing at the end of the the protected type declaration.

>
> When I use the following source code:
> -- --------------------
> use std.textio.all;
> entity e is
>
> end e;
>
> architecture a of e is
> * type pt is protected
> * *end protected pt;
>
> * type pt is protected body
> * * file ft *: text;
> * end protected body pt;
> begin *-- a
> end a;
> -- --------------------
>
> I get a fatal internal error from
>
> Model Technology ModelSim XE III vcom 6.4b Compiler 2008.11 Nov 15 2008
> -- Loading package standard
> -- Loading package textio
> -- Compiling entity e
> -- Compiling architecture a of e
> ** Fatal: Unexpected signal: 11.
> ** Error: rule.vhd(12): VHDL Compiler exiting
>
> But I get no issues from a newer full blown version:
>
> Model Technology ModelSim SE-64 vcom 6.5b Compiler 2009.05 May 21 2009
> -- Loading package standard
> -- Loading package textio
> -- Compiling entity e
> -- Compiling architecture a of e
>
> > Am I breaking a VHDL rule (ie. files cant be put inside protected
> > types) is it a modelsim bug?

>
> You're allowed to declare files in a body. Looks like the latter.
>
> *- Kenn
>
> --


I was using 6.4b. Ill upgrade to 6.5. Thanks Kenn
 
Reply With Quote
 
Tricky
Guest
Posts: n/a
 
      03-08-2010
Turns out it is almost a double bug. While at first it was a problem
with modelsim not accepting files in protected types, in 6.5+ the
following causes an error, confirmed by mentor:

1 library ieee;
2 use ieee.std_logic_1164.all;
3
4 library std;
5 use std.textio.all;
6
7 package p is
8
9 type data_file_t is file of character;
10
11 type stimulus_generation_t is protected
12 end protected stimulus_generation_t;
13
14 end package p;
15
16 package body p is
17
18 type stimulus_generation_t is protected body
19 file f_txt : text;
20 end protected body stimulus_generation_t;
21
22 end package body;

Because I have declared a file type previously, it conflicts now with
the f_txt in the protected type. The solution is to put the file type
declaration and the protected type into separate packages.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Breaking of Frames in Ethernet switch/Mux kedarpapte@gmail.com VHDL 0 01-10-2006 11:17 AM
network breaking =?Utf-8?B?RGFUaW1teWQ=?= Wireless Networking 2 11-22-2005 01:57 AM
Looking for a breaking news rss feed that really contains breaking news Amy XML 0 02-22-2005 06:31 PM
Breaking apart MBOX MJackson Perl 1 02-19-2004 08:50 PM
2 NATS breaking Citrix NFUSE? Joseph Finley Cisco 3 12-26-2003 01:21 AM



Advertisments