diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/translate/trans-chap2.adb | 7 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap2.ads | 2 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap4.adb | 7 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/vhdl/translate/trans-chap2.adb b/src/vhdl/translate/trans-chap2.adb index 93daa205f..ac49a96da 100644 --- a/src/vhdl/translate/trans-chap2.adb +++ b/src/vhdl/translate/trans-chap2.adb @@ -35,6 +35,8 @@ package body Trans.Chap2 is use Trans.Subprgs; use Trans.Helpers; + procedure Elab_Package (Spec : Iir; Header : Iir); + type Name_String_Xlat_Array is array (Name_Id range <>) of String (1 .. 4); -- Ortho function names are only composed of [A-Za-z0-9_]. For VHDL @@ -1055,6 +1057,11 @@ package body Trans.Chap2 is end if; end Elab_Package; + procedure Elab_Package_Declaration (Spec : Iir) is + begin + Elab_Package (Spec, Get_Package_Header (Spec)); + end Elab_Package_Declaration; + procedure Elab_Package_Body (Spec : Iir_Package_Declaration; Bod : Iir) is -- SPEC can be a package declaration or a package instantiation. diff --git a/src/vhdl/translate/trans-chap2.ads b/src/vhdl/translate/trans-chap2.ads index 9a91c74ac..a628b3133 100644 --- a/src/vhdl/translate/trans-chap2.ads +++ b/src/vhdl/translate/trans-chap2.ads @@ -33,7 +33,7 @@ package Trans.Chap2 is procedure Translate_Package_Body (Bod : Iir_Package_Body); procedure Translate_Package_Instantiation_Declaration (Inst : Iir); - procedure Elab_Package (Spec : Iir; Header : Iir); + procedure Elab_Package_Declaration (Spec : Iir); procedure Elab_Package_Body (Spec : Iir_Package_Declaration; Bod : Iir); procedure Elab_Package_Instantiation_Declaration (Inst : Iir); diff --git a/src/vhdl/translate/trans-chap4.adb b/src/vhdl/translate/trans-chap4.adb index 07e3f9030..97365adc6 100644 --- a/src/vhdl/translate/trans-chap4.adb +++ b/src/vhdl/translate/trans-chap4.adb @@ -2832,8 +2832,11 @@ package body Trans.Chap4 is null; when Iir_Kind_Package_Declaration => - Chap2.Elab_Package (Decl, Get_Package_Header (Decl)); - -- FIXME: finalizer + if not Is_Uninstantiated_Package (Decl) then + -- Elaborate nested package (unless it is uninstantiated). + Chap2.Elab_Package_Declaration (Decl); + -- FIXME: finalizer + end if; when Iir_Kind_Package_Body => declare Nested_Final : Boolean; |