Tricky
Guest
Fri Mar 05, 2010 8:16 pm
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?
Jonathan Bromley
Guest
Fri Mar 05, 2010 8:16 pm
On Fri, 5 Mar 2010 10:16:13 -0800 (PST), Tricky <trickyhead_at_gmail.com>
wrote:
Quote:
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
Tricky
Guest
Sat Mar 06, 2010 1:34 am
On Mar 5, 6:32 pm, Jonathan Bromley <jonathan.brom...@MYCOMPANY.com>
wrote:
Quote:
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
Kenn Heinrich
Guest
Sat Mar 06, 2010 4:24 am
Tricky <trickyhead_at_gmail.com> writes:
Quote:
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
Quote:
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
--
Tricky
Guest
Sat Mar 06, 2010 11:32 am
On Mar 6, 3:24 am, Kenn Heinrich <kwhei...@uwaterloo.ca> wrote:
Quote:
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
Tricky
Guest
Mon Mar 08, 2010 4:01 pm
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.