aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-30 20:27:28 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-30 20:27:28 +0200
commit57bd9ab4cb8b64fb320109cee94410fded6b43e3 (patch)
tree2176f7190b0160ae171c222f1dbea279ae2dec9d /src
parent128c4a0f7d52116b4377aa6218f91066f1b20109 (diff)
downloadghdl-57bd9ab4cb8b64fb320109cee94410fded6b43e3.tar.gz
ghdl-57bd9ab4cb8b64fb320109cee94410fded6b43e3.tar.bz2
ghdl-57bd9ab4cb8b64fb320109cee94410fded6b43e3.zip
Instance_Path: handle nested packages and package instantiation.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/evaluation.adb13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/vhdl/evaluation.adb b/src/vhdl/evaluation.adb
index 24a365ee9..06b8b5537 100644
--- a/src/vhdl/evaluation.adb
+++ b/src/vhdl/evaluation.adb
@@ -3154,10 +3154,15 @@ package body Evaluation is
Path_Add_Name (El);
Path_Add (":");
when Iir_Kind_Package_Declaration
- | Iir_Kind_Package_Body =>
- Path_Add_Element
- (Get_Library (Get_Design_File (Get_Design_Unit (El))),
- Is_Instance);
+ | Iir_Kind_Package_Body
+ | Iir_Kind_Package_Instantiation_Declaration =>
+ if Is_Nested_Package (El) then
+ Path_Add_Element (Get_Parent (El), Is_Instance);
+ else
+ Path_Add_Element
+ (Get_Library (Get_Design_File (Get_Design_Unit (El))),
+ Is_Instance);
+ end if;
Path_Add_Name (El);
Path_Add (":");
when Iir_Kind_Entity_Declaration =>