Hello,
My question is probably stupid, since I am a newbie in VHDL.
I am teaching myself VHDL by reading Peter Ashenden's book "The
Designer's Guide to VHDL." One thing in examples that does not compile
with GHDL is when a bit_vector aggregate is evaluated in a selected
signal assignment.
For instance, the following code:
entity ex21 is
port (
a, b : in bit;
q : out bit);
end entity ex21;
architecture behavioral of ex21 is
begin -- behavioral
with bit_vector'(a, b) select
q <=
'1' after 3.5 ns when "11",
'0' after 2.5 ns when "00",
unaffected when others;
end architecture behavioral;
should be valid, according to the book. But the bit_vector'(a, b)
raises an error in GHDL: "type mark is not a locally static subtype."
I strongly believe that it *is* a locally static subtype, but why
doesn't GHDL think so? (^_^)
Is this valid only in VHDL-2001, and not in VHDL-87 and VHDL-93? Or is
this a bug in GHDL?
Please give me light on this issue!
BTW, I am using GHDL version 0.25 (20060811), the one available in
Debian Sid.
And also, if I remove the "bit_vector'" type mark in the example above,
GHDL raises an exception:
******************** GHDL Bug occured ****************************
Please report this bug on http://gna.org/projects/ghdl
GHDL version: GHDL 0.25 (20060811) [Sokcho edition]
Compiled with GNAT Version: 4.1.220060729prerelease (Debian
In directory: /home/lenglet/public/devel/vhdl_book/
Command line:
/usr/lib/ghdl/libexec/gcc/i486-linux-gnu/4.1.1/ghdl1
-P/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v93/std/
-P/usr/lib/ghdl/lib/gcc/i486-linux-gnu/4.1.1/vhdl/lib/v93/ieee/ -quiet
-o chapter5.s chapter5.vhd
Exception TYPES.INTERNAL_ERROR raised
Exception information:
Exception name: TYPES.INTERNAL_ERROR
Message: sem_expr.adb:3044
Call stack traceback locations:
0xb7d83fbc 0xb7d84035 0xb7d849a6 0x8126945 0x8127d23 0x8117b20 0x811824e
0x8138ff5 0x8139559 0x810e86a 0x810f1d8 0x8058701 0x804def3
******************************************************************
Execution terminated by unhandled exception
Exception name: TYPES.INTERNAL_ERROR
Message: sem_expr.adb:3044
Call stack traceback locations:
0xb7d83fbc 0xb7d84035 0xb7d849a6 0x8126945 0x8127d23 0x8117b20 0x811824e
0x8138ff5 0x8139559 0x810e86a 0x810f1d8 0x8058701 0x804def3
/usr/lib/ghdl/bin/ghdl: compilation error
Regards,
--
Romain Lenglet
_______________________________________________
Ghdl-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/ghdl-discuss