diff options
Diffstat (limited to 'src/vhdl/nodes_meta.adb')
-rw-r--r-- | src/vhdl/nodes_meta.adb | 344 |
1 files changed, 190 insertions, 154 deletions
diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb index c935825..c10ad33 100644 --- a/src/vhdl/nodes_meta.adb +++ b/src/vhdl/nodes_meta.adb @@ -307,6 +307,7 @@ package body Nodes_Meta is Field_Has_Identifier_List => Type_Boolean, Field_Has_Mode => Type_Boolean, Field_Has_Class => Type_Boolean, + Field_Suspend_Flag => Type_Boolean, Field_Is_Ref => Type_Boolean, Field_Psl_Property => Type_PSL_Node, Field_Psl_Declaration => Type_PSL_Node, @@ -900,6 +901,8 @@ package body Nodes_Meta is return "has_mode"; when Field_Has_Class => return "has_class"; + when Field_Suspend_Flag => + return "suspend_flag"; when Field_Is_Ref => return "is_ref"; when Field_Psl_Property => @@ -2000,6 +2003,8 @@ package body Nodes_Meta is return Attr_None; when Field_Has_Class => return Attr_None; + when Field_Suspend_Flag => + return Attr_None; when Field_Is_Ref => return Attr_None; when Field_Psl_Property => @@ -2761,6 +2766,7 @@ package body Nodes_Meta is Field_Subprogram_Hash, Field_Implicit_Definition, Field_Seen_Flag, + Field_Suspend_Flag, Field_Passive_Flag, Field_Foreign_Flag, Field_Visible_Flag, @@ -2790,6 +2796,7 @@ package body Nodes_Meta is Field_Callees_List, -- Iir_Kind_Procedure_Body Field_Impure_Depth, + Field_Suspend_Flag, Field_End_Has_Reserved_Id, Field_End_Has_Identifier, Field_Declaration_Chain, @@ -3335,6 +3342,7 @@ package body Nodes_Meta is Field_Label, Field_Seen_Flag, Field_End_Has_Postponed, + Field_Suspend_Flag, Field_Passive_Flag, Field_Postponed_Flag, Field_Visible_Flag, @@ -3412,6 +3420,7 @@ package body Nodes_Meta is Field_Parent, -- Iir_Kind_Concurrent_Procedure_Call_Statement Field_Label, + Field_Suspend_Flag, Field_Postponed_Flag, Field_Visible_Flag, Field_Procedure_Call, @@ -3543,6 +3552,7 @@ package body Nodes_Meta is Field_Type, -- Iir_Kind_For_Loop_Statement Field_Label, + Field_Suspend_Flag, Field_Visible_Flag, Field_Is_Within_Flag, Field_End_Has_Identifier, @@ -3552,6 +3562,7 @@ package body Nodes_Meta is Field_Parent, -- Iir_Kind_While_Loop_Statement Field_Label, + Field_Suspend_Flag, Field_Visible_Flag, Field_End_Has_Identifier, Field_Condition, @@ -3574,6 +3585,7 @@ package body Nodes_Meta is Field_Parent, -- Iir_Kind_Case_Statement Field_Label, + Field_Suspend_Flag, Field_Visible_Flag, Field_End_Has_Identifier, Field_Case_Statement_Alternative_Chain, @@ -3582,12 +3594,14 @@ package body Nodes_Meta is Field_Parent, -- Iir_Kind_Procedure_Call_Statement Field_Label, + Field_Suspend_Flag, Field_Visible_Flag, Field_Procedure_Call, Field_Chain, Field_Parent, -- Iir_Kind_If_Statement Field_Label, + Field_Suspend_Flag, Field_Visible_Flag, Field_End_Has_Identifier, Field_Condition, @@ -4040,160 +4054,160 @@ package body Nodes_Meta is Iir_Kind_Through_Quantity_Declaration => 604, Iir_Kind_Enumeration_Literal => 615, Iir_Kind_Function_Declaration => 639, - Iir_Kind_Procedure_Declaration => 661, - Iir_Kind_Function_Body => 671, - Iir_Kind_Procedure_Body => 681, - Iir_Kind_Object_Alias_Declaration => 693, - Iir_Kind_File_Declaration => 708, - Iir_Kind_Guard_Signal_Declaration => 721, - Iir_Kind_Signal_Declaration => 738, - Iir_Kind_Variable_Declaration => 751, - Iir_Kind_Constant_Declaration => 765, - Iir_Kind_Iterator_Declaration => 777, - Iir_Kind_Interface_Constant_Declaration => 793, - Iir_Kind_Interface_Variable_Declaration => 809, - Iir_Kind_Interface_Signal_Declaration => 830, - Iir_Kind_Interface_File_Declaration => 846, - Iir_Kind_Interface_Package_Declaration => 855, - Iir_Kind_Identity_Operator => 859, - Iir_Kind_Negation_Operator => 863, - Iir_Kind_Absolute_Operator => 867, - Iir_Kind_Not_Operator => 871, - Iir_Kind_Condition_Operator => 875, - Iir_Kind_Reduction_And_Operator => 879, - Iir_Kind_Reduction_Or_Operator => 883, - Iir_Kind_Reduction_Nand_Operator => 887, - Iir_Kind_Reduction_Nor_Operator => 891, - Iir_Kind_Reduction_Xor_Operator => 895, - Iir_Kind_Reduction_Xnor_Operator => 899, - Iir_Kind_And_Operator => 904, - Iir_Kind_Or_Operator => 909, - Iir_Kind_Nand_Operator => 914, - Iir_Kind_Nor_Operator => 919, - Iir_Kind_Xor_Operator => 924, - Iir_Kind_Xnor_Operator => 929, - Iir_Kind_Equality_Operator => 934, - Iir_Kind_Inequality_Operator => 939, - Iir_Kind_Less_Than_Operator => 944, - Iir_Kind_Less_Than_Or_Equal_Operator => 949, - Iir_Kind_Greater_Than_Operator => 954, - Iir_Kind_Greater_Than_Or_Equal_Operator => 959, - Iir_Kind_Match_Equality_Operator => 964, - Iir_Kind_Match_Inequality_Operator => 969, - Iir_Kind_Match_Less_Than_Operator => 974, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 979, - Iir_Kind_Match_Greater_Than_Operator => 984, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 989, - Iir_Kind_Sll_Operator => 994, - Iir_Kind_Sla_Operator => 999, - Iir_Kind_Srl_Operator => 1004, - Iir_Kind_Sra_Operator => 1009, - Iir_Kind_Rol_Operator => 1014, - Iir_Kind_Ror_Operator => 1019, - Iir_Kind_Addition_Operator => 1024, - Iir_Kind_Substraction_Operator => 1029, - Iir_Kind_Concatenation_Operator => 1034, - Iir_Kind_Multiplication_Operator => 1039, - Iir_Kind_Division_Operator => 1044, - Iir_Kind_Modulus_Operator => 1049, - Iir_Kind_Remainder_Operator => 1054, - Iir_Kind_Exponentiation_Operator => 1059, - Iir_Kind_Function_Call => 1067, - Iir_Kind_Aggregate => 1073, - Iir_Kind_Parenthesis_Expression => 1076, - Iir_Kind_Qualified_Expression => 1080, - Iir_Kind_Type_Conversion => 1085, - Iir_Kind_Allocator_By_Expression => 1089, - Iir_Kind_Allocator_By_Subtype => 1093, - Iir_Kind_Selected_Element => 1099, - Iir_Kind_Dereference => 1104, - Iir_Kind_Implicit_Dereference => 1109, - Iir_Kind_Slice_Name => 1116, - Iir_Kind_Indexed_Name => 1122, - Iir_Kind_Psl_Expression => 1124, - Iir_Kind_Sensitized_Process_Statement => 1144, - Iir_Kind_Process_Statement => 1163, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1174, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1186, - Iir_Kind_Concurrent_Assertion_Statement => 1194, - Iir_Kind_Psl_Default_Clock => 1198, - Iir_Kind_Psl_Assert_Statement => 1207, - Iir_Kind_Psl_Cover_Statement => 1216, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1222, - Iir_Kind_Block_Statement => 1235, - Iir_Kind_If_Generate_Statement => 1245, - Iir_Kind_For_Generate_Statement => 1254, - Iir_Kind_Component_Instantiation_Statement => 1264, - Iir_Kind_Simple_Simultaneous_Statement => 1271, - Iir_Kind_Generate_Statement_Body => 1282, - Iir_Kind_If_Generate_Else_Clause => 1287, - Iir_Kind_Signal_Assignment_Statement => 1296, - Iir_Kind_Null_Statement => 1300, - Iir_Kind_Assertion_Statement => 1307, - Iir_Kind_Report_Statement => 1313, - Iir_Kind_Wait_Statement => 1320, - Iir_Kind_Variable_Assignment_Statement => 1326, - Iir_Kind_Return_Statement => 1332, - Iir_Kind_For_Loop_Statement => 1340, - Iir_Kind_While_Loop_Statement => 1347, - Iir_Kind_Next_Statement => 1353, - Iir_Kind_Exit_Statement => 1359, - Iir_Kind_Case_Statement => 1366, - Iir_Kind_Procedure_Call_Statement => 1371, - Iir_Kind_If_Statement => 1379, - Iir_Kind_Elsif => 1384, - Iir_Kind_Character_Literal => 1391, - Iir_Kind_Simple_Name => 1398, - Iir_Kind_Selected_Name => 1406, - Iir_Kind_Operator_Symbol => 1411, - Iir_Kind_Selected_By_All_Name => 1416, - Iir_Kind_Parenthesis_Name => 1420, - Iir_Kind_External_Constant_Name => 1429, - Iir_Kind_External_Signal_Name => 1438, - Iir_Kind_External_Variable_Name => 1447, - Iir_Kind_Package_Pathname => 1450, - Iir_Kind_Absolute_Pathname => 1451, - Iir_Kind_Relative_Pathname => 1452, - Iir_Kind_Pathname_Element => 1456, - Iir_Kind_Base_Attribute => 1458, - Iir_Kind_Left_Type_Attribute => 1463, - Iir_Kind_Right_Type_Attribute => 1468, - Iir_Kind_High_Type_Attribute => 1473, - Iir_Kind_Low_Type_Attribute => 1478, - Iir_Kind_Ascending_Type_Attribute => 1483, - Iir_Kind_Image_Attribute => 1489, - Iir_Kind_Value_Attribute => 1495, - Iir_Kind_Pos_Attribute => 1501, - Iir_Kind_Val_Attribute => 1507, - Iir_Kind_Succ_Attribute => 1513, - Iir_Kind_Pred_Attribute => 1519, - Iir_Kind_Leftof_Attribute => 1525, - Iir_Kind_Rightof_Attribute => 1531, - Iir_Kind_Delayed_Attribute => 1539, - Iir_Kind_Stable_Attribute => 1547, - Iir_Kind_Quiet_Attribute => 1555, - Iir_Kind_Transaction_Attribute => 1563, - Iir_Kind_Event_Attribute => 1567, - Iir_Kind_Active_Attribute => 1571, - Iir_Kind_Last_Event_Attribute => 1575, - Iir_Kind_Last_Active_Attribute => 1579, - Iir_Kind_Last_Value_Attribute => 1583, - Iir_Kind_Driving_Attribute => 1587, - Iir_Kind_Driving_Value_Attribute => 1591, - Iir_Kind_Behavior_Attribute => 1591, - Iir_Kind_Structure_Attribute => 1591, - Iir_Kind_Simple_Name_Attribute => 1598, - Iir_Kind_Instance_Name_Attribute => 1603, - Iir_Kind_Path_Name_Attribute => 1608, - Iir_Kind_Left_Array_Attribute => 1615, - Iir_Kind_Right_Array_Attribute => 1622, - Iir_Kind_High_Array_Attribute => 1629, - Iir_Kind_Low_Array_Attribute => 1636, - Iir_Kind_Length_Array_Attribute => 1643, - Iir_Kind_Ascending_Array_Attribute => 1650, - Iir_Kind_Range_Array_Attribute => 1657, - Iir_Kind_Reverse_Range_Array_Attribute => 1664, - Iir_Kind_Attribute_Name => 1672 + Iir_Kind_Procedure_Declaration => 662, + Iir_Kind_Function_Body => 672, + Iir_Kind_Procedure_Body => 683, + Iir_Kind_Object_Alias_Declaration => 695, + Iir_Kind_File_Declaration => 710, + Iir_Kind_Guard_Signal_Declaration => 723, + Iir_Kind_Signal_Declaration => 740, + Iir_Kind_Variable_Declaration => 753, + Iir_Kind_Constant_Declaration => 767, + Iir_Kind_Iterator_Declaration => 779, + Iir_Kind_Interface_Constant_Declaration => 795, + Iir_Kind_Interface_Variable_Declaration => 811, + Iir_Kind_Interface_Signal_Declaration => 832, + Iir_Kind_Interface_File_Declaration => 848, + Iir_Kind_Interface_Package_Declaration => 857, + Iir_Kind_Identity_Operator => 861, + Iir_Kind_Negation_Operator => 865, + Iir_Kind_Absolute_Operator => 869, + Iir_Kind_Not_Operator => 873, + Iir_Kind_Condition_Operator => 877, + Iir_Kind_Reduction_And_Operator => 881, + Iir_Kind_Reduction_Or_Operator => 885, + Iir_Kind_Reduction_Nand_Operator => 889, + Iir_Kind_Reduction_Nor_Operator => 893, + Iir_Kind_Reduction_Xor_Operator => 897, + Iir_Kind_Reduction_Xnor_Operator => 901, + Iir_Kind_And_Operator => 906, + Iir_Kind_Or_Operator => 911, + Iir_Kind_Nand_Operator => 916, + Iir_Kind_Nor_Operator => 921, + Iir_Kind_Xor_Operator => 926, + Iir_Kind_Xnor_Operator => 931, + Iir_Kind_Equality_Operator => 936, + Iir_Kind_Inequality_Operator => 941, + Iir_Kind_Less_Than_Operator => 946, + Iir_Kind_Less_Than_Or_Equal_Operator => 951, + Iir_Kind_Greater_Than_Operator => 956, + Iir_Kind_Greater_Than_Or_Equal_Operator => 961, + Iir_Kind_Match_Equality_Operator => 966, + Iir_Kind_Match_Inequality_Operator => 971, + Iir_Kind_Match_Less_Than_Operator => 976, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 981, + Iir_Kind_Match_Greater_Than_Operator => 986, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 991, + Iir_Kind_Sll_Operator => 996, + Iir_Kind_Sla_Operator => 1001, + Iir_Kind_Srl_Operator => 1006, + Iir_Kind_Sra_Operator => 1011, + Iir_Kind_Rol_Operator => 1016, + Iir_Kind_Ror_Operator => 1021, + Iir_Kind_Addition_Operator => 1026, + Iir_Kind_Substraction_Operator => 1031, + Iir_Kind_Concatenation_Operator => 1036, + Iir_Kind_Multiplication_Operator => 1041, + Iir_Kind_Division_Operator => 1046, + Iir_Kind_Modulus_Operator => 1051, + Iir_Kind_Remainder_Operator => 1056, + Iir_Kind_Exponentiation_Operator => 1061, + Iir_Kind_Function_Call => 1069, + Iir_Kind_Aggregate => 1075, + Iir_Kind_Parenthesis_Expression => 1078, + Iir_Kind_Qualified_Expression => 1082, + Iir_Kind_Type_Conversion => 1087, + Iir_Kind_Allocator_By_Expression => 1091, + Iir_Kind_Allocator_By_Subtype => 1095, + Iir_Kind_Selected_Element => 1101, + Iir_Kind_Dereference => 1106, + Iir_Kind_Implicit_Dereference => 1111, + Iir_Kind_Slice_Name => 1118, + Iir_Kind_Indexed_Name => 1124, + Iir_Kind_Psl_Expression => 1126, + Iir_Kind_Sensitized_Process_Statement => 1146, + Iir_Kind_Process_Statement => 1166, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1177, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1189, + Iir_Kind_Concurrent_Assertion_Statement => 1197, + Iir_Kind_Psl_Default_Clock => 1201, + Iir_Kind_Psl_Assert_Statement => 1210, + Iir_Kind_Psl_Cover_Statement => 1219, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1226, + Iir_Kind_Block_Statement => 1239, + Iir_Kind_If_Generate_Statement => 1249, + Iir_Kind_For_Generate_Statement => 1258, + Iir_Kind_Component_Instantiation_Statement => 1268, + Iir_Kind_Simple_Simultaneous_Statement => 1275, + Iir_Kind_Generate_Statement_Body => 1286, + Iir_Kind_If_Generate_Else_Clause => 1291, + Iir_Kind_Signal_Assignment_Statement => 1300, + Iir_Kind_Null_Statement => 1304, + Iir_Kind_Assertion_Statement => 1311, + Iir_Kind_Report_Statement => 1317, + Iir_Kind_Wait_Statement => 1324, + Iir_Kind_Variable_Assignment_Statement => 1330, + Iir_Kind_Return_Statement => 1336, + Iir_Kind_For_Loop_Statement => 1345, + Iir_Kind_While_Loop_Statement => 1353, + Iir_Kind_Next_Statement => 1359, + Iir_Kind_Exit_Statement => 1365, + Iir_Kind_Case_Statement => 1373, + Iir_Kind_Procedure_Call_Statement => 1379, + Iir_Kind_If_Statement => 1388, + Iir_Kind_Elsif => 1393, + Iir_Kind_Character_Literal => 1400, + Iir_Kind_Simple_Name => 1407, + Iir_Kind_Selected_Name => 1415, + Iir_Kind_Operator_Symbol => 1420, + Iir_Kind_Selected_By_All_Name => 1425, + Iir_Kind_Parenthesis_Name => 1429, + Iir_Kind_External_Constant_Name => 1438, + Iir_Kind_External_Signal_Name => 1447, + Iir_Kind_External_Variable_Name => 1456, + Iir_Kind_Package_Pathname => 1459, + Iir_Kind_Absolute_Pathname => 1460, + Iir_Kind_Relative_Pathname => 1461, + Iir_Kind_Pathname_Element => 1465, + Iir_Kind_Base_Attribute => 1467, + Iir_Kind_Left_Type_Attribute => 1472, + Iir_Kind_Right_Type_Attribute => 1477, + Iir_Kind_High_Type_Attribute => 1482, + Iir_Kind_Low_Type_Attribute => 1487, + Iir_Kind_Ascending_Type_Attribute => 1492, + Iir_Kind_Image_Attribute => 1498, + Iir_Kind_Value_Attribute => 1504, + Iir_Kind_Pos_Attribute => 1510, + Iir_Kind_Val_Attribute => 1516, + Iir_Kind_Succ_Attribute => 1522, + Iir_Kind_Pred_Attribute => 1528, + Iir_Kind_Leftof_Attribute => 1534, + Iir_Kind_Rightof_Attribute => 1540, + Iir_Kind_Delayed_Attribute => 1548, + Iir_Kind_Stable_Attribute => 1556, + Iir_Kind_Quiet_Attribute => 1564, + Iir_Kind_Transaction_Attribute => 1572, + Iir_Kind_Event_Attribute => 1576, + Iir_Kind_Active_Attribute => 1580, + Iir_Kind_Last_Event_Attribute => 1584, + Iir_Kind_Last_Active_Attribute => 1588, + Iir_Kind_Last_Value_Attribute => 1592, + Iir_Kind_Driving_Attribute => 1596, + Iir_Kind_Driving_Value_Attribute => 1600, + Iir_Kind_Behavior_Attribute => 1600, + Iir_Kind_Structure_Attribute => 1600, + Iir_Kind_Simple_Name_Attribute => 1607, + Iir_Kind_Instance_Name_Attribute => 1612, + Iir_Kind_Path_Name_Attribute => 1617, + Iir_Kind_Left_Array_Attribute => 1624, + Iir_Kind_Right_Array_Attribute => 1631, + Iir_Kind_High_Array_Attribute => 1638, + Iir_Kind_Low_Array_Attribute => 1645, + Iir_Kind_Length_Array_Attribute => 1652, + Iir_Kind_Ascending_Array_Attribute => 1659, + Iir_Kind_Range_Array_Attribute => 1666, + Iir_Kind_Reverse_Range_Array_Attribute => 1673, + Iir_Kind_Attribute_Name => 1681 ); function Get_Fields (K : Iir_Kind) return Fields_Array @@ -4333,6 +4347,8 @@ package body Nodes_Meta is return Get_Has_Mode (N); when Field_Has_Class => return Get_Has_Class (N); + when Field_Suspend_Flag => + return Get_Suspend_Flag (N); when Field_Is_Ref => return Get_Is_Ref (N); when others => @@ -4439,6 +4455,8 @@ package body Nodes_Meta is Set_Has_Mode (N, V); when Field_Has_Class => Set_Has_Class (N, V); + when Field_Suspend_Flag => + Set_Suspend_Flag (N, V); when Field_Is_Ref => Set_Is_Ref (N, V); when others => @@ -9537,6 +9555,24 @@ package body Nodes_Meta is end case; end Has_Has_Class; + function Has_Suspend_Flag (K : Iir_Kind) return Boolean is + begin + case K is + when Iir_Kind_Procedure_Declaration + | Iir_Kind_Procedure_Body + | Iir_Kind_Process_Statement + | Iir_Kind_Concurrent_Procedure_Call_Statement + | Iir_Kind_For_Loop_Statement + | Iir_Kind_While_Loop_Statement + | Iir_Kind_Case_Statement + | Iir_Kind_Procedure_Call_Statement + | Iir_Kind_If_Statement => + return True; + when others => + return False; + end case; + end Has_Suspend_Flag; + function Has_Is_Ref (K : Iir_Kind) return Boolean is begin case K is |