From ba126785e1ce562f242b1a104ada9cfb554f62e8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Thu, 26 May 2022 13:37:28 +0200 Subject: vhdl-canon: add Canon_Add_Suspend_State --- pyGHDL/libghdl/vhdl/nodes.py | 54 +++++++++++++++++++++++++++++++++++++-- pyGHDL/libghdl/vhdl/nodes_meta.py | 14 ++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) (limited to 'pyGHDL/libghdl') diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py index 196b7e811..b9a540654 100644 --- a/pyGHDL/libghdl/vhdl/nodes.py +++ b/pyGHDL/libghdl/vhdl/nodes.py @@ -296,8 +296,8 @@ class Iir_Kind(IntEnum): Procedure_Call_Statement = 249 Break_Statement = 250 If_Statement = 251 - Elsif = 252 - Suspend_State_Statement = 253 + Suspend_State_Statement = 252 + Elsif = 253 Character_Literal = 254 Simple_Name = 255 Selected_Name = 256 @@ -1075,6 +1075,30 @@ class Iir_Kinds: Iir_Kind.If_Statement, ] + Sequential_Statement_Ext = [ + Iir_Kind.Simple_Signal_Assignment_Statement, + Iir_Kind.Conditional_Signal_Assignment_Statement, + Iir_Kind.Selected_Waveform_Assignment_Statement, + Iir_Kind.Signal_Force_Assignment_Statement, + Iir_Kind.Signal_Release_Assignment_Statement, + Iir_Kind.Null_Statement, + Iir_Kind.Assertion_Statement, + Iir_Kind.Report_Statement, + Iir_Kind.Wait_Statement, + Iir_Kind.Variable_Assignment_Statement, + Iir_Kind.Conditional_Variable_Assignment_Statement, + Iir_Kind.Return_Statement, + Iir_Kind.For_Loop_Statement, + Iir_Kind.While_Loop_Statement, + Iir_Kind.Next_Statement, + Iir_Kind.Exit_Statement, + Iir_Kind.Case_Statement, + Iir_Kind.Procedure_Call_Statement, + Iir_Kind.Break_Statement, + Iir_Kind.If_Statement, + Iir_Kind.Suspend_State_Statement, + ] + Next_Exit_Statement = [ Iir_Kind.Next_Statement, Iir_Kind.Exit_Statement, @@ -6696,3 +6720,29 @@ def Get_Foreign_Node(obj: Iir) -> Int32: @BindToLibGHDL("vhdl__nodes__set_foreign_node") def Set_Foreign_Node(obj: Iir, value: Int32) -> None: """""" + + +@export +@BindToLibGHDL("vhdl__nodes__get_suspend_state_index") +def Get_Suspend_State_Index(obj: Iir) -> Int32: + """""" + return 0 + + +@export +@BindToLibGHDL("vhdl__nodes__set_suspend_state_index") +def Set_Suspend_State_Index(obj: Iir, value: Int32) -> None: + """""" + + +@export +@BindToLibGHDL("vhdl__nodes__get_suspend_state_chain") +def Get_Suspend_State_Chain(obj: Iir) -> Iir: + """""" + return 0 + + +@export +@BindToLibGHDL("vhdl__nodes__set_suspend_state_chain") +def Set_Suspend_State_Chain(obj: Iir, value: Iir) -> None: + """""" diff --git a/pyGHDL/libghdl/vhdl/nodes_meta.py b/pyGHDL/libghdl/vhdl/nodes_meta.py index 3a5f7e2b8..0e2cf2549 100644 --- a/pyGHDL/libghdl/vhdl/nodes_meta.py +++ b/pyGHDL/libghdl/vhdl/nodes_meta.py @@ -490,6 +490,8 @@ class fields(IntEnum): Clock_Expression = 370 Default_Clock = 371 Foreign_Node = 372 + Suspend_State_Index = 373 + Suspend_State_Chain = 374 def Get_Boolean(node, field): @@ -2860,3 +2862,15 @@ def Has_Default_Clock(kind: IirKind) -> bool: @BindToLibGHDL("vhdl__nodes_meta__has_foreign_node") def Has_Foreign_Node(kind: IirKind) -> bool: """""" + + +@export +@BindToLibGHDL("vhdl__nodes_meta__has_suspend_state_index") +def Has_Suspend_State_Index(kind: IirKind) -> bool: + """""" + + +@export +@BindToLibGHDL("vhdl__nodes_meta__has_suspend_state_chain") +def Has_Suspend_State_Chain(kind: IirKind) -> bool: + """""" -- cgit v1.2.3