aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2014-06-14 17:11:34 +0200
committerTristan Gingold <tgingold@free.fr>2014-06-14 17:11:34 +0200
commit58939f3a74657fe151cc4f71962939e95682959d (patch)
tree54aad479ba328a85c89a3c12d4cc5716822b6781
parentb729316b6d152123f505741452cf16a028c036bd (diff)
downloadghdl-58939f3a74657fe151cc4f71962939e95682959d.tar.gz
ghdl-58939f3a74657fe151cc4f71962939e95682959d.tar.bz2
ghdl-58939f3a74657fe151cc4f71962939e95682959d.zip
iirs: add set/get_process_origin
-rw-r--r--iirs.adb23
-rw-r--r--iirs.ads8
2 files changed, 31 insertions, 0 deletions
diff --git a/iirs.adb b/iirs.adb
index 34af7f943..b7948d19d 100644
--- a/iirs.adb
+++ b/iirs.adb
@@ -4335,6 +4335,29 @@ package body Iirs is
Set_Field6 (Wait, Iir_List_To_Iir (List));
end Set_Sensitivity_List;
+ procedure Check_Kind_For_Process_Origin (Target : Iir) is
+ begin
+ case Get_Kind (Target) is
+ when Iir_Kind_Sensitized_Process_Statement
+ | Iir_Kind_Process_Statement =>
+ null;
+ when others =>
+ Failed ("Process_Origin", Target);
+ end case;
+ end Check_Kind_For_Process_Origin;
+
+ function Get_Process_Origin (Proc : Iir) return Iir is
+ begin
+ Check_Kind_For_Process_Origin (Proc);
+ return Get_Field8 (Proc);
+ end Get_Process_Origin;
+
+ procedure Set_Process_Origin (Proc : Iir; Orig : Iir) is
+ begin
+ Check_Kind_For_Process_Origin (Proc);
+ Set_Field8 (Proc, Orig);
+ end Set_Process_Origin;
+
procedure Check_Kind_For_Condition_Clause (Target : Iir) is
begin
case Get_Kind (Target) is
diff --git a/iirs.ads b/iirs.ads
index ab46a393d..3c2d60ff5 100644
--- a/iirs.ads
+++ b/iirs.ads
@@ -1879,6 +1879,10 @@ package Iirs is
--
-- Get/Set_Callees_List (Field7)
--
+ -- The concurrent statement at the origin of that process. This is Null_Iir
+ -- for a user process.
+ -- Get/Set_Process_Origin (Field8)
+ --
-- Get/Set_Wait_State (State1)
--
-- Get/Set_Seen_Flag (Flag1)
@@ -4867,6 +4871,10 @@ package Iirs is
function Get_Sensitivity_List (Wait : Iir) return Iir_List;
procedure Set_Sensitivity_List (Wait : Iir; List : Iir_List);
+ -- Field: Field8
+ function Get_Process_Origin (Proc : Iir) return Iir;
+ procedure Set_Process_Origin (Proc : Iir; Orig : Iir);
+
-- Field: Field5
function Get_Condition_Clause (Wait : Iir_Wait_Statement) return Iir;
procedure Set_Condition_Clause (Wait : Iir_Wait_Statement; Cond : Iir);