diff options
author | Tristan Gingold <tgingold@free.fr> | 2014-10-14 06:19:33 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2014-10-14 06:19:33 +0200 |
commit | 0e199cbea1070c016d29348cd659b9e6ca688afb (patch) | |
tree | 169e2c21b5e84998f03c2de76feed3e61cea503c /simulate | |
parent | 68d26922e31aad3cb34dd3b7689bcec75ad70fcb (diff) | |
download | ghdl-0e199cbea1070c016d29348cd659b9e6ca688afb.tar.gz ghdl-0e199cbea1070c016d29348cd659b9e6ca688afb.tar.bz2 ghdl-0e199cbea1070c016d29348cd659b9e6ca688afb.zip |
Initial support for package header and package instantiation.
Diffstat (limited to 'simulate')
-rw-r--r-- | simulate/elaboration.adb | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/simulate/elaboration.adb b/simulate/elaboration.adb index 0abe8113d..dd405ec18 100644 --- a/simulate/elaboration.adb +++ b/simulate/elaboration.adb @@ -1864,16 +1864,18 @@ package body Elaboration is (Item, Sub_Instances (Ind + I - 1)); end loop; when Iir_Kind_Indexed_Name => - Expr := Execute_Expression - (Instance, Get_First_Element (Get_Index_List (Spec))); - Ind := Instance_Slot_Type - (Get_Index_Offset (Expr, Bounds, Spec)); - Sub_Conf (Ind) := True; - Elaborate_Block_Configuration (Item, Sub_Instances (Ind)); - when Iir_Kind_Selected_Name => - -- Must be the only default block configuration - pragma Assert (Default_Item = Null_Iir); - Default_Item := Item; + if Get_Index_List (Spec) = Iir_List_Others then + -- Must be the only default block configuration + pragma Assert (Default_Item = Null_Iir); + Default_Item := Item; + else + Expr := Execute_Expression + (Instance, Get_First_Element (Get_Index_List (Spec))); + Ind := Instance_Slot_Type + (Get_Index_Offset (Expr, Bounds, Spec)); + Sub_Conf (Ind) := True; + Elaborate_Block_Configuration (Item, Sub_Instances (Ind)); + end if; when Iir_Kind_Generate_Statement => -- Must be the only block configuration pragma Assert (Item = Conf_Chain); |