Just tried both the original and the modified version in the Cadence
simulator and both compiled and ran without any problems, and produced
the right output - "s1" and "s0" respectively.

 

________________________________

From: [email protected] [mailto:[email protected]]
On Behalf Of Kevin Steffensen
Sent: 21 December 2010 17:03
To: [email protected]
Subject: Re: [Ghdl-discuss] crash in GHDL 0.29 : printing an enumerated
value

 

That's not legal VHDL.  I'm pretty sure what you mean is this :

entity hello is
end;

architecture bug of hello is
 type state_type is (s0,s1);

 signal state : state_type;
 
begin
 stim : process
 begin
   report state_type'image(state);
   wait;
 end process stim;
end bug;


I'm uncertain whether you can use the 'image attribute on enumerated
types. I would expect that a 'to_string' conversion function is needed
if you use anything other than the std_logic types. I don't know how to
tie such a function to the 'image attribute.


Regards,
Kevin



________________________________

Date: Tue, 21 Dec 2010 16:20:21 +0100
From: [email protected]
To: [email protected]
Subject: [Ghdl-discuss] crash in GHDL 0.29 : printing an enumerated
value

Hello

I found a bug in GHDL (crash). I thing this should be legal (or?)

entity hello is
end;

architecture bug of hello is
 type state_type is (s0,s1);
begin
 stim : process
 begin
   report state_type'image(s1);
   wait;
 end process stim;
end bug;

GHDL 0.29 (20100109) [Sokcho edition]
Compiled with GNAT Version: 4.4.1 20090725 (Red Hat 4.4.1-2)
GCC back-end code generator

Sorry for not using GNA bug report site.

Thx for your impressive work !
JCLL 
_______________________________________________ Ghdl-discuss mailing
list [email protected] https://mail.gna.org/listinfo/ghdl-discuss 

_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss

Reply via email to