aboutsummaryrefslogtreecommitdiffstats
path: root/src/synth/elab-vhdl_context.ads
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-12-27 08:53:00 +0100
committerTristan Gingold <tgingold@free.fr>2022-12-31 13:54:49 +0100
commitb7a9e4b9b5ac2c195da6f3549dd06b5c6e999a0f (patch)
treeab341f364e81544b1445d262708df16300198aa8 /src/synth/elab-vhdl_context.ads
parentd6343a0bf74d25973c5ed170b8e037b42bd08a7f (diff)
downloadghdl-b7a9e4b9b5ac2c195da6f3549dd06b5c6e999a0f.tar.gz
ghdl-b7a9e4b9b5ac2c195da6f3549dd06b5c6e999a0f.tar.bz2
ghdl-b7a9e4b9b5ac2c195da6f3549dd06b5c6e999a0f.zip
synth: add statement in context, adjust path/instance name attributes
Diffstat (limited to 'src/synth/elab-vhdl_context.ads')
-rw-r--r--src/synth/elab-vhdl_context.ads29
1 files changed, 26 insertions, 3 deletions
diff --git a/src/synth/elab-vhdl_context.ads b/src/synth/elab-vhdl_context.ads
index 3a85cd089..13fe8bb49 100644
--- a/src/synth/elab-vhdl_context.ads
+++ b/src/synth/elab-vhdl_context.ads
@@ -54,9 +54,10 @@ package Elab.Vhdl_Context is
procedure Free_Base_Instance;
-- Create and free the corresponding synth instance.
- function Make_Elab_Instance
- (Parent : Synth_Instance_Acc; Blk : Node; Config : Node)
- return Synth_Instance_Acc;
+ function Make_Elab_Instance (Parent : Synth_Instance_Acc;
+ Stmt : Node;
+ Blk : Node;
+ Config : Node) return Synth_Instance_Acc;
procedure Free_Elab_Instance (Synth_Inst : in out Synth_Instance_Acc);
@@ -82,6 +83,9 @@ 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;
+ -- Return the statement that created the scope.
+ function Get_Statement_Scope (Inst : Synth_Instance_Acc) return Node;
+
-- Get parent_instance.
function Get_Instance_Parent (Inst : Synth_Instance_Acc)
return Synth_Instance_Acc;
@@ -278,7 +282,26 @@ private
-- Used only fo debugging purpose.
Caller : Synth_Instance_Acc;
+ -- Statement that created the scope. One of:
+ -- * Subprogram call statement
+ -- * Component instantiation
+ -- * Block
+ -- * Process
+ -- * Generate body
+ -- * Block
+ -- * Protected object
+ -- * Null_Node for Root_Instance, package, vunit.
+ Stmt : Node;
+
-- Source construct corresponding to this instance.
+ -- * Architecture body
+ -- * Component declaration
+ -- * Foreign Module
+ -- * Subprogram
+ -- * Process
+ -- * Generate body
+ -- * Block
+ -- * ...
Source_Scope : Node;
-- Block configuration (unless the instance is for a package).