Guest
Hi all,
Could anyone of you explain why the following code fails with the
following error (Modelsim SE PLUS 6.2d):
** Error: tc.vhd(20): (vcom-1136) Unknown identifier "val0".
N.B line 20 is the line: signal ren_enum_b1 : ren_enum := val0 ;
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
package a_pkg is
type enum is (val0, val1, val2, val3) ;
subtype ren_enum is enum ;
end package a_pkg ;
package b_pkg is
subtype ren_enum is work.a_pkg.enum ;
end package b_pkg ;
--===================================================
entity tc is
end entity tc ;
use work.b_pkg.all ;
architecture beh of tc is
signal ren_enum_a : work.a_pkg.ren_enum := work.a_pkg.val0 ;
signal ren_enum_b0 : ren_enum ;
signal ren_enum_b1 : ren_enum := val0 ;
begin
end architecture beh ;
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
It seem that ren_enum_a inherits all the values from the base type
enum, while the other two (ren_enumb0/1) don't! Why?
Regards,
Andrea
P.S. Synopsys Design Compiler exibits the same behavior.
Could anyone of you explain why the following code fails with the
following error (Modelsim SE PLUS 6.2d):
** Error: tc.vhd(20): (vcom-1136) Unknown identifier "val0".
N.B line 20 is the line: signal ren_enum_b1 : ren_enum := val0 ;
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
package a_pkg is
type enum is (val0, val1, val2, val3) ;
subtype ren_enum is enum ;
end package a_pkg ;
package b_pkg is
subtype ren_enum is work.a_pkg.enum ;
end package b_pkg ;
--===================================================
entity tc is
end entity tc ;
use work.b_pkg.all ;
architecture beh of tc is
signal ren_enum_a : work.a_pkg.ren_enum := work.a_pkg.val0 ;
signal ren_enum_b0 : ren_enum ;
signal ren_enum_b1 : ren_enum := val0 ;
begin
end architecture beh ;
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
It seem that ren_enum_a inherits all the values from the base type
enum, while the other two (ren_enumb0/1) don't! Why?
Regards,
Andrea
P.S. Synopsys Design Compiler exibits the same behavior.