aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-01-12 07:43:36 +0100
committerTristan Gingold <tgingold@free.fr>2023-01-12 07:43:36 +0100
commite8af8a6605d710c254ca81b49bffae141bf73547 (patch)
tree6d5ef969222c54a20eaeff6e0b92cf695c71f848 /src
parent59936e1daa2a8d45525e8b09ba41f0cb8129dd8e (diff)
downloadghdl-e8af8a6605d710c254ca81b49bffae141bf73547.tar.gz
ghdl-e8af8a6605d710c254ca81b49bffae141bf73547.tar.bz2
ghdl-e8af8a6605d710c254ca81b49bffae141bf73547.zip
synth: handle generic mapped interface package
Diffstat (limited to 'src')
-rw-r--r--src/synth/elab-vhdl_insts.adb22
1 files changed, 17 insertions, 5 deletions
diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb
index e3a215bff..dc2dbbeb1 100644
--- a/src/synth/elab-vhdl_insts.adb
+++ b/src/synth/elab-vhdl_insts.adb
@@ -147,12 +147,17 @@ package body Elab.Vhdl_Insts is
when Iir_Kind_Interface_Package_Declaration =>
declare
- Actual : constant Iir :=
- Strip_Denoting_Name (Get_Actual (Assoc));
+ Actual : Node;
Pkg_Inst : Synth_Instance_Acc;
begin
- Pkg_Inst := Get_Package_Object (Sub_Inst, Actual);
- Create_Package_Interface (Sub_Inst, Inter, Pkg_Inst);
+ if Get_Kind (Assoc) = Iir_Kind_Association_Element_Open
+ then
+ Elab_Package_Instantiation (Sub_Inst, Inter);
+ else
+ Actual := Strip_Denoting_Name (Get_Actual (Assoc));
+ Pkg_Inst := Get_Package_Object (Sub_Inst, Actual);
+ Create_Package_Interface (Sub_Inst, Inter, Pkg_Inst);
+ end if;
end;
when Iir_Kind_Interface_Type_Declaration =>
@@ -233,7 +238,7 @@ package body Elab.Vhdl_Insts is
procedure Elab_Package_Instantiation
(Parent_Inst : Synth_Instance_Acc; Pkg : Node)
is
- Bod : constant Node := Get_Instance_Package_Body (Pkg);
+ Bod : Node;
Sub_Inst : Synth_Instance_Acc;
begin
Sub_Inst := Create_Package_Instance (Parent_Inst, Pkg);
@@ -244,6 +249,13 @@ package body Elab.Vhdl_Insts is
Elab_Declarations (Sub_Inst, Get_Declaration_Chain (Pkg));
+ if Get_Kind (Pkg) = Iir_Kind_Interface_Package_Declaration then
+ -- Not yet implemented: macro-expanded body for mapped package.
+ Bod := Null_Node;
+ else
+ Bod := Get_Instance_Package_Body (Pkg);
+ end if;
+
if Bod /= Null_Node then
-- Macro expanded package instantiation.
Elab_Declarations