diff options
-rw-r--r-- | src/synth/elab-vhdl_annotations.adb | 3 | ||||
-rw-r--r-- | src/synth/elab-vhdl_insts.adb | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/synth/elab-vhdl_annotations.adb b/src/synth/elab-vhdl_annotations.adb index d5eb0eb63..9475ac940 100644 --- a/src/synth/elab-vhdl_annotations.adb +++ b/src/synth/elab-vhdl_annotations.adb @@ -372,7 +372,8 @@ package body Elab.Vhdl_Annotations is -- Create an info on the interface_type_definition. -- This is needed for a generic type in an entity, as the -- nodes are not instantiated. - Create_Object_Info (Block_Info, Get_Type (Decl)); + Create_Object_Info + (Block_Info, Get_Interface_Type_Definition (Decl)); when Iir_Kinds_Interface_Subprogram_Declaration => -- Macro-expanded null; diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb index c1c8fe371..48893f38b 100644 --- a/src/synth/elab-vhdl_insts.adb +++ b/src/synth/elab-vhdl_insts.adb @@ -171,7 +171,7 @@ package body Elab.Vhdl_Insts is end if; Act_Typ := Unshare (Act_Typ, Instance_Pool); Create_Subtype_Object - (Sub_Inst, Get_Type (Inter), Act_Typ); + (Sub_Inst, Get_Interface_Type_Definition (Inter), Act_Typ); Release_Expr_Pool (Marker); end; @@ -193,6 +193,7 @@ package body Elab.Vhdl_Insts is procedure Elab_Package_Declaration (Parent_Inst : Synth_Instance_Acc; Pkg : Node) is + Header : constant Node := Get_Package_Header (Pkg); Syn_Inst : Synth_Instance_Acc; begin if Is_Uninstantiated_Package (Pkg) then @@ -202,6 +203,12 @@ package body Elab.Vhdl_Insts is Syn_Inst := Create_Package_Instance (Parent_Inst, Pkg); + if Header /= Null_Node then + Elab_Generics_Association + (Syn_Inst, Parent_Inst, + Get_Generic_Chain (Header), Get_Generic_Map_Aspect_Chain (Header)); + end if; + Elab_Declarations (Syn_Inst, Get_Declaration_Chain (Pkg)); if Pkg = Vhdl.Std_Package.Standard_Package then Elab_Convertible_Declarations (Syn_Inst); |