diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-12-22 10:19:43 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-12-23 08:53:09 +0100 |
commit | 91266a811cd8cd5dcd70345ea6acbb899389453c (patch) | |
tree | bccc893934a3fbebf43d6034fb314104c91ecd49 /src/vhdl/vhdl-canon.adb | |
parent | f05bbd02f16d3368e9c171a7f42a08f26219262d (diff) | |
download | ghdl-91266a811cd8cd5dcd70345ea6acbb899389453c.tar.gz ghdl-91266a811cd8cd5dcd70345ea6acbb899389453c.tar.bz2 ghdl-91266a811cd8cd5dcd70345ea6acbb899389453c.zip |
vhdl-sem_inst: add instantiate_component_declaration.
For #2264
Diffstat (limited to 'src/vhdl/vhdl-canon.adb')
-rw-r--r-- | src/vhdl/vhdl-canon.adb | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index b07fb7d7c..95f531cf8 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -2321,18 +2321,22 @@ package body Vhdl.Canon is when Iir_Kind_Component_Instantiation_Statement => declare Inst : Iir; + Hdr : Iir; Assoc_Chain : Iir; begin - Inst := Get_Instantiated_Unit (Stmt); - Inst := Get_Entity_From_Entity_Aspect (Inst); + Hdr := Get_Instantiated_Header (Stmt); + if True or Hdr = Null_Iir then + Inst := Get_Instantiated_Unit (Stmt); + Hdr := Get_Entity_From_Entity_Aspect (Inst); + end if; Assoc_Chain := Canon_Association_Chain_And_Actuals - (Get_Generic_Chain (Inst), + (Get_Generic_Chain (Hdr), Get_Generic_Map_Aspect_Chain (Stmt), Stmt); Set_Generic_Map_Aspect_Chain (Stmt, Assoc_Chain); Assoc_Chain := Canon_Association_Chain_And_Actuals - (Get_Port_Chain (Inst), + (Get_Port_Chain (Hdr), Get_Port_Map_Aspect_Chain (Stmt), Stmt); Set_Port_Map_Aspect_Chain (Stmt, Assoc_Chain); |