diff options
author | Tristan Gingold <tgingold@free.fr> | 2017-12-04 03:47:47 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2017-12-04 03:47:47 +0100 |
commit | 58e18b1f9e734ddb101c53eb8195b5e2605ab8f6 (patch) | |
tree | ae22bb61348d544c5a0e3202e3e8aa72460a6351 /src/vhdl/simulate/simul-elaboration.adb | |
parent | 9ee3c82ab5a0b59eef5c91181dd282e7f5bcac61 (diff) | |
download | ghdl-58e18b1f9e734ddb101c53eb8195b5e2605ab8f6.tar.gz ghdl-58e18b1f9e734ddb101c53eb8195b5e2605ab8f6.tar.bz2 ghdl-58e18b1f9e734ddb101c53eb8195b5e2605ab8f6.zip |
simul: support nested packages.
Diffstat (limited to 'src/vhdl/simulate/simul-elaboration.adb')
-rw-r--r-- | src/vhdl/simulate/simul-elaboration.adb | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/vhdl/simulate/simul-elaboration.adb b/src/vhdl/simulate/simul-elaboration.adb index 9b0061822..3b10fa6d7 100644 --- a/src/vhdl/simulate/simul-elaboration.adb +++ b/src/vhdl/simulate/simul-elaboration.adb @@ -373,7 +373,8 @@ package body Simul.Elaboration is return Res; end Create_Block_Instance; - procedure Elaborate_Package (Block : Block_Instance_Acc; Decl : Iir) + procedure Elaborate_Package_Declaration + (Block : Block_Instance_Acc; Decl : Iir) is Package_Info : constant Sim_Info_Acc := Get_Info (Decl); Instance : Block_Instance_Acc; @@ -410,7 +411,7 @@ package body Simul.Elaboration is (Instance, Get_Declaration_Chain (Get_Package_Body (Uninst))); end; end if; - end Elaborate_Package; + end Elaborate_Package_Declaration; procedure Elaborate_Package_Body (Block : Block_Instance_Acc; Decl: Iir) is @@ -511,7 +512,8 @@ package body Simul.Elaboration is Elaborate_Dependence (Design); -- Then the declaration. - Elaborate_Package (Global_Instances, Library_Unit); + Elaborate_Package_Declaration + (Global_Instances, Library_Unit); -- And then the body (if any). if Body_Design = Null_Iir then @@ -540,7 +542,8 @@ package body Simul.Elaboration is Elaborate_Dependence (Design); -- Then the declaration. - Elaborate_Package (Global_Instances, Library_Unit); + Elaborate_Package_Declaration + (Global_Instances, Library_Unit); end if; end; when Iir_Kind_Entity_Declaration @@ -2620,6 +2623,11 @@ package body Simul.Elaboration is when Iir_Kind_Protected_Type_Body => null; + when Iir_Kind_Package_Declaration => + Elaborate_Package_Declaration (Instance, Decl); + when Iir_Kind_Package_Body => + Elaborate_Package_Body (Instance, Decl); + when Iir_Kind_Nature_Declaration => Elaborate_Nature_Definition (Instance, Get_Nature (Decl)); Create_Terminal (Instance, Get_Chain (Decl)); |