aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/synth/elab-vhdl_insts.adb3
-rw-r--r--src/synth/synth-vhdl_decls.adb3
-rw-r--r--src/vhdl/vhdl-annotations.adb16
3 files changed, 16 insertions, 6 deletions
diff --git a/src/synth/elab-vhdl_insts.adb b/src/synth/elab-vhdl_insts.adb
index 5192046b1..cb7a6bd9e 100644
--- a/src/synth/elab-vhdl_insts.adb
+++ b/src/synth/elab-vhdl_insts.adb
@@ -183,7 +183,8 @@ package body Elab.Vhdl_Insts is
if Bod /= Null_Node then
-- Macro expanded package instantiation.
- raise Internal_Error;
+ Elab_Declarations
+ (Sub_Inst, Get_Declaration_Chain (Bod));
else
-- Shared body
declare
diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb
index 5eefbdaef..c7ab62d8e 100644
--- a/src/synth/synth-vhdl_decls.adb
+++ b/src/synth/synth-vhdl_decls.adb
@@ -341,7 +341,8 @@ package body Synth.Vhdl_Decls is
if Bod /= Null_Node then
-- Macro expanded package instantiation.
- raise Internal_Error;
+ Synth_Concurrent_Declarations
+ (Sub_Inst, Get_Declaration_Chain (Bod));
else
-- Shared body
declare
diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb
index ec6efd46a..43477c1d2 100644
--- a/src/vhdl/vhdl-annotations.adb
+++ b/src/vhdl/vhdl-annotations.adb
@@ -665,15 +665,23 @@ package body Vhdl.Annotations is
end if;
end Annotate_Package_Declaration;
- procedure Annotate_Package_Body (Decl: Iir)
+ procedure Annotate_Package_Body (Bod: Iir)
is
- Package_Info : constant Sim_Info_Acc := Get_Info (Get_Package (Decl));
+ Pkg : constant Node := Get_Package (Bod);
+ Package_Info : constant Sim_Info_Acc := Get_Info (Pkg);
begin
+ if Is_Uninstantiated_Package (Pkg)
+ and then Get_Macro_Expanded_Flag (Pkg)
+ then
+ -- The body of a macro-expanded flag.
+ return;
+ end if;
+
-- Set info field of package body declaration.
- Set_Info (Decl, Package_Info);
+ Set_Info (Bod, Package_Info);
-- declarations
- Annotate_Declaration_List (Package_Info, Get_Declaration_Chain (Decl));
+ Annotate_Declaration_List (Package_Info, Get_Declaration_Chain (Bod));
end Annotate_Package_Body;
procedure Annotate_Declaration_Type (Block_Info: Sim_Info_Acc; Decl: Iir)