diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-05-17 06:45:27 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-05-17 06:45:27 +0200 |
commit | def68da3c9599dfd3818fe338551a3ae1bfb30aa (patch) | |
tree | a57099fc930b8cc169a80777203d83d035f4ffcc /src/vhdl | |
parent | fee2b44d9642a9a8d278db3aa32bb2d80b49bafe (diff) | |
download | ghdl-def68da3c9599dfd3818fe338551a3ae1bfb30aa.tar.gz ghdl-def68da3c9599dfd3818fe338551a3ae1bfb30aa.tar.bz2 ghdl-def68da3c9599dfd3818fe338551a3ae1bfb30aa.zip |
vhdl: add suspend state pseudo decl and stmt. WIP.
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-elocations.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-elocations.ads | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-errors.adb | 6 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 19 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 372 | ||||
-rw-r--r-- | src/vhdl/vhdl-utils.adb | 74 |
7 files changed, 264 insertions, 214 deletions
diff --git a/src/vhdl/vhdl-elocations.adb b/src/vhdl/vhdl-elocations.adb index dbd610d3c..b428c4fab 100644 --- a/src/vhdl/vhdl-elocations.adb +++ b/src/vhdl/vhdl-elocations.adb @@ -297,6 +297,7 @@ package body Vhdl.Elocations is | Iir_Kind_Interface_Function_Declaration | Iir_Kind_Interface_Procedure_Declaration | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Identity_Operator | Iir_Kind_Negation_Operator | Iir_Kind_Absolute_Operator @@ -386,6 +387,7 @@ package body Vhdl.Elocations is | Iir_Kind_Exit_Statement | Iir_Kind_Procedure_Call_Statement | Iir_Kind_Break_Statement + | Iir_Kind_Suspend_State_Statement | Iir_Kind_Character_Literal | Iir_Kind_Simple_Name | Iir_Kind_Selected_Name diff --git a/src/vhdl/vhdl-elocations.ads b/src/vhdl/vhdl-elocations.ads index eaa1f78a1..810507a9f 100644 --- a/src/vhdl/vhdl-elocations.ads +++ b/src/vhdl/vhdl-elocations.ads @@ -280,6 +280,7 @@ package Vhdl.Elocations is -- Iir_Kind_Guard_Signal_Declaration (None) -- Iir_Kind_Signal_Attribute_Declaration (None) + -- Iir_Kind_Suspend_State_Declaration (None) -- Iir_Kind_Constant_Declaration (L1) -- Iir_Kind_Iterator_Declaration (L1) @@ -566,6 +567,8 @@ package Vhdl.Elocations is -- Iir_Kind_Break_Element (None) + -- Iir_Kind_Suspend_State_Statement (None) + ---------------- -- operators -- ---------------- diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb index ddb2a9868..3388fcde8 100644 --- a/src/vhdl/vhdl-errors.adb +++ b/src/vhdl/vhdl-errors.adb @@ -495,6 +495,9 @@ package body Vhdl.Errors is when Iir_Kind_Signal_Attribute_Declaration => -- Should not appear. return "signal attribute"; + when Iir_Kind_Suspend_State_Declaration => + -- Should not appear. + return "suspend state variable"; when Iir_Kind_Group_Template_Declaration => return Disp_Identifier (Node, "group template"); when Iir_Kind_Group_Declaration => @@ -841,6 +844,9 @@ package body Vhdl.Errors is return Disp_Label (Node, "report statement"); when Iir_Kind_Break_Statement => return Disp_Label (Node, "break statement"); + when Iir_Kind_Suspend_State_Statement => + -- Should not appear. + return "suspend state statement"; when Iir_Kind_Block_Configuration => return "block configuration"; diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb index 947cd771d..360fdbec5 100644 --- a/src/vhdl/vhdl-nodes.adb +++ b/src/vhdl/vhdl-nodes.adb @@ -1083,6 +1083,7 @@ package body Vhdl.Nodes is | Iir_Kind_Interface_Terminal_Declaration | Iir_Kind_Interface_Type_Declaration | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Identity_Operator | Iir_Kind_Negation_Operator | Iir_Kind_Absolute_Operator @@ -1178,6 +1179,7 @@ package body Vhdl.Nodes is | Iir_Kind_Break_Statement | Iir_Kind_If_Statement | Iir_Kind_Elsif + | Iir_Kind_Suspend_State_Statement | Iir_Kind_Character_Literal | Iir_Kind_Simple_Name | Iir_Kind_Selected_Name diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 1e97286d0..ca38cec6c 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -1872,6 +1872,15 @@ package Vhdl.Nodes is -- Chain of signals -- Get/Set_Signal_Attribute_Chain (Field3) + -- Iir_Kind_Suspend_State_Declaration (Short) + -- + -- Implicit state variable to handle suspension. Added after semantic + -- analysis. + -- + -- Get/Set_Parent (Field0) + -- + -- Get/Set_Chain (Field2) + -- Iir_Kind_Constant_Declaration (Medium) -- Iir_Kind_Iterator_Declaration (Short) -- @@ -4122,6 +4131,14 @@ package Vhdl.Nodes is -- -- Get/Set_Expression (Field5) + -- Iir_Kind_Suspend_State_Statement (Short) + -- + -- Implicit statement added to mark a suspend point. + -- + -- Get/Set_Parent (Field0) + -- + -- Get/Set_Chain (Field2) + ---------------- -- operators -- ---------------- @@ -4998,6 +5015,7 @@ package Vhdl.Nodes is Iir_Kind_Interface_Procedure_Declaration, -- interface Iir_Kind_Signal_Attribute_Declaration, + Iir_Kind_Suspend_State_Declaration, -- Expressions. Iir_Kind_Identity_Operator, @@ -5118,6 +5136,7 @@ package Vhdl.Nodes is Iir_Kind_Break_Statement, Iir_Kind_If_Statement, Iir_Kind_Elsif, + Iir_Kind_Suspend_State_Statement, -- Names Iir_Kind_Character_Literal, -- denoting_name diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 9fd729275..b4ef6910e 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -1436,6 +1436,8 @@ package body Vhdl.Nodes_Meta is return "interface_procedure_declaration"; when Iir_Kind_Signal_Attribute_Declaration => return "signal_attribute_declaration"; + when Iir_Kind_Suspend_State_Declaration => + return "suspend_state_declaration"; when Iir_Kind_Identity_Operator => return "identity_operator"; when Iir_Kind_Negation_Operator => @@ -1656,6 +1658,8 @@ package body Vhdl.Nodes_Meta is return "if_statement"; when Iir_Kind_Elsif => return "elsif"; + when Iir_Kind_Suspend_State_Statement => + return "suspend_state_statement"; when Iir_Kind_Character_Literal => return "character_literal"; when Iir_Kind_Simple_Name => @@ -3922,6 +3926,9 @@ package body Vhdl.Nodes_Meta is Field_Parent, Field_Chain, Field_Signal_Attribute_Chain, + -- Iir_Kind_Suspend_State_Declaration + Field_Parent, + Field_Chain, -- Iir_Kind_Identity_Operator Field_Expr_Staticness, Field_Type, @@ -4783,6 +4790,9 @@ package body Vhdl.Nodes_Meta is Field_Condition, Field_Sequential_Statement_Chain, Field_Else_Clause, + -- Iir_Kind_Suspend_State_Statement + Field_Parent, + Field_Chain, -- Iir_Kind_Character_Literal Field_Identifier, Field_Is_Forward_Ref, @@ -5404,184 +5414,186 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Interface_Function_Declaration => 1213, Iir_Kind_Interface_Procedure_Declaration => 1227, Iir_Kind_Signal_Attribute_Declaration => 1230, - Iir_Kind_Identity_Operator => 1234, - Iir_Kind_Negation_Operator => 1238, - Iir_Kind_Absolute_Operator => 1242, - Iir_Kind_Not_Operator => 1246, - Iir_Kind_Implicit_Condition_Operator => 1250, - Iir_Kind_Condition_Operator => 1254, - Iir_Kind_Reduction_And_Operator => 1258, - Iir_Kind_Reduction_Or_Operator => 1262, - Iir_Kind_Reduction_Nand_Operator => 1266, - Iir_Kind_Reduction_Nor_Operator => 1270, - Iir_Kind_Reduction_Xor_Operator => 1274, - Iir_Kind_Reduction_Xnor_Operator => 1278, - Iir_Kind_And_Operator => 1283, - Iir_Kind_Or_Operator => 1288, - Iir_Kind_Nand_Operator => 1293, - Iir_Kind_Nor_Operator => 1298, - Iir_Kind_Xor_Operator => 1303, - Iir_Kind_Xnor_Operator => 1308, - Iir_Kind_Equality_Operator => 1313, - Iir_Kind_Inequality_Operator => 1318, - Iir_Kind_Less_Than_Operator => 1323, - Iir_Kind_Less_Than_Or_Equal_Operator => 1328, - Iir_Kind_Greater_Than_Operator => 1333, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1338, - Iir_Kind_Match_Equality_Operator => 1343, - Iir_Kind_Match_Inequality_Operator => 1348, - Iir_Kind_Match_Less_Than_Operator => 1353, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1358, - Iir_Kind_Match_Greater_Than_Operator => 1363, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1368, - Iir_Kind_Sll_Operator => 1373, - Iir_Kind_Sla_Operator => 1378, - Iir_Kind_Srl_Operator => 1383, - Iir_Kind_Sra_Operator => 1388, - Iir_Kind_Rol_Operator => 1393, - Iir_Kind_Ror_Operator => 1398, - Iir_Kind_Addition_Operator => 1403, - Iir_Kind_Substraction_Operator => 1408, - Iir_Kind_Concatenation_Operator => 1413, - Iir_Kind_Multiplication_Operator => 1418, - Iir_Kind_Division_Operator => 1423, - Iir_Kind_Modulus_Operator => 1428, - Iir_Kind_Remainder_Operator => 1433, - Iir_Kind_Exponentiation_Operator => 1438, - Iir_Kind_Function_Call => 1446, - Iir_Kind_Aggregate => 1453, - Iir_Kind_Parenthesis_Expression => 1456, - Iir_Kind_Qualified_Expression => 1460, - Iir_Kind_Type_Conversion => 1465, - Iir_Kind_Allocator_By_Expression => 1470, - Iir_Kind_Allocator_By_Subtype => 1476, - Iir_Kind_Selected_Element => 1484, - Iir_Kind_Dereference => 1489, - Iir_Kind_Implicit_Dereference => 1494, - Iir_Kind_Slice_Name => 1501, - Iir_Kind_Indexed_Name => 1507, - Iir_Kind_Psl_Prev => 1513, - Iir_Kind_Psl_Stable => 1518, - Iir_Kind_Psl_Rose => 1523, - Iir_Kind_Psl_Fell => 1528, - Iir_Kind_Psl_Onehot => 1531, - Iir_Kind_Psl_Onehot0 => 1534, - Iir_Kind_Psl_Expression => 1536, - Iir_Kind_Sensitized_Process_Statement => 1557, - Iir_Kind_Process_Statement => 1577, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1590, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1603, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1617, - Iir_Kind_Concurrent_Assertion_Statement => 1625, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1632, - Iir_Kind_Concurrent_Break_Statement => 1640, - Iir_Kind_Psl_Assert_Directive => 1654, - Iir_Kind_Psl_Assume_Directive => 1666, - Iir_Kind_Psl_Cover_Directive => 1678, - Iir_Kind_Psl_Restrict_Directive => 1689, - Iir_Kind_Block_Statement => 1703, - Iir_Kind_If_Generate_Statement => 1714, - Iir_Kind_Case_Generate_Statement => 1723, - Iir_Kind_For_Generate_Statement => 1732, - Iir_Kind_Component_Instantiation_Statement => 1743, - Iir_Kind_Psl_Default_Clock => 1746, - Iir_Kind_Generate_Statement_Body => 1757, - Iir_Kind_If_Generate_Else_Clause => 1763, - Iir_Kind_Simple_Simultaneous_Statement => 1770, - Iir_Kind_Simultaneous_Null_Statement => 1774, - Iir_Kind_Simultaneous_Procedural_Statement => 1785, - Iir_Kind_Simultaneous_Case_Statement => 1794, - Iir_Kind_Simultaneous_If_Statement => 1803, - Iir_Kind_Simultaneous_Elsif => 1809, - Iir_Kind_Simple_Signal_Assignment_Statement => 1820, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1831, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1843, - Iir_Kind_Signal_Force_Assignment_Statement => 1853, - Iir_Kind_Signal_Release_Assignment_Statement => 1862, - Iir_Kind_Null_Statement => 1866, - Iir_Kind_Assertion_Statement => 1873, - Iir_Kind_Report_Statement => 1879, - Iir_Kind_Wait_Statement => 1887, - Iir_Kind_Variable_Assignment_Statement => 1894, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1901, - Iir_Kind_Return_Statement => 1907, - Iir_Kind_For_Loop_Statement => 1918, - Iir_Kind_While_Loop_Statement => 1929, - Iir_Kind_Next_Statement => 1936, - Iir_Kind_Exit_Statement => 1943, - Iir_Kind_Case_Statement => 1952, - Iir_Kind_Procedure_Call_Statement => 1958, - Iir_Kind_Break_Statement => 1965, - Iir_Kind_If_Statement => 1975, - Iir_Kind_Elsif => 1981, - Iir_Kind_Character_Literal => 1988, - Iir_Kind_Simple_Name => 1995, - Iir_Kind_Selected_Name => 2003, - Iir_Kind_Operator_Symbol => 2008, - Iir_Kind_Reference_Name => 2013, - Iir_Kind_External_Constant_Name => 2022, - Iir_Kind_External_Signal_Name => 2031, - Iir_Kind_External_Variable_Name => 2041, - Iir_Kind_Selected_By_All_Name => 2047, - Iir_Kind_Parenthesis_Name => 2052, - Iir_Kind_Package_Pathname => 2056, - Iir_Kind_Absolute_Pathname => 2057, - Iir_Kind_Relative_Pathname => 2058, - Iir_Kind_Pathname_Element => 2063, - Iir_Kind_Base_Attribute => 2065, - Iir_Kind_Subtype_Attribute => 2070, - Iir_Kind_Element_Attribute => 2075, - Iir_Kind_Across_Attribute => 2080, - Iir_Kind_Through_Attribute => 2085, - Iir_Kind_Nature_Reference_Attribute => 2089, - Iir_Kind_Left_Type_Attribute => 2094, - Iir_Kind_Right_Type_Attribute => 2099, - Iir_Kind_High_Type_Attribute => 2104, - Iir_Kind_Low_Type_Attribute => 2109, - Iir_Kind_Ascending_Type_Attribute => 2114, - Iir_Kind_Image_Attribute => 2120, - Iir_Kind_Value_Attribute => 2126, - Iir_Kind_Pos_Attribute => 2132, - Iir_Kind_Val_Attribute => 2138, - Iir_Kind_Succ_Attribute => 2144, - Iir_Kind_Pred_Attribute => 2150, - Iir_Kind_Leftof_Attribute => 2156, - Iir_Kind_Rightof_Attribute => 2162, - Iir_Kind_Signal_Slew_Attribute => 2170, - Iir_Kind_Quantity_Slew_Attribute => 2178, - Iir_Kind_Ramp_Attribute => 2186, - Iir_Kind_Zoh_Attribute => 2194, - Iir_Kind_Ltf_Attribute => 2202, - Iir_Kind_Ztf_Attribute => 2212, - Iir_Kind_Dot_Attribute => 2219, - Iir_Kind_Integ_Attribute => 2226, - Iir_Kind_Above_Attribute => 2234, - Iir_Kind_Quantity_Delayed_Attribute => 2242, - Iir_Kind_Delayed_Attribute => 2251, - Iir_Kind_Stable_Attribute => 2260, - Iir_Kind_Quiet_Attribute => 2269, - Iir_Kind_Transaction_Attribute => 2278, - Iir_Kind_Event_Attribute => 2282, - Iir_Kind_Active_Attribute => 2286, - Iir_Kind_Last_Event_Attribute => 2290, - Iir_Kind_Last_Active_Attribute => 2294, - Iir_Kind_Last_Value_Attribute => 2298, - Iir_Kind_Driving_Attribute => 2302, - Iir_Kind_Driving_Value_Attribute => 2306, - Iir_Kind_Behavior_Attribute => 2306, - Iir_Kind_Structure_Attribute => 2306, - Iir_Kind_Simple_Name_Attribute => 2313, - Iir_Kind_Instance_Name_Attribute => 2318, - Iir_Kind_Path_Name_Attribute => 2323, - Iir_Kind_Left_Array_Attribute => 2330, - Iir_Kind_Right_Array_Attribute => 2337, - Iir_Kind_High_Array_Attribute => 2344, - Iir_Kind_Low_Array_Attribute => 2351, - Iir_Kind_Length_Array_Attribute => 2358, - Iir_Kind_Ascending_Array_Attribute => 2365, - Iir_Kind_Range_Array_Attribute => 2372, - Iir_Kind_Reverse_Range_Array_Attribute => 2379, - Iir_Kind_Attribute_Name => 2388 + 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_Elsif => 1983, + Iir_Kind_Suspend_State_Statement => 1985, + Iir_Kind_Character_Literal => 1992, + Iir_Kind_Simple_Name => 1999, + Iir_Kind_Selected_Name => 2007, + Iir_Kind_Operator_Symbol => 2012, + Iir_Kind_Reference_Name => 2017, + Iir_Kind_External_Constant_Name => 2026, + Iir_Kind_External_Signal_Name => 2035, + Iir_Kind_External_Variable_Name => 2045, + Iir_Kind_Selected_By_All_Name => 2051, + Iir_Kind_Parenthesis_Name => 2056, + Iir_Kind_Package_Pathname => 2060, + Iir_Kind_Absolute_Pathname => 2061, + Iir_Kind_Relative_Pathname => 2062, + Iir_Kind_Pathname_Element => 2067, + Iir_Kind_Base_Attribute => 2069, + Iir_Kind_Subtype_Attribute => 2074, + Iir_Kind_Element_Attribute => 2079, + Iir_Kind_Across_Attribute => 2084, + Iir_Kind_Through_Attribute => 2089, + Iir_Kind_Nature_Reference_Attribute => 2093, + Iir_Kind_Left_Type_Attribute => 2098, + Iir_Kind_Right_Type_Attribute => 2103, + Iir_Kind_High_Type_Attribute => 2108, + Iir_Kind_Low_Type_Attribute => 2113, + Iir_Kind_Ascending_Type_Attribute => 2118, + Iir_Kind_Image_Attribute => 2124, + Iir_Kind_Value_Attribute => 2130, + Iir_Kind_Pos_Attribute => 2136, + Iir_Kind_Val_Attribute => 2142, + Iir_Kind_Succ_Attribute => 2148, + Iir_Kind_Pred_Attribute => 2154, + Iir_Kind_Leftof_Attribute => 2160, + Iir_Kind_Rightof_Attribute => 2166, + Iir_Kind_Signal_Slew_Attribute => 2174, + Iir_Kind_Quantity_Slew_Attribute => 2182, + Iir_Kind_Ramp_Attribute => 2190, + Iir_Kind_Zoh_Attribute => 2198, + Iir_Kind_Ltf_Attribute => 2206, + Iir_Kind_Ztf_Attribute => 2216, + Iir_Kind_Dot_Attribute => 2223, + Iir_Kind_Integ_Attribute => 2230, + Iir_Kind_Above_Attribute => 2238, + Iir_Kind_Quantity_Delayed_Attribute => 2246, + Iir_Kind_Delayed_Attribute => 2255, + Iir_Kind_Stable_Attribute => 2264, + Iir_Kind_Quiet_Attribute => 2273, + Iir_Kind_Transaction_Attribute => 2282, + Iir_Kind_Event_Attribute => 2286, + Iir_Kind_Active_Attribute => 2290, + Iir_Kind_Last_Event_Attribute => 2294, + Iir_Kind_Last_Active_Attribute => 2298, + Iir_Kind_Last_Value_Attribute => 2302, + Iir_Kind_Driving_Attribute => 2306, + Iir_Kind_Driving_Value_Attribute => 2310, + Iir_Kind_Behavior_Attribute => 2310, + Iir_Kind_Structure_Attribute => 2310, + Iir_Kind_Simple_Name_Attribute => 2317, + Iir_Kind_Instance_Name_Attribute => 2322, + Iir_Kind_Path_Name_Attribute => 2327, + Iir_Kind_Left_Array_Attribute => 2334, + Iir_Kind_Right_Array_Attribute => 2341, + Iir_Kind_High_Array_Attribute => 2348, + Iir_Kind_Low_Array_Attribute => 2355, + Iir_Kind_Length_Array_Attribute => 2362, + Iir_Kind_Ascending_Array_Attribute => 2369, + Iir_Kind_Range_Array_Attribute => 2376, + Iir_Kind_Reverse_Range_Array_Attribute => 2383, + Iir_Kind_Attribute_Name => 2392 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -8570,6 +8582,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Interface_Function_Declaration | Iir_Kind_Interface_Procedure_Declaration | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Sensitized_Process_Statement | Iir_Kind_Process_Statement | Iir_Kind_Concurrent_Simple_Signal_Assignment @@ -8613,6 +8626,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Procedure_Call_Statement | Iir_Kind_Break_Statement | Iir_Kind_If_Statement + | Iir_Kind_Suspend_State_Statement | Iir_Kind_External_Constant_Name | Iir_Kind_External_Signal_Name | Iir_Kind_External_Variable_Name => @@ -10997,6 +11011,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Interface_Function_Declaration | Iir_Kind_Interface_Procedure_Declaration | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Sensitized_Process_Statement | Iir_Kind_Process_Statement | Iir_Kind_Concurrent_Simple_Signal_Assignment @@ -11044,6 +11059,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Break_Statement | Iir_Kind_If_Statement | Iir_Kind_Elsif + | Iir_Kind_Suspend_State_Statement | Iir_Kind_External_Constant_Name | Iir_Kind_External_Signal_Name | Iir_Kind_External_Variable_Name => diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb index 8e9d5af90..fecb0602c 100644 --- a/src/vhdl/vhdl-utils.adb +++ b/src/vhdl/vhdl-utils.adb @@ -240,17 +240,17 @@ package body Vhdl.Utils is loop case Get_Kind (Adecl) is when Iir_Kinds_Non_Alias_Object_Declaration - | Iir_Kinds_Quantity_Declaration - | Iir_Kind_Terminal_Declaration - | Iir_Kind_Interface_Quantity_Declaration - | Iir_Kind_Interface_Terminal_Declaration - | Iir_Kind_Interface_Type_Declaration - | Iir_Kind_Interface_Package_Declaration - | Iir_Kind_Interface_Function_Declaration - | Iir_Kind_Interface_Procedure_Declaration - | Iir_Kind_External_Signal_Name - | Iir_Kind_External_Constant_Name - | Iir_Kind_External_Variable_Name => + | Iir_Kinds_Quantity_Declaration + | Iir_Kind_Terminal_Declaration + | Iir_Kind_Interface_Quantity_Declaration + | Iir_Kind_Interface_Terminal_Declaration + | Iir_Kind_Interface_Type_Declaration + | Iir_Kind_Interface_Package_Declaration + | Iir_Kind_Interface_Function_Declaration + | Iir_Kind_Interface_Procedure_Declaration + | Iir_Kind_External_Signal_Name + | Iir_Kind_External_Constant_Name + | Iir_Kind_External_Variable_Name => return Adecl; when Iir_Kind_Object_Alias_Declaration => if With_Alias then @@ -259,35 +259,36 @@ package body Vhdl.Utils is return Adecl; end if; when Iir_Kind_Indexed_Name - | Iir_Kind_Slice_Name - | Iir_Kind_Selected_Element - | Iir_Kind_Selected_By_All_Name => + | Iir_Kind_Slice_Name + | Iir_Kind_Selected_Element + | Iir_Kind_Selected_By_All_Name => Adecl := Get_Base_Name (Adecl); when Iir_Kinds_Literal - | Iir_Kind_Overflow_Literal - | Iir_Kind_Enumeration_Literal - | Iir_Kinds_Monadic_Operator - | Iir_Kinds_Dyadic_Operator - | Iir_Kind_Function_Call - | Iir_Kind_Qualified_Expression - | Iir_Kind_Type_Conversion - | Iir_Kind_Allocator_By_Expression - | Iir_Kind_Allocator_By_Subtype - | Iir_Kind_Parenthesis_Expression - | Iir_Kinds_Attribute - | Iir_Kind_Attribute_Value - | Iir_Kind_Aggregate - | Iir_Kind_Simple_Aggregate - | Iir_Kind_Dereference - | Iir_Kind_Implicit_Dereference - | Iir_Kind_Unit_Declaration - | Iir_Kind_Psl_Expression - | Iir_Kinds_Concurrent_Statement - | Iir_Kinds_Sequential_Statement - | Iir_Kinds_Simultaneous_Statement => + | Iir_Kind_Overflow_Literal + | Iir_Kind_Enumeration_Literal + | Iir_Kinds_Monadic_Operator + | Iir_Kinds_Dyadic_Operator + | Iir_Kind_Function_Call + | Iir_Kind_Qualified_Expression + | Iir_Kind_Type_Conversion + | Iir_Kind_Allocator_By_Expression + | Iir_Kind_Allocator_By_Subtype + | Iir_Kind_Parenthesis_Expression + | Iir_Kinds_Attribute + | Iir_Kind_Attribute_Value + | Iir_Kind_Aggregate + | Iir_Kind_Simple_Aggregate + | Iir_Kind_Dereference + | Iir_Kind_Implicit_Dereference + | Iir_Kind_Unit_Declaration + | Iir_Kind_Psl_Expression + | Iir_Kinds_Concurrent_Statement + | Iir_Kinds_Sequential_Statement + | Iir_Kinds_Simultaneous_Statement + | Iir_Kind_Suspend_State_Statement => return Adecl; when Iir_Kind_Simple_Name - | Iir_Kind_Selected_Name => + | Iir_Kind_Selected_Name => Adecl := Get_Named_Entity (Adecl); when Iir_Kind_Attribute_Name => return Get_Named_Entity (Adecl); @@ -323,6 +324,7 @@ package body Vhdl.Utils is | Iir_Kind_Group_Template_Declaration | Iir_Kind_Group_Declaration | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Unaffected_Waveform | Iir_Kind_Waveform_Element | Iir_Kind_Conditional_Waveform |