aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/canon.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-09-02 05:07:51 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-03 14:57:27 +0200
commit1dc63dae4baf052864bd16bb19fe89aed3ecabba (patch)
tree3a0352cfc1ea50a146948e4b7cfe29f057f7f9d2 /src/vhdl/canon.adb
parent35a6c9f98a012e50ec7de9e8847235321a4fb35b (diff)
downloadghdl-1dc63dae4baf052864bd16bb19fe89aed3ecabba.tar.gz
ghdl-1dc63dae4baf052864bd16bb19fe89aed3ecabba.tar.bz2
ghdl-1dc63dae4baf052864bd16bb19fe89aed3ecabba.zip
vhdl08: handle very simple nested packages.
Diffstat (limited to 'src/vhdl/canon.adb')
-rw-r--r--src/vhdl/canon.adb46
1 files changed, 8 insertions, 38 deletions
diff --git a/src/vhdl/canon.adb b/src/vhdl/canon.adb
index 74b271f80..13f61fb48 100644
--- a/src/vhdl/canon.adb
+++ b/src/vhdl/canon.adb
@@ -30,9 +30,9 @@ with PSL.NFAs.Utils;
with Canon_PSL;
package body Canon is
- -- Canonicalize a list of declarations. LIST can be null.
- -- PARENT must be the parent of the current statements chain for LIST,
- -- or NULL_IIR if LIST has no corresponding current statments.
+ -- Canonicalize the chain of declarations in Declaration_Chain of
+ -- DECL_PARENT. PARENT must be the parent of the current statements chain,
+ -- or NULL_IIR if DECL_PARENT has no corresponding current statments.
procedure Canon_Declarations (Top : Iir_Design_Unit;
Decl_Parent : Iir;
Parent : Iir);
@@ -2647,44 +2647,14 @@ package body Canon is
Canon_Component_Specification (Decl, Parent);
Canon_Component_Configuration (Top, Decl);
+ when Iir_Kind_Package_Declaration =>
+ Canon_Declarations (Top, Decl, Parent);
+ when Iir_Kind_Package_Body =>
+ Canon_Declarations (Top, Decl, Parent);
+
when Iir_Kind_Package_Instantiation_Declaration =>
Canon_Package_Instantiation_Declaration (Decl);
--- declare
--- List : Iir_List;
--- Binding : Iir_Binding_Indication;
--- Component : Iir_Component_Declaration;
--- Aspect : Iir;
--- Entity : Iir;
--- begin
--- Binding := Get_Binding_Indication (Decl);
--- Component := Get_Component_Name (Decl);
--- Aspect := Get_Entity_Aspect (Binding);
--- case Get_Kind (Aspect) is
--- when Iir_Kind_Entity_Aspect_Entity =>
--- Entity := Get_Entity (Aspect);
--- when others =>
--- Error_Kind ("configuration_specification", Aspect);
--- end case;
--- Entity := Get_Library_Unit (Entity);
--- List := Get_Generic_Map_Aspect_List (Binding);
--- if List = Null_Iir_List then
--- Set_Generic_Map_Aspect_List
--- (Binding,
--- Canon_Default_Map_Association_List
--- (Get_Generic_List (Entity), Get_Generic_List (Component),
--- Get_Location (Decl)));
--- end if;
--- List := Get_Port_Map_Aspect_List (Binding);
--- if List = Null_Iir_List then
--- Set_Port_Map_Aspect_List
--- (Binding,
--- Canon_Default_Map_Association_List
--- (Get_Port_List (Entity), Get_Port_List (Component),
--- Get_Location (Decl)));
--- end if;
--- end;
-
when Iir_Kinds_Signal_Attribute =>
null;