aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-nodes.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-05-26 13:37:28 +0200
committerTristan Gingold <tgingold@free.fr>2022-05-26 13:37:28 +0200
commitba126785e1ce562f242b1a104ada9cfb554f62e8 (patch)
tree235d365719d1b625b05084b92d73cf7705f5e5f0 /src/vhdl/vhdl-nodes.adb
parent58712f5c52fbe00dc83e8db9c5e262853e2b7617 (diff)
downloadghdl-ba126785e1ce562f242b1a104ada9cfb554f62e8.tar.gz
ghdl-ba126785e1ce562f242b1a104ada9cfb554f62e8.tar.bz2
ghdl-ba126785e1ce562f242b1a104ada9cfb554f62e8.zip
vhdl-canon: add Canon_Add_Suspend_State
Diffstat (limited to 'src/vhdl/vhdl-nodes.adb')
-rw-r--r--src/vhdl/vhdl-nodes.adb34
1 files changed, 33 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb
index 360fdbec5..147b6d0db 100644
--- a/src/vhdl/vhdl-nodes.adb
+++ b/src/vhdl/vhdl-nodes.adb
@@ -1178,8 +1178,8 @@ package body Vhdl.Nodes is
| Iir_Kind_Procedure_Call_Statement
| Iir_Kind_Break_Statement
| Iir_Kind_If_Statement
- | Iir_Kind_Elsif
| Iir_Kind_Suspend_State_Statement
+ | Iir_Kind_Elsif
| Iir_Kind_Character_Literal
| Iir_Kind_Simple_Name
| Iir_Kind_Selected_Name
@@ -7410,4 +7410,36 @@ package body Vhdl.Nodes is
Set_Field1 (N, Int32_To_Iir (En));
end Set_Foreign_Node;
+ function Get_Suspend_State_Index (N : Iir) return Int32 is
+ begin
+ pragma Assert (N /= Null_Iir);
+ pragma Assert (Has_Suspend_State_Index (Get_Kind (N)),
+ "no field Suspend_State_Index");
+ return Iir_To_Int32 (Get_Field3 (N));
+ end Get_Suspend_State_Index;
+
+ procedure Set_Suspend_State_Index (N : Iir; Num : Int32) is
+ begin
+ pragma Assert (N /= Null_Iir);
+ pragma Assert (Has_Suspend_State_Index (Get_Kind (N)),
+ "no field Suspend_State_Index");
+ Set_Field3 (N, Int32_To_Iir (Num));
+ end Set_Suspend_State_Index;
+
+ function Get_Suspend_State_Chain (N : Iir) return Iir is
+ begin
+ pragma Assert (N /= Null_Iir);
+ pragma Assert (Has_Suspend_State_Chain (Get_Kind (N)),
+ "no field Suspend_State_Chain");
+ return Get_Field4 (N);
+ end Get_Suspend_State_Chain;
+
+ procedure Set_Suspend_State_Chain (N : Iir; Chain : Iir) is
+ begin
+ pragma Assert (N /= Null_Iir);
+ pragma Assert (Has_Suspend_State_Chain (Get_Kind (N)),
+ "no field Suspend_State_Chain");
+ Set_Field4 (N, Chain);
+ end Set_Suspend_State_Chain;
+
end Vhdl.Nodes;