diff options
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 528 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_types.adb | 5 |
3 files changed, 271 insertions, 265 deletions
diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 333dcf6c8..440001102 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -2709,6 +2709,9 @@ package Vhdl.Nodes is -- Get/Set_Has_Signal_Flag (Flag3) -- Iir_Kind_Protected_Type_Declaration (Short) + -- The parent of a protected type declarationi s the same parent as the + -- type declaration. + -- Get/Set_Parent (Field0) -- -- Get/Set_Declaration_Chain (Field1) -- diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index ff3bc6fcf..3c6bb2ef5 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -2953,6 +2953,7 @@ package body Vhdl.Nodes_Meta is Field_End_Has_Reserved_Id, Field_End_Has_Identifier, Field_Type_Staticness, + Field_Parent, Field_Declaration_Chain, Field_Protected_Type_Body, Field_Type_Declarator, @@ -5348,269 +5349,269 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Incomplete_Type_Definition => 307, Iir_Kind_Interface_Type_Definition => 313, Iir_Kind_File_Type_Definition => 319, - Iir_Kind_Protected_Type_Declaration => 328, - Iir_Kind_Record_Type_Definition => 338, - Iir_Kind_Array_Type_Definition => 349, - Iir_Kind_Array_Subtype_Definition => 366, - Iir_Kind_Record_Subtype_Definition => 379, - Iir_Kind_Access_Subtype_Definition => 387, - Iir_Kind_Physical_Subtype_Definition => 397, - Iir_Kind_Floating_Subtype_Definition => 408, - Iir_Kind_Integer_Subtype_Definition => 418, - Iir_Kind_Enumeration_Subtype_Definition => 428, - Iir_Kind_Enumeration_Type_Definition => 439, - Iir_Kind_Integer_Type_Definition => 447, - Iir_Kind_Floating_Type_Definition => 455, - Iir_Kind_Physical_Type_Definition => 466, - Iir_Kind_Range_Expression => 474, - Iir_Kind_Protected_Type_Body => 482, - Iir_Kind_Wildcard_Type_Definition => 486, - Iir_Kind_Foreign_Vector_Type_Definition => 487, - Iir_Kind_Subtype_Definition => 494, - Iir_Kind_Scalar_Nature_Definition => 502, - Iir_Kind_Record_Nature_Definition => 515, - Iir_Kind_Array_Nature_Definition => 529, - Iir_Kind_Array_Subnature_Definition => 544, - Iir_Kind_Overload_List => 545, - Iir_Kind_Foreign_Module => 550, - Iir_Kind_Entity_Declaration => 563, - Iir_Kind_Configuration_Declaration => 573, - Iir_Kind_Context_Declaration => 579, - Iir_Kind_Package_Declaration => 594, - Iir_Kind_Package_Instantiation_Declaration => 608, - Iir_Kind_Vmode_Declaration => 620, - Iir_Kind_Vprop_Declaration => 632, - Iir_Kind_Vunit_Declaration => 645, - Iir_Kind_Package_Body => 653, - Iir_Kind_Architecture_Body => 666, - Iir_Kind_Type_Declaration => 673, - Iir_Kind_Anonymous_Type_Declaration => 679, - Iir_Kind_Subtype_Declaration => 687, - Iir_Kind_Nature_Declaration => 693, - Iir_Kind_Subnature_Declaration => 700, - Iir_Kind_Package_Header => 702, - Iir_Kind_Unit_Declaration => 711, - Iir_Kind_Library_Declaration => 719, - Iir_Kind_Component_Declaration => 729, - Iir_Kind_Attribute_Declaration => 736, - Iir_Kind_Group_Template_Declaration => 742, - Iir_Kind_Group_Declaration => 749, - Iir_Kind_Element_Declaration => 757, - Iir_Kind_Nature_Element_Declaration => 764, - Iir_Kind_Non_Object_Alias_Declaration => 772, - Iir_Kind_Psl_Declaration => 780, - Iir_Kind_Psl_Endpoint_Declaration => 794, - Iir_Kind_Enumeration_Literal => 806, - Iir_Kind_Function_Declaration => 832, - Iir_Kind_Procedure_Declaration => 855, - Iir_Kind_Function_Body => 865, - Iir_Kind_Procedure_Body => 876, - Iir_Kind_Function_Instantiation_Declaration => 887, - Iir_Kind_Procedure_Instantiation_Declaration => 897, - Iir_Kind_Terminal_Declaration => 906, - Iir_Kind_Object_Alias_Declaration => 918, - Iir_Kind_Free_Quantity_Declaration => 930, - Iir_Kind_Spectrum_Quantity_Declaration => 943, - Iir_Kind_Noise_Quantity_Declaration => 955, - Iir_Kind_Across_Quantity_Declaration => 971, - Iir_Kind_Through_Quantity_Declaration => 987, - Iir_Kind_File_Declaration => 1002, - Iir_Kind_Guard_Signal_Declaration => 1016, - Iir_Kind_Signal_Declaration => 1033, - Iir_Kind_Variable_Declaration => 1046, - Iir_Kind_Constant_Declaration => 1060, - Iir_Kind_Iterator_Declaration => 1072, - Iir_Kind_Interface_Constant_Declaration => 1089, - Iir_Kind_Interface_Variable_Declaration => 1105, - Iir_Kind_Interface_Signal_Declaration => 1126, - Iir_Kind_Interface_File_Declaration => 1142, - Iir_Kind_Interface_Quantity_Declaration => 1158, - Iir_Kind_Interface_Terminal_Declaration => 1170, - Iir_Kind_Interface_Type_Declaration => 1181, - Iir_Kind_Interface_Package_Declaration => 1194, - Iir_Kind_Interface_Function_Declaration => 1212, - Iir_Kind_Interface_Procedure_Declaration => 1226, - Iir_Kind_Signal_Attribute_Declaration => 1229, - Iir_Kind_Suspend_State_Declaration => 1232, - Iir_Kind_Identity_Operator => 1236, - Iir_Kind_Negation_Operator => 1240, - Iir_Kind_Absolute_Operator => 1244, - Iir_Kind_Not_Operator => 1248, - Iir_Kind_Implicit_Condition_Operator => 1252, - Iir_Kind_Condition_Operator => 1256, - Iir_Kind_Reduction_And_Operator => 1260, - Iir_Kind_Reduction_Or_Operator => 1264, - Iir_Kind_Reduction_Nand_Operator => 1268, - Iir_Kind_Reduction_Nor_Operator => 1272, - Iir_Kind_Reduction_Xor_Operator => 1276, - Iir_Kind_Reduction_Xnor_Operator => 1280, - Iir_Kind_And_Operator => 1285, - Iir_Kind_Or_Operator => 1290, - Iir_Kind_Nand_Operator => 1295, - Iir_Kind_Nor_Operator => 1300, - Iir_Kind_Xor_Operator => 1305, - Iir_Kind_Xnor_Operator => 1310, - Iir_Kind_Equality_Operator => 1315, - Iir_Kind_Inequality_Operator => 1320, - Iir_Kind_Less_Than_Operator => 1325, - Iir_Kind_Less_Than_Or_Equal_Operator => 1330, - Iir_Kind_Greater_Than_Operator => 1335, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1340, - Iir_Kind_Match_Equality_Operator => 1345, - Iir_Kind_Match_Inequality_Operator => 1350, - Iir_Kind_Match_Less_Than_Operator => 1355, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1360, - Iir_Kind_Match_Greater_Than_Operator => 1365, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1370, - Iir_Kind_Sll_Operator => 1375, - Iir_Kind_Sla_Operator => 1380, - Iir_Kind_Srl_Operator => 1385, - Iir_Kind_Sra_Operator => 1390, - Iir_Kind_Rol_Operator => 1395, - Iir_Kind_Ror_Operator => 1400, - Iir_Kind_Addition_Operator => 1405, - Iir_Kind_Substraction_Operator => 1410, - Iir_Kind_Concatenation_Operator => 1415, - Iir_Kind_Multiplication_Operator => 1420, - Iir_Kind_Division_Operator => 1425, - Iir_Kind_Modulus_Operator => 1430, - Iir_Kind_Remainder_Operator => 1435, - Iir_Kind_Exponentiation_Operator => 1440, - Iir_Kind_Function_Call => 1448, - Iir_Kind_Aggregate => 1455, - Iir_Kind_Parenthesis_Expression => 1458, - Iir_Kind_Qualified_Expression => 1462, - Iir_Kind_Type_Conversion => 1467, - Iir_Kind_Allocator_By_Expression => 1472, - Iir_Kind_Allocator_By_Subtype => 1478, - Iir_Kind_Selected_Element => 1486, - Iir_Kind_Dereference => 1491, - Iir_Kind_Implicit_Dereference => 1496, - Iir_Kind_Slice_Name => 1503, - Iir_Kind_Indexed_Name => 1509, - Iir_Kind_Psl_Prev => 1515, - Iir_Kind_Psl_Stable => 1520, - Iir_Kind_Psl_Rose => 1525, - Iir_Kind_Psl_Fell => 1530, - Iir_Kind_Psl_Onehot => 1533, - Iir_Kind_Psl_Onehot0 => 1536, - Iir_Kind_Psl_Expression => 1538, - Iir_Kind_Sensitized_Process_Statement => 1559, - Iir_Kind_Process_Statement => 1579, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1592, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1605, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1619, - Iir_Kind_Concurrent_Assertion_Statement => 1627, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1634, - Iir_Kind_Concurrent_Break_Statement => 1642, - Iir_Kind_Psl_Assert_Directive => 1656, - Iir_Kind_Psl_Assume_Directive => 1668, - Iir_Kind_Psl_Cover_Directive => 1680, - Iir_Kind_Psl_Restrict_Directive => 1691, - Iir_Kind_Block_Statement => 1705, - Iir_Kind_If_Generate_Statement => 1716, - Iir_Kind_Case_Generate_Statement => 1725, - Iir_Kind_For_Generate_Statement => 1734, - Iir_Kind_Component_Instantiation_Statement => 1745, - Iir_Kind_Psl_Default_Clock => 1748, - Iir_Kind_Generate_Statement_Body => 1759, - Iir_Kind_If_Generate_Else_Clause => 1765, - Iir_Kind_Simple_Simultaneous_Statement => 1772, - Iir_Kind_Simultaneous_Null_Statement => 1776, - Iir_Kind_Simultaneous_Procedural_Statement => 1787, - Iir_Kind_Simultaneous_Case_Statement => 1796, - Iir_Kind_Simultaneous_If_Statement => 1805, - Iir_Kind_Simultaneous_Elsif => 1811, - Iir_Kind_Simple_Signal_Assignment_Statement => 1822, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1833, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1845, - Iir_Kind_Signal_Force_Assignment_Statement => 1855, - Iir_Kind_Signal_Release_Assignment_Statement => 1864, - Iir_Kind_Null_Statement => 1868, - Iir_Kind_Assertion_Statement => 1875, - Iir_Kind_Report_Statement => 1881, - Iir_Kind_Wait_Statement => 1889, - Iir_Kind_Variable_Assignment_Statement => 1896, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1903, - Iir_Kind_Return_Statement => 1909, - Iir_Kind_For_Loop_Statement => 1920, - Iir_Kind_While_Loop_Statement => 1931, - Iir_Kind_Next_Statement => 1938, - Iir_Kind_Exit_Statement => 1945, - Iir_Kind_Case_Statement => 1954, - Iir_Kind_Procedure_Call_Statement => 1960, - Iir_Kind_Break_Statement => 1967, - Iir_Kind_If_Statement => 1977, - Iir_Kind_Suspend_State_Statement => 1981, - Iir_Kind_Elsif => 1987, - Iir_Kind_Character_Literal => 1994, - Iir_Kind_Simple_Name => 2001, - Iir_Kind_Selected_Name => 2009, - Iir_Kind_Operator_Symbol => 2014, - Iir_Kind_Reference_Name => 2019, - Iir_Kind_External_Constant_Name => 2028, - Iir_Kind_External_Signal_Name => 2037, - Iir_Kind_External_Variable_Name => 2047, - Iir_Kind_Selected_By_All_Name => 2053, - Iir_Kind_Parenthesis_Name => 2058, - Iir_Kind_Package_Pathname => 2062, - Iir_Kind_Absolute_Pathname => 2063, - Iir_Kind_Relative_Pathname => 2064, - Iir_Kind_Pathname_Element => 2069, - Iir_Kind_Base_Attribute => 2071, - Iir_Kind_Subtype_Attribute => 2076, - Iir_Kind_Element_Attribute => 2081, - Iir_Kind_Across_Attribute => 2086, - Iir_Kind_Through_Attribute => 2091, - Iir_Kind_Nature_Reference_Attribute => 2095, - Iir_Kind_Left_Type_Attribute => 2100, - Iir_Kind_Right_Type_Attribute => 2105, - Iir_Kind_High_Type_Attribute => 2110, - Iir_Kind_Low_Type_Attribute => 2115, - Iir_Kind_Ascending_Type_Attribute => 2120, - Iir_Kind_Image_Attribute => 2126, - Iir_Kind_Value_Attribute => 2132, - Iir_Kind_Pos_Attribute => 2138, - Iir_Kind_Val_Attribute => 2144, - Iir_Kind_Succ_Attribute => 2150, - Iir_Kind_Pred_Attribute => 2156, - Iir_Kind_Leftof_Attribute => 2162, - Iir_Kind_Rightof_Attribute => 2168, - Iir_Kind_Signal_Slew_Attribute => 2176, - Iir_Kind_Quantity_Slew_Attribute => 2184, - Iir_Kind_Ramp_Attribute => 2192, - Iir_Kind_Zoh_Attribute => 2200, - Iir_Kind_Ltf_Attribute => 2208, - Iir_Kind_Ztf_Attribute => 2218, - Iir_Kind_Dot_Attribute => 2225, - Iir_Kind_Integ_Attribute => 2232, - Iir_Kind_Above_Attribute => 2240, - Iir_Kind_Quantity_Delayed_Attribute => 2248, - Iir_Kind_Delayed_Attribute => 2257, - Iir_Kind_Stable_Attribute => 2266, - Iir_Kind_Quiet_Attribute => 2275, - Iir_Kind_Transaction_Attribute => 2284, - Iir_Kind_Event_Attribute => 2288, - Iir_Kind_Active_Attribute => 2292, - Iir_Kind_Last_Event_Attribute => 2296, - Iir_Kind_Last_Active_Attribute => 2300, - Iir_Kind_Last_Value_Attribute => 2304, - Iir_Kind_Driving_Attribute => 2308, - Iir_Kind_Driving_Value_Attribute => 2312, - Iir_Kind_Behavior_Attribute => 2312, - Iir_Kind_Structure_Attribute => 2312, - Iir_Kind_Simple_Name_Attribute => 2319, - Iir_Kind_Instance_Name_Attribute => 2324, - Iir_Kind_Path_Name_Attribute => 2329, - Iir_Kind_Left_Array_Attribute => 2336, - Iir_Kind_Right_Array_Attribute => 2343, - Iir_Kind_High_Array_Attribute => 2350, - Iir_Kind_Low_Array_Attribute => 2357, - Iir_Kind_Length_Array_Attribute => 2364, - Iir_Kind_Ascending_Array_Attribute => 2371, - Iir_Kind_Range_Array_Attribute => 2378, - Iir_Kind_Reverse_Range_Array_Attribute => 2385, - Iir_Kind_Attribute_Name => 2394 + Iir_Kind_Protected_Type_Declaration => 329, + Iir_Kind_Record_Type_Definition => 339, + Iir_Kind_Array_Type_Definition => 350, + Iir_Kind_Array_Subtype_Definition => 367, + Iir_Kind_Record_Subtype_Definition => 380, + Iir_Kind_Access_Subtype_Definition => 388, + Iir_Kind_Physical_Subtype_Definition => 398, + Iir_Kind_Floating_Subtype_Definition => 409, + Iir_Kind_Integer_Subtype_Definition => 419, + Iir_Kind_Enumeration_Subtype_Definition => 429, + Iir_Kind_Enumeration_Type_Definition => 440, + Iir_Kind_Integer_Type_Definition => 448, + Iir_Kind_Floating_Type_Definition => 456, + Iir_Kind_Physical_Type_Definition => 467, + Iir_Kind_Range_Expression => 475, + Iir_Kind_Protected_Type_Body => 483, + Iir_Kind_Wildcard_Type_Definition => 487, + Iir_Kind_Foreign_Vector_Type_Definition => 488, + Iir_Kind_Subtype_Definition => 495, + Iir_Kind_Scalar_Nature_Definition => 503, + Iir_Kind_Record_Nature_Definition => 516, + Iir_Kind_Array_Nature_Definition => 530, + Iir_Kind_Array_Subnature_Definition => 545, + Iir_Kind_Overload_List => 546, + Iir_Kind_Foreign_Module => 551, + Iir_Kind_Entity_Declaration => 564, + Iir_Kind_Configuration_Declaration => 574, + Iir_Kind_Context_Declaration => 580, + Iir_Kind_Package_Declaration => 595, + Iir_Kind_Package_Instantiation_Declaration => 609, + Iir_Kind_Vmode_Declaration => 621, + Iir_Kind_Vprop_Declaration => 633, + Iir_Kind_Vunit_Declaration => 646, + Iir_Kind_Package_Body => 654, + Iir_Kind_Architecture_Body => 667, + Iir_Kind_Type_Declaration => 674, + Iir_Kind_Anonymous_Type_Declaration => 680, + Iir_Kind_Subtype_Declaration => 688, + Iir_Kind_Nature_Declaration => 694, + Iir_Kind_Subnature_Declaration => 701, + Iir_Kind_Package_Header => 703, + Iir_Kind_Unit_Declaration => 712, + Iir_Kind_Library_Declaration => 720, + Iir_Kind_Component_Declaration => 730, + Iir_Kind_Attribute_Declaration => 737, + Iir_Kind_Group_Template_Declaration => 743, + Iir_Kind_Group_Declaration => 750, + Iir_Kind_Element_Declaration => 758, + Iir_Kind_Nature_Element_Declaration => 765, + Iir_Kind_Non_Object_Alias_Declaration => 773, + Iir_Kind_Psl_Declaration => 781, + Iir_Kind_Psl_Endpoint_Declaration => 795, + Iir_Kind_Enumeration_Literal => 807, + Iir_Kind_Function_Declaration => 833, + Iir_Kind_Procedure_Declaration => 856, + Iir_Kind_Function_Body => 866, + Iir_Kind_Procedure_Body => 877, + Iir_Kind_Function_Instantiation_Declaration => 888, + Iir_Kind_Procedure_Instantiation_Declaration => 898, + Iir_Kind_Terminal_Declaration => 907, + Iir_Kind_Object_Alias_Declaration => 919, + Iir_Kind_Free_Quantity_Declaration => 931, + Iir_Kind_Spectrum_Quantity_Declaration => 944, + Iir_Kind_Noise_Quantity_Declaration => 956, + Iir_Kind_Across_Quantity_Declaration => 972, + Iir_Kind_Through_Quantity_Declaration => 988, + Iir_Kind_File_Declaration => 1003, + Iir_Kind_Guard_Signal_Declaration => 1017, + Iir_Kind_Signal_Declaration => 1034, + Iir_Kind_Variable_Declaration => 1047, + Iir_Kind_Constant_Declaration => 1061, + Iir_Kind_Iterator_Declaration => 1073, + Iir_Kind_Interface_Constant_Declaration => 1090, + Iir_Kind_Interface_Variable_Declaration => 1106, + Iir_Kind_Interface_Signal_Declaration => 1127, + Iir_Kind_Interface_File_Declaration => 1143, + Iir_Kind_Interface_Quantity_Declaration => 1159, + Iir_Kind_Interface_Terminal_Declaration => 1171, + Iir_Kind_Interface_Type_Declaration => 1182, + Iir_Kind_Interface_Package_Declaration => 1195, + Iir_Kind_Interface_Function_Declaration => 1213, + Iir_Kind_Interface_Procedure_Declaration => 1227, + Iir_Kind_Signal_Attribute_Declaration => 1230, + Iir_Kind_Suspend_State_Declaration => 1233, + Iir_Kind_Identity_Operator => 1237, + Iir_Kind_Negation_Operator => 1241, + Iir_Kind_Absolute_Operator => 1245, + Iir_Kind_Not_Operator => 1249, + Iir_Kind_Implicit_Condition_Operator => 1253, + Iir_Kind_Condition_Operator => 1257, + Iir_Kind_Reduction_And_Operator => 1261, + Iir_Kind_Reduction_Or_Operator => 1265, + Iir_Kind_Reduction_Nand_Operator => 1269, + Iir_Kind_Reduction_Nor_Operator => 1273, + Iir_Kind_Reduction_Xor_Operator => 1277, + Iir_Kind_Reduction_Xnor_Operator => 1281, + Iir_Kind_And_Operator => 1286, + Iir_Kind_Or_Operator => 1291, + Iir_Kind_Nand_Operator => 1296, + Iir_Kind_Nor_Operator => 1301, + Iir_Kind_Xor_Operator => 1306, + Iir_Kind_Xnor_Operator => 1311, + Iir_Kind_Equality_Operator => 1316, + Iir_Kind_Inequality_Operator => 1321, + Iir_Kind_Less_Than_Operator => 1326, + Iir_Kind_Less_Than_Or_Equal_Operator => 1331, + Iir_Kind_Greater_Than_Operator => 1336, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1341, + Iir_Kind_Match_Equality_Operator => 1346, + Iir_Kind_Match_Inequality_Operator => 1351, + Iir_Kind_Match_Less_Than_Operator => 1356, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1361, + Iir_Kind_Match_Greater_Than_Operator => 1366, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1371, + Iir_Kind_Sll_Operator => 1376, + Iir_Kind_Sla_Operator => 1381, + Iir_Kind_Srl_Operator => 1386, + Iir_Kind_Sra_Operator => 1391, + Iir_Kind_Rol_Operator => 1396, + Iir_Kind_Ror_Operator => 1401, + Iir_Kind_Addition_Operator => 1406, + Iir_Kind_Substraction_Operator => 1411, + Iir_Kind_Concatenation_Operator => 1416, + Iir_Kind_Multiplication_Operator => 1421, + Iir_Kind_Division_Operator => 1426, + Iir_Kind_Modulus_Operator => 1431, + Iir_Kind_Remainder_Operator => 1436, + Iir_Kind_Exponentiation_Operator => 1441, + Iir_Kind_Function_Call => 1449, + Iir_Kind_Aggregate => 1456, + Iir_Kind_Parenthesis_Expression => 1459, + Iir_Kind_Qualified_Expression => 1463, + Iir_Kind_Type_Conversion => 1468, + Iir_Kind_Allocator_By_Expression => 1473, + Iir_Kind_Allocator_By_Subtype => 1479, + Iir_Kind_Selected_Element => 1487, + Iir_Kind_Dereference => 1492, + Iir_Kind_Implicit_Dereference => 1497, + Iir_Kind_Slice_Name => 1504, + Iir_Kind_Indexed_Name => 1510, + Iir_Kind_Psl_Prev => 1516, + Iir_Kind_Psl_Stable => 1521, + Iir_Kind_Psl_Rose => 1526, + Iir_Kind_Psl_Fell => 1531, + Iir_Kind_Psl_Onehot => 1534, + Iir_Kind_Psl_Onehot0 => 1537, + Iir_Kind_Psl_Expression => 1539, + Iir_Kind_Sensitized_Process_Statement => 1560, + Iir_Kind_Process_Statement => 1580, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1593, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1606, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1620, + Iir_Kind_Concurrent_Assertion_Statement => 1628, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1635, + Iir_Kind_Concurrent_Break_Statement => 1643, + Iir_Kind_Psl_Assert_Directive => 1657, + Iir_Kind_Psl_Assume_Directive => 1669, + Iir_Kind_Psl_Cover_Directive => 1681, + Iir_Kind_Psl_Restrict_Directive => 1692, + Iir_Kind_Block_Statement => 1706, + Iir_Kind_If_Generate_Statement => 1717, + Iir_Kind_Case_Generate_Statement => 1726, + Iir_Kind_For_Generate_Statement => 1735, + Iir_Kind_Component_Instantiation_Statement => 1746, + Iir_Kind_Psl_Default_Clock => 1749, + Iir_Kind_Generate_Statement_Body => 1760, + Iir_Kind_If_Generate_Else_Clause => 1766, + Iir_Kind_Simple_Simultaneous_Statement => 1773, + Iir_Kind_Simultaneous_Null_Statement => 1777, + Iir_Kind_Simultaneous_Procedural_Statement => 1788, + Iir_Kind_Simultaneous_Case_Statement => 1797, + Iir_Kind_Simultaneous_If_Statement => 1806, + Iir_Kind_Simultaneous_Elsif => 1812, + Iir_Kind_Simple_Signal_Assignment_Statement => 1823, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1834, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1846, + Iir_Kind_Signal_Force_Assignment_Statement => 1856, + Iir_Kind_Signal_Release_Assignment_Statement => 1865, + Iir_Kind_Null_Statement => 1869, + Iir_Kind_Assertion_Statement => 1876, + Iir_Kind_Report_Statement => 1882, + Iir_Kind_Wait_Statement => 1890, + Iir_Kind_Variable_Assignment_Statement => 1897, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1904, + Iir_Kind_Return_Statement => 1910, + Iir_Kind_For_Loop_Statement => 1921, + Iir_Kind_While_Loop_Statement => 1932, + Iir_Kind_Next_Statement => 1939, + Iir_Kind_Exit_Statement => 1946, + Iir_Kind_Case_Statement => 1955, + Iir_Kind_Procedure_Call_Statement => 1961, + Iir_Kind_Break_Statement => 1968, + Iir_Kind_If_Statement => 1978, + Iir_Kind_Suspend_State_Statement => 1982, + Iir_Kind_Elsif => 1988, + Iir_Kind_Character_Literal => 1995, + Iir_Kind_Simple_Name => 2002, + Iir_Kind_Selected_Name => 2010, + Iir_Kind_Operator_Symbol => 2015, + Iir_Kind_Reference_Name => 2020, + Iir_Kind_External_Constant_Name => 2029, + Iir_Kind_External_Signal_Name => 2038, + Iir_Kind_External_Variable_Name => 2048, + Iir_Kind_Selected_By_All_Name => 2054, + Iir_Kind_Parenthesis_Name => 2059, + Iir_Kind_Package_Pathname => 2063, + Iir_Kind_Absolute_Pathname => 2064, + Iir_Kind_Relative_Pathname => 2065, + Iir_Kind_Pathname_Element => 2070, + Iir_Kind_Base_Attribute => 2072, + Iir_Kind_Subtype_Attribute => 2077, + Iir_Kind_Element_Attribute => 2082, + Iir_Kind_Across_Attribute => 2087, + Iir_Kind_Through_Attribute => 2092, + Iir_Kind_Nature_Reference_Attribute => 2096, + Iir_Kind_Left_Type_Attribute => 2101, + Iir_Kind_Right_Type_Attribute => 2106, + Iir_Kind_High_Type_Attribute => 2111, + Iir_Kind_Low_Type_Attribute => 2116, + Iir_Kind_Ascending_Type_Attribute => 2121, + Iir_Kind_Image_Attribute => 2127, + Iir_Kind_Value_Attribute => 2133, + Iir_Kind_Pos_Attribute => 2139, + Iir_Kind_Val_Attribute => 2145, + Iir_Kind_Succ_Attribute => 2151, + Iir_Kind_Pred_Attribute => 2157, + Iir_Kind_Leftof_Attribute => 2163, + Iir_Kind_Rightof_Attribute => 2169, + Iir_Kind_Signal_Slew_Attribute => 2177, + Iir_Kind_Quantity_Slew_Attribute => 2185, + Iir_Kind_Ramp_Attribute => 2193, + Iir_Kind_Zoh_Attribute => 2201, + Iir_Kind_Ltf_Attribute => 2209, + Iir_Kind_Ztf_Attribute => 2219, + Iir_Kind_Dot_Attribute => 2226, + Iir_Kind_Integ_Attribute => 2233, + Iir_Kind_Above_Attribute => 2241, + Iir_Kind_Quantity_Delayed_Attribute => 2249, + Iir_Kind_Delayed_Attribute => 2258, + Iir_Kind_Stable_Attribute => 2267, + Iir_Kind_Quiet_Attribute => 2276, + Iir_Kind_Transaction_Attribute => 2285, + Iir_Kind_Event_Attribute => 2289, + Iir_Kind_Active_Attribute => 2293, + Iir_Kind_Last_Event_Attribute => 2297, + Iir_Kind_Last_Active_Attribute => 2301, + Iir_Kind_Last_Value_Attribute => 2305, + Iir_Kind_Driving_Attribute => 2309, + Iir_Kind_Driving_Value_Attribute => 2313, + Iir_Kind_Behavior_Attribute => 2313, + Iir_Kind_Structure_Attribute => 2313, + Iir_Kind_Simple_Name_Attribute => 2320, + Iir_Kind_Instance_Name_Attribute => 2325, + Iir_Kind_Path_Name_Attribute => 2330, + Iir_Kind_Left_Array_Attribute => 2337, + Iir_Kind_Right_Array_Attribute => 2344, + Iir_Kind_High_Array_Attribute => 2351, + Iir_Kind_Low_Array_Attribute => 2358, + Iir_Kind_Length_Array_Attribute => 2365, + Iir_Kind_Ascending_Array_Attribute => 2372, + Iir_Kind_Range_Array_Attribute => 2379, + Iir_Kind_Reverse_Range_Array_Attribute => 2386, + Iir_Kind_Attribute_Name => 2395 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -10976,6 +10977,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Disconnection_Specification | Iir_Kind_Step_Limit_Specification | Iir_Kind_Configuration_Specification + | Iir_Kind_Protected_Type_Declaration | Iir_Kind_Protected_Type_Body | Iir_Kind_Foreign_Module | Iir_Kind_Entity_Declaration diff --git a/src/vhdl/vhdl-sem_types.adb b/src/vhdl/vhdl-sem_types.adb index 6a37771b1..31f5f2294 100644 --- a/src/vhdl/vhdl-sem_types.adb +++ b/src/vhdl/vhdl-sem_types.adb @@ -570,13 +570,14 @@ package body Vhdl.Sem_Types is procedure Sem_Protected_Type_Declaration (Type_Decl : Iir_Type_Declaration) is - Decl : Iir_Protected_Type_Declaration; + Decl : constant Iir_Protected_Type_Declaration := + Get_Type_Definition (Type_Decl); El : Iir; begin - Decl := Get_Type_Definition (Type_Decl); Set_Resolved_Flag (Decl, False); Set_Signal_Type_Flag (Decl, False); Set_Type_Staticness (Decl, None); + Set_Parent (Decl, Get_Parent (Type_Decl)); -- LRM 10.3 Visibility -- [...] except in the declaration of a design_unit or a protected type |