aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_context.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/synth/elab-vhdl_context.adb')
-rw-r--r--src/synth/elab-vhdl_context.adb18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/synth/elab-vhdl_context.adb b/src/synth/elab-vhdl_context.adb
index d77b8ea6e..56de0563e 100644
--- a/src/synth/elab-vhdl_context.adb
+++ b/src/synth/elab-vhdl_context.adb
@@ -615,15 +615,21 @@ package body Elab.Vhdl_Context is
end case;
end Get_Instance_By_Scope;
- function Get_Parent_Scope (Blk : Node) return Sim_Info_Acc
+ function Get_Info_Scope (Blk : Node) return Sim_Info_Acc
is
- Parent : Node;
+ N : Node;
begin
- Parent := Get_Parent (Blk);
- if Get_Kind (Parent) = Iir_Kind_Architecture_Body then
- Parent := Vhdl.Utils.Get_Entity (Parent);
+ if Get_Kind (Blk) = Iir_Kind_Architecture_Body then
+ N := Vhdl.Utils.Get_Entity (Blk);
+ else
+ N := Blk;
end if;
- return Get_Info (Parent);
+ return Get_Info (N);
+ end Get_Info_Scope;
+
+ function Get_Parent_Scope (Blk : Node) return Sim_Info_Acc is
+ begin
+ return Get_Info_Scope (Get_Parent (Blk));
end Get_Parent_Scope;
function Get_Value (Syn_Inst: Synth_Instance_Acc; Obj : Node)