aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-14 19:45:52 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-14 19:49:20 +0200
commitd8a889da07af66bd4985682acaba98f7963460d0 (patch)
tree4882fc6e380dbe4e769615ae9d21c089ac74474f /src
parent2250367424796cd0215eedeedaba8f120a027f4c (diff)
downloadghdl-d8a889da07af66bd4985682acaba98f7963460d0.tar.gz
ghdl-d8a889da07af66bd4985682acaba98f7963460d0.tar.bz2
ghdl-d8a889da07af66bd4985682acaba98f7963460d0.zip
elab-vhdl_context: add get_instance_parent
Diffstat (limited to 'src')
-rw-r--r--src/synth/elab-vhdl_context.adb6
-rw-r--r--src/synth/elab-vhdl_context.ads4
2 files changed, 10 insertions, 0 deletions
diff --git a/src/synth/elab-vhdl_context.adb b/src/synth/elab-vhdl_context.adb
index e430561bf..fd37dcfd2 100644
--- a/src/synth/elab-vhdl_context.adb
+++ b/src/synth/elab-vhdl_context.adb
@@ -190,6 +190,12 @@ package body Elab.Vhdl_Context is
return Inst.Source_Scope;
end Get_Source_Scope;
+ function Get_Instance_Parent (Inst : Synth_Instance_Acc)
+ return Synth_Instance_Acc is
+ begin
+ return Inst.Up_Block;
+ end Get_Instance_Parent;
+
function Get_Instance_Const (Inst : Synth_Instance_Acc) return Boolean is
begin
return Inst.Is_Const;
diff --git a/src/synth/elab-vhdl_context.ads b/src/synth/elab-vhdl_context.ads
index 65591a37f..a98cf280d 100644
--- a/src/synth/elab-vhdl_context.ads
+++ b/src/synth/elab-vhdl_context.ads
@@ -79,6 +79,10 @@ package Elab.Vhdl_Context is
-- Get the corresponding source for the scope of the instance.
function Get_Source_Scope (Inst : Synth_Instance_Acc) return Node;
+ -- Get parent_instance.
+ function Get_Instance_Parent (Inst : Synth_Instance_Acc)
+ return Synth_Instance_Acc;
+
procedure Set_Instance_Config (Inst : Synth_Instance_Acc; Config : Node);
function Get_Instance_Config (Inst : Synth_Instance_Acc) return Node;