diff options
author | Tristan Gingold <gingold@adacore.com> | 2016-09-08 21:55:03 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-09-12 20:21:54 +0200 |
commit | a694689b24bb60c04bb0919f6a290a592758ebd4 (patch) | |
tree | 133d4d2b4b94b28307b7cc83331b31e2955cd5a9 | |
parent | ae0c2b7a53851af64a2a25460c91f8f2fb0d10f9 (diff) | |
download | ghdl-a694689b24bb60c04bb0919f6a290a592758ebd4.tar.gz ghdl-a694689b24bb60c04bb0919f6a290a592758ebd4.tar.bz2 ghdl-a694689b24bb60c04bb0919f6a290a592758ebd4.zip |
iirs: add Iir_Kinds_Simple_Concurrent_Statement
Also add Is_Valid
-rw-r--r-- | src/vhdl/iirs.adb | 7 | ||||
-rw-r--r-- | src/vhdl/iirs.adb.in | 5 | ||||
-rw-r--r-- | src/vhdl/iirs.ads | 27 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.adb | 68 |
4 files changed, 67 insertions, 40 deletions
diff --git a/src/vhdl/iirs.adb b/src/vhdl/iirs.adb index 72c645c2a..f0e568ad3 100644 --- a/src/vhdl/iirs.adb +++ b/src/vhdl/iirs.adb @@ -32,6 +32,11 @@ package body Iirs is return Node = Null_Iir_List; end Is_Null_List; + function Is_Valid (Node : Iir) return Boolean is + begin + return Node /= Null_Iir; + end Is_Valid; + --------------------------------------------------- -- General subprograms that operate on every iir -- --------------------------------------------------- @@ -389,11 +394,11 @@ package body Iirs is | Iir_Kind_Indexed_Name | Iir_Kind_Psl_Expression | Iir_Kind_Concurrent_Assertion_Statement - | Iir_Kind_Psl_Default_Clock | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_If_Generate_Statement | Iir_Kind_Case_Generate_Statement | Iir_Kind_For_Generate_Statement + | Iir_Kind_Psl_Default_Clock | Iir_Kind_Generate_Statement_Body | Iir_Kind_If_Generate_Else_Clause | Iir_Kind_Simple_Signal_Assignment_Statement diff --git a/src/vhdl/iirs.adb.in b/src/vhdl/iirs.adb.in index 2c776abc7..a4b789570 100644 --- a/src/vhdl/iirs.adb.in +++ b/src/vhdl/iirs.adb.in @@ -32,6 +32,11 @@ package body Iirs is return Node = Null_Iir_List; end Is_Null_List; + function Is_Valid (Node : Iir) return Boolean is + begin + return Node /= Null_Iir; + end Is_Valid; + --------------------------------------------------- -- General subprograms that operate on every iir -- --------------------------------------------------- diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads index 3efcea38e..4ff568e33 100644 --- a/src/vhdl/iirs.ads +++ b/src/vhdl/iirs.ads @@ -3917,16 +3917,17 @@ package Iirs is Iir_Kind_Concurrent_Conditional_Signal_Assignment, Iir_Kind_Concurrent_Selected_Signal_Assignment, Iir_Kind_Concurrent_Assertion_Statement, - Iir_Kind_Psl_Default_Clock, + Iir_Kind_Concurrent_Procedure_Call_Statement, Iir_Kind_Psl_Assert_Statement, Iir_Kind_Psl_Cover_Statement, - Iir_Kind_Concurrent_Procedure_Call_Statement, Iir_Kind_Block_Statement, Iir_Kind_If_Generate_Statement, Iir_Kind_Case_Generate_Statement, Iir_Kind_For_Generate_Statement, Iir_Kind_Component_Instantiation_Statement, + Iir_Kind_Psl_Default_Clock, + Iir_Kind_Simple_Simultaneous_Statement, Iir_Kind_Generate_Statement_Body, @@ -4881,15 +4882,26 @@ package Iirs is --Iir_Kind_Concurrent_Conditional_Signal_Assignment --Iir_Kind_Concurrent_Selected_Signal_Assignment --Iir_Kind_Concurrent_Assertion_Statement - --Iir_Kind_Psl_Default_Clock + --Iir_Kind_Concurrent_Procedure_Call_Statement --Iir_Kind_Psl_Assert_Statement --Iir_Kind_Psl_Cover_Statement - --Iir_Kind_Concurrent_Procedure_Call_Statement --Iir_Kind_Block_Statement --Iir_Kind_If_Generate_Statement --Iir_Kind_Case_Generate_Statement --Iir_Kind_For_Generate_Statement - Iir_Kind_Component_Instantiation_Statement; + --Iir_Kind_Component_Instantiation_Statement + Iir_Kind_Psl_Default_Clock; + + subtype Iir_Kinds_Simple_Concurrent_Statement is Iir_Kind range + Iir_Kind_Sensitized_Process_Statement .. + --Iir_Kind_Process_Statement + --Iir_Kind_Concurrent_Simple_Signal_Assignment + --Iir_Kind_Concurrent_Conditional_Signal_Assignment + --Iir_Kind_Concurrent_Selected_Signal_Assignment + --Iir_Kind_Concurrent_Assertion_Statement + --Iir_Kind_Concurrent_Procedure_Call_Statement + --Iir_Kind_Psl_Assert_Statement + Iir_Kind_Psl_Cover_Statement; subtype Iir_Kinds_Concurrent_Signal_Assignment is Iir_Kind range Iir_Kind_Concurrent_Simple_Signal_Assignment .. @@ -4951,9 +4963,14 @@ package Iirs is Null_Iir : constant Iir := Nodes.Null_Node; + -- Return True iff Node is null / not set. function Is_Null (Node : Iir) return Boolean; pragma Inline (Is_Null); + -- Return True iff Node is not null / set. + function Is_Valid (Node : Iir) return Boolean; + pragma Inline (Is_Valid); + function Is_Null_List (Node : Iir_List) return Boolean; pragma Inline (Is_Null_List); diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb index 4e09367f7..a3706f699 100644 --- a/src/vhdl/nodes_meta.adb +++ b/src/vhdl/nodes_meta.adb @@ -1309,14 +1309,12 @@ package body Nodes_Meta is return "concurrent_selected_signal_assignment"; when Iir_Kind_Concurrent_Assertion_Statement => return "concurrent_assertion_statement"; - when Iir_Kind_Psl_Default_Clock => - return "psl_default_clock"; + when Iir_Kind_Concurrent_Procedure_Call_Statement => + return "concurrent_procedure_call_statement"; when Iir_Kind_Psl_Assert_Statement => return "psl_assert_statement"; when Iir_Kind_Psl_Cover_Statement => return "psl_cover_statement"; - when Iir_Kind_Concurrent_Procedure_Call_Statement => - return "concurrent_procedure_call_statement"; when Iir_Kind_Block_Statement => return "block_statement"; when Iir_Kind_If_Generate_Statement => @@ -1327,6 +1325,8 @@ package body Nodes_Meta is return "for_generate_statement"; when Iir_Kind_Component_Instantiation_Statement => return "component_instantiation_statement"; + when Iir_Kind_Psl_Default_Clock => + return "psl_default_clock"; when Iir_Kind_Simple_Simultaneous_Statement => return "simple_simultaneous_statement"; when Iir_Kind_Generate_Statement_Body => @@ -3535,9 +3535,12 @@ package body Nodes_Meta is Field_Severity_Expression, Field_Report_Expression, Field_Parent, - -- Iir_Kind_Psl_Default_Clock - Field_Psl_Boolean, + -- Iir_Kind_Concurrent_Procedure_Call_Statement Field_Label, + Field_Suspend_Flag, + Field_Postponed_Flag, + Field_Visible_Flag, + Field_Procedure_Call, Field_Chain, Field_Parent, -- Iir_Kind_Psl_Assert_Statement @@ -3568,14 +3571,6 @@ package body Nodes_Meta is Field_Severity_Expression, Field_Report_Expression, Field_Parent, - -- Iir_Kind_Concurrent_Procedure_Call_Statement - Field_Label, - Field_Suspend_Flag, - Field_Postponed_Flag, - Field_Visible_Flag, - Field_Procedure_Call, - Field_Chain, - Field_Parent, -- Iir_Kind_Block_Statement Field_Label, Field_Visible_Flag, @@ -3632,6 +3627,11 @@ package body Nodes_Meta is Field_Generic_Map_Aspect_Chain, Field_Port_Map_Aspect_Chain, Field_Parent, + -- Iir_Kind_Psl_Default_Clock + Field_Psl_Boolean, + Field_Label, + Field_Chain, + Field_Parent, -- Iir_Kind_Simple_Simultaneous_Statement Field_Label, Field_Visible_Flag, @@ -4314,15 +4314,15 @@ package body Nodes_Meta is Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1242, Iir_Kind_Concurrent_Selected_Signal_Assignment => 1254, Iir_Kind_Concurrent_Assertion_Statement => 1262, - Iir_Kind_Psl_Default_Clock => 1266, - Iir_Kind_Psl_Assert_Statement => 1279, - Iir_Kind_Psl_Cover_Statement => 1292, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1299, - Iir_Kind_Block_Statement => 1312, - Iir_Kind_If_Generate_Statement => 1322, - Iir_Kind_Case_Generate_Statement => 1331, - Iir_Kind_For_Generate_Statement => 1340, - Iir_Kind_Component_Instantiation_Statement => 1350, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1269, + Iir_Kind_Psl_Assert_Statement => 1282, + Iir_Kind_Psl_Cover_Statement => 1295, + Iir_Kind_Block_Statement => 1308, + Iir_Kind_If_Generate_Statement => 1318, + Iir_Kind_Case_Generate_Statement => 1327, + Iir_Kind_For_Generate_Statement => 1336, + Iir_Kind_Component_Instantiation_Statement => 1346, + Iir_Kind_Psl_Default_Clock => 1350, Iir_Kind_Simple_Simultaneous_Statement => 1357, Iir_Kind_Generate_Statement_Body => 1368, Iir_Kind_If_Generate_Else_Clause => 1373, @@ -6876,15 +6876,15 @@ package body Nodes_Meta is | Iir_Kind_Concurrent_Conditional_Signal_Assignment | Iir_Kind_Concurrent_Selected_Signal_Assignment | Iir_Kind_Concurrent_Assertion_Statement - | Iir_Kind_Psl_Default_Clock + | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Psl_Assert_Statement | Iir_Kind_Psl_Cover_Statement - | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Block_Statement | Iir_Kind_If_Generate_Statement | Iir_Kind_Case_Generate_Statement | Iir_Kind_For_Generate_Statement | Iir_Kind_Component_Instantiation_Statement + | Iir_Kind_Psl_Default_Clock | Iir_Kind_Simple_Simultaneous_Statement | Iir_Kind_Simple_Signal_Assignment_Statement | Iir_Kind_Conditional_Signal_Assignment_Statement @@ -7616,15 +7616,15 @@ package body Nodes_Meta is | Iir_Kind_Concurrent_Conditional_Signal_Assignment | Iir_Kind_Concurrent_Selected_Signal_Assignment | Iir_Kind_Concurrent_Assertion_Statement - | Iir_Kind_Psl_Default_Clock + | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Psl_Assert_Statement | Iir_Kind_Psl_Cover_Statement - | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Block_Statement | Iir_Kind_If_Generate_Statement | Iir_Kind_Case_Generate_Statement | Iir_Kind_For_Generate_Statement | Iir_Kind_Component_Instantiation_Statement + | Iir_Kind_Psl_Default_Clock | Iir_Kind_Simple_Simultaneous_Statement | Iir_Kind_Generate_Statement_Body | Iir_Kind_Simple_Signal_Assignment_Statement @@ -7665,15 +7665,15 @@ package body Nodes_Meta is | Iir_Kind_Concurrent_Conditional_Signal_Assignment | Iir_Kind_Concurrent_Selected_Signal_Assignment | Iir_Kind_Concurrent_Assertion_Statement - | Iir_Kind_Psl_Default_Clock + | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Psl_Assert_Statement | Iir_Kind_Psl_Cover_Statement - | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Block_Statement | Iir_Kind_If_Generate_Statement | Iir_Kind_Case_Generate_Statement | Iir_Kind_For_Generate_Statement | Iir_Kind_Component_Instantiation_Statement + | Iir_Kind_Psl_Default_Clock | Iir_Kind_Simple_Simultaneous_Statement | Iir_Kind_Simple_Signal_Assignment_Statement | Iir_Kind_Conditional_Signal_Assignment_Statement @@ -7747,9 +7747,9 @@ package body Nodes_Meta is | Iir_Kind_Concurrent_Conditional_Signal_Assignment | Iir_Kind_Concurrent_Selected_Signal_Assignment | Iir_Kind_Concurrent_Assertion_Statement + | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Psl_Assert_Statement | Iir_Kind_Psl_Cover_Statement - | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Block_Statement | Iir_Kind_If_Generate_Statement | Iir_Kind_Case_Generate_Statement @@ -8173,9 +8173,9 @@ package body Nodes_Meta is | Iir_Kind_Concurrent_Conditional_Signal_Assignment | Iir_Kind_Concurrent_Selected_Signal_Assignment | Iir_Kind_Concurrent_Assertion_Statement + | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Psl_Assert_Statement - | Iir_Kind_Psl_Cover_Statement - | Iir_Kind_Concurrent_Procedure_Call_Statement => + | Iir_Kind_Psl_Cover_Statement => return True; when others => return False; @@ -8730,15 +8730,15 @@ package body Nodes_Meta is | Iir_Kind_Concurrent_Conditional_Signal_Assignment | Iir_Kind_Concurrent_Selected_Signal_Assignment | Iir_Kind_Concurrent_Assertion_Statement - | Iir_Kind_Psl_Default_Clock + | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Psl_Assert_Statement | Iir_Kind_Psl_Cover_Statement - | Iir_Kind_Concurrent_Procedure_Call_Statement | Iir_Kind_Block_Statement | Iir_Kind_If_Generate_Statement | Iir_Kind_Case_Generate_Statement | Iir_Kind_For_Generate_Statement | Iir_Kind_Component_Instantiation_Statement + | Iir_Kind_Psl_Default_Clock | Iir_Kind_Simple_Simultaneous_Statement | Iir_Kind_Generate_Statement_Body | Iir_Kind_If_Generate_Else_Clause |