aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_context.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-26 16:02:25 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-26 17:33:38 +0100
commitb458a7644447bb440ce4be6aa8458c71d54d8044 (patch)
treec4d534519515a8f0f6d9223a6e614199980ae008 /src/synth/elab-vhdl_context.adb
parent46f5ed830772009e7b6c82ee98a5a16b6ea97da0 (diff)
downloadghdl-b458a7644447bb440ce4be6aa8458c71d54d8044.tar.gz
ghdl-b458a7644447bb440ce4be6aa8458c71d54d8044.tar.bz2
ghdl-b458a7644447bb440ce4be6aa8458c71d54d8044.zip
synth: handle instance_name attribute
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)