diff options
-rw-r--r-- | pyGHDL/libghdl/vhdl/nodes.py | 13 | ||||
-rw-r--r-- | pyGHDL/libghdl/vhdl/nodes_meta.py | 177 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.adb | 16 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 9 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 619 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.ads | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem.adb | 3 |
7 files changed, 452 insertions, 387 deletions
diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py index f0b42f3e3..0caa521f6 100644 --- a/pyGHDL/libghdl/vhdl/nodes.py +++ b/pyGHDL/libghdl/vhdl/nodes.py @@ -5736,6 +5736,19 @@ def Set_In_Formal_Flag(obj: Iir, value: Boolean) -> None: @export +@BindToLibGHDL("vhdl__nodes__get_inertial_flag") +def Get_Inertial_Flag(obj: Iir) -> Boolean: + """""" + return 0 + + +@export +@BindToLibGHDL("vhdl__nodes__set_inertial_flag") +def Set_Inertial_Flag(obj: Iir, value: Boolean) -> None: + """""" + + +@export @BindToLibGHDL("vhdl__nodes__get_slice_subtype") def Get_Slice_Subtype(obj: Iir) -> Iir: """""" diff --git a/pyGHDL/libghdl/vhdl/nodes_meta.py b/pyGHDL/libghdl/vhdl/nodes_meta.py index 0e2cf2549..f122e2dd1 100644 --- a/pyGHDL/libghdl/vhdl/nodes_meta.py +++ b/pyGHDL/libghdl/vhdl/nodes_meta.py @@ -407,91 +407,92 @@ class fields(IntEnum): Pathname_Suffix = 287 Pathname_Expression = 288 In_Formal_Flag = 289 - Slice_Subtype = 290 - Suffix = 291 - Index_Subtype = 292 - Parameter = 293 - Parameter_2 = 294 - Parameter_3 = 295 - Parameter_4 = 296 - Attr_Chain = 297 - Signal_Attribute_Declaration = 298 - Actual_Type = 299 - Actual_Type_Definition = 300 - Association_Chain = 301 - Individual_Association_Chain = 302 - Subprogram_Association_Chain = 303 - Aggregate_Info = 304 - Sub_Aggregate_Info = 305 - Aggr_Dynamic_Flag = 306 - Aggr_Min_Length = 307 - Aggr_Low_Limit = 308 - Aggr_High_Limit = 309 - Aggr_Others_Flag = 310 - Aggr_Named_Flag = 311 - Aggregate_Expand_Flag = 312 - Association_Choices_Chain = 313 - Case_Statement_Alternative_Chain = 314 - Matching_Flag = 315 - Choice_Staticness = 316 - Procedure_Call = 317 - Implementation = 318 - Parameter_Association_Chain = 319 - Method_Object = 320 - Subtype_Type_Mark = 321 - Subnature_Nature_Mark = 322 - Type_Conversion_Subtype = 323 - Type_Mark = 324 - File_Type_Mark = 325 - Return_Type_Mark = 326 - Has_Disconnect_Flag = 327 - Has_Active_Flag = 328 - Is_Within_Flag = 329 - Type_Marks_List = 330 - Implicit_Alias_Flag = 331 - Alias_Signature = 332 - Attribute_Signature = 333 - Overload_List = 334 - Simple_Name_Identifier = 335 - Simple_Name_Subtype = 336 - Protected_Type_Body = 337 - Protected_Type_Declaration = 338 - Use_Flag = 339 - End_Has_Reserved_Id = 340 - End_Has_Identifier = 341 - End_Has_Postponed = 342 - Has_Label = 343 - Has_Begin = 344 - Has_End = 345 - Has_Is = 346 - Has_Pure = 347 - Has_Body = 348 - Has_Parameter = 349 - Has_Component = 350 - Has_Identifier_List = 351 - Has_Mode = 352 - Has_Class = 353 - Has_Delay_Mechanism = 354 - Suspend_Flag = 355 - Is_Ref = 356 - Is_Forward_Ref = 357 - Psl_Property = 358 - Psl_Sequence = 359 - Psl_Declaration = 360 - Psl_Expression = 361 - Psl_Boolean = 362 - PSL_Clock = 363 - PSL_NFA = 364 - PSL_Nbr_States = 365 - PSL_Clock_Sensitivity = 366 - PSL_EOS_Flag = 367 - PSL_Abort_Flag = 368 - Count_Expression = 369 - Clock_Expression = 370 - Default_Clock = 371 - Foreign_Node = 372 - Suspend_State_Index = 373 - Suspend_State_Chain = 374 + Inertial_Flag = 290 + Slice_Subtype = 291 + Suffix = 292 + Index_Subtype = 293 + Parameter = 294 + Parameter_2 = 295 + Parameter_3 = 296 + Parameter_4 = 297 + Attr_Chain = 298 + Signal_Attribute_Declaration = 299 + Actual_Type = 300 + Actual_Type_Definition = 301 + Association_Chain = 302 + Individual_Association_Chain = 303 + Subprogram_Association_Chain = 304 + Aggregate_Info = 305 + Sub_Aggregate_Info = 306 + Aggr_Dynamic_Flag = 307 + Aggr_Min_Length = 308 + Aggr_Low_Limit = 309 + Aggr_High_Limit = 310 + Aggr_Others_Flag = 311 + Aggr_Named_Flag = 312 + Aggregate_Expand_Flag = 313 + Association_Choices_Chain = 314 + Case_Statement_Alternative_Chain = 315 + Matching_Flag = 316 + Choice_Staticness = 317 + Procedure_Call = 318 + Implementation = 319 + Parameter_Association_Chain = 320 + Method_Object = 321 + Subtype_Type_Mark = 322 + Subnature_Nature_Mark = 323 + Type_Conversion_Subtype = 324 + Type_Mark = 325 + File_Type_Mark = 326 + Return_Type_Mark = 327 + Has_Disconnect_Flag = 328 + Has_Active_Flag = 329 + Is_Within_Flag = 330 + Type_Marks_List = 331 + Implicit_Alias_Flag = 332 + Alias_Signature = 333 + Attribute_Signature = 334 + Overload_List = 335 + Simple_Name_Identifier = 336 + Simple_Name_Subtype = 337 + Protected_Type_Body = 338 + Protected_Type_Declaration = 339 + Use_Flag = 340 + End_Has_Reserved_Id = 341 + End_Has_Identifier = 342 + End_Has_Postponed = 343 + Has_Label = 344 + Has_Begin = 345 + Has_End = 346 + Has_Is = 347 + Has_Pure = 348 + Has_Body = 349 + Has_Parameter = 350 + Has_Component = 351 + Has_Identifier_List = 352 + Has_Mode = 353 + Has_Class = 354 + Has_Delay_Mechanism = 355 + Suspend_Flag = 356 + Is_Ref = 357 + Is_Forward_Ref = 358 + Psl_Property = 359 + Psl_Sequence = 360 + Psl_Declaration = 361 + Psl_Expression = 362 + Psl_Boolean = 363 + PSL_Clock = 364 + PSL_NFA = 365 + PSL_Nbr_States = 366 + PSL_Clock_Sensitivity = 367 + PSL_EOS_Flag = 368 + PSL_Abort_Flag = 369 + Count_Expression = 370 + Clock_Expression = 371 + Default_Clock = 372 + Foreign_Node = 373 + Suspend_State_Index = 374 + Suspend_State_Chain = 375 def Get_Boolean(node, field): @@ -2367,6 +2368,12 @@ def Has_In_Formal_Flag(kind: IirKind) -> bool: @export +@BindToLibGHDL("vhdl__nodes_meta__has_inertial_flag") +def Has_Inertial_Flag(kind: IirKind) -> bool: + """""" + + +@export @BindToLibGHDL("vhdl__nodes_meta__has_slice_subtype") def Has_Slice_Subtype(kind: IirKind) -> bool: """""" diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb index 147b6d0db..b2946d62c 100644 --- a/src/vhdl/vhdl-nodes.adb +++ b/src/vhdl/vhdl-nodes.adb @@ -6074,6 +6074,22 @@ package body Vhdl.Nodes is Set_Flag4 (Name, Flag); end Set_In_Formal_Flag; + function Get_Inertial_Flag (Name : Iir) return Boolean is + begin + pragma Assert (Name /= Null_Iir); + pragma Assert (Has_Inertial_Flag (Get_Kind (Name)), + "no field Inertial_Flag"); + return Get_Flag5 (Name); + end Get_Inertial_Flag; + + procedure Set_Inertial_Flag (Name : Iir; Flag : Boolean) is + begin + pragma Assert (Name /= Null_Iir); + pragma Assert (Has_Inertial_Flag (Get_Kind (Name)), + "no field Inertial_Flag"); + Set_Flag5 (Name, Flag); + end Set_Inertial_Flag; + function Get_Slice_Subtype (Slice : Iir) return Iir is begin pragma Assert (Slice /= Null_Iir); diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index c1868bfc7..333dcf6c8 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -485,6 +485,10 @@ package Vhdl.Nodes is -- -- Get/Set_In_Formal_Flag (Flag4) -- + -- Only for Iir_Kind_Association_Element_By_Expression: + -- True for inertial associations (even without the inertial word). + -- Get/Set_Inertial_Flag (Flag5) + -- -- Only for Iir_Kind_Association_Element_By_Individual: -- Must be Locally unless there is an error on one choice. -- Get/Set_Choice_Staticness (State1) @@ -9083,6 +9087,11 @@ package Vhdl.Nodes is function Get_In_Formal_Flag (Name : Iir) return Boolean; procedure Set_In_Formal_Flag (Name : Iir; Flag : Boolean); + -- True iff the association is an internal association. + -- Field: Flag5 + function Get_Inertial_Flag (Name : Iir) return Boolean; + procedure Set_Inertial_Flag (Name : Iir; Flag : Boolean); + -- The subtype of a slice. Contrary to the Type field, this is not a -- reference. -- Field: Field3 diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 25dc4f50b..ff3bc6fcf 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -307,6 +307,7 @@ package body Vhdl.Nodes_Meta is Field_Pathname_Suffix => Type_Iir, Field_Pathname_Expression => Type_Iir, Field_In_Formal_Flag => Type_Boolean, + Field_Inertial_Flag => Type_Boolean, Field_Slice_Subtype => Type_Iir, Field_Suffix => Type_Iir, Field_Index_Subtype => Type_Iir, @@ -982,6 +983,8 @@ package body Vhdl.Nodes_Meta is return "pathname_expression"; when Field_In_Formal_Flag => return "in_formal_flag"; + when Field_Inertial_Flag => + return "inertial_flag"; when Field_Slice_Subtype => return "slice_subtype"; when Field_Suffix => @@ -2388,6 +2391,8 @@ package body Vhdl.Nodes_Meta is return Attr_None; when Field_In_Formal_Flag => return Attr_None; + when Field_Inertial_Flag => + return Attr_None; when Field_Slice_Subtype => return Attr_None; when Field_Suffix => @@ -2693,6 +2698,7 @@ package body Vhdl.Nodes_Meta is Field_Whole_Association_Flag, Field_Collapse_Signal_Flag, Field_In_Formal_Flag, + Field_Inertial_Flag, Field_Formal, Field_Chain, Field_Actual, @@ -5303,308 +5309,308 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Waveform_Element => 97, Iir_Kind_Conditional_Waveform => 101, Iir_Kind_Conditional_Expression => 105, - Iir_Kind_Association_Element_By_Expression => 113, - Iir_Kind_Association_Element_By_Name => 121, - Iir_Kind_Association_Element_By_Individual => 130, - Iir_Kind_Association_Element_Open => 136, - Iir_Kind_Association_Element_Package => 142, - Iir_Kind_Association_Element_Type => 150, - Iir_Kind_Association_Element_Subprogram => 156, - Iir_Kind_Association_Element_Terminal => 162, - Iir_Kind_Choice_By_Range => 170, - Iir_Kind_Choice_By_Expression => 178, - Iir_Kind_Choice_By_Others => 184, - Iir_Kind_Choice_By_None => 190, - Iir_Kind_Choice_By_Name => 197, - Iir_Kind_Entity_Aspect_Entity => 199, - Iir_Kind_Entity_Aspect_Configuration => 200, - Iir_Kind_Entity_Aspect_Open => 200, - Iir_Kind_Psl_Hierarchical_Name => 202, - Iir_Kind_Block_Configuration => 208, - Iir_Kind_Block_Header => 212, - Iir_Kind_Component_Configuration => 219, - Iir_Kind_Binding_Indication => 223, - Iir_Kind_Entity_Class => 225, - Iir_Kind_Attribute_Value => 233, - Iir_Kind_Signature => 236, - Iir_Kind_Aggregate_Info => 243, - Iir_Kind_Procedure_Call => 247, - Iir_Kind_Record_Element_Constraint => 255, - Iir_Kind_Array_Element_Resolution => 257, - Iir_Kind_Record_Resolution => 258, - Iir_Kind_Record_Element_Resolution => 261, - Iir_Kind_Break_Element => 265, - Iir_Kind_Attribute_Specification => 274, - Iir_Kind_Disconnection_Specification => 280, - Iir_Kind_Step_Limit_Specification => 286, - Iir_Kind_Configuration_Specification => 292, - Iir_Kind_Access_Type_Definition => 299, - Iir_Kind_Incomplete_Type_Definition => 306, - Iir_Kind_Interface_Type_Definition => 312, - Iir_Kind_File_Type_Definition => 318, - Iir_Kind_Protected_Type_Declaration => 327, - Iir_Kind_Record_Type_Definition => 337, - Iir_Kind_Array_Type_Definition => 348, - Iir_Kind_Array_Subtype_Definition => 365, - Iir_Kind_Record_Subtype_Definition => 378, - Iir_Kind_Access_Subtype_Definition => 386, - Iir_Kind_Physical_Subtype_Definition => 396, - Iir_Kind_Floating_Subtype_Definition => 407, - Iir_Kind_Integer_Subtype_Definition => 417, - Iir_Kind_Enumeration_Subtype_Definition => 427, - Iir_Kind_Enumeration_Type_Definition => 438, - Iir_Kind_Integer_Type_Definition => 446, - Iir_Kind_Floating_Type_Definition => 454, - Iir_Kind_Physical_Type_Definition => 465, - Iir_Kind_Range_Expression => 473, - Iir_Kind_Protected_Type_Body => 481, - Iir_Kind_Wildcard_Type_Definition => 485, - Iir_Kind_Foreign_Vector_Type_Definition => 486, - Iir_Kind_Subtype_Definition => 493, - Iir_Kind_Scalar_Nature_Definition => 501, - Iir_Kind_Record_Nature_Definition => 514, - Iir_Kind_Array_Nature_Definition => 528, - Iir_Kind_Array_Subnature_Definition => 543, - Iir_Kind_Overload_List => 544, - Iir_Kind_Foreign_Module => 549, - Iir_Kind_Entity_Declaration => 562, - Iir_Kind_Configuration_Declaration => 572, - Iir_Kind_Context_Declaration => 578, - Iir_Kind_Package_Declaration => 593, - Iir_Kind_Package_Instantiation_Declaration => 607, - Iir_Kind_Vmode_Declaration => 619, - Iir_Kind_Vprop_Declaration => 631, - Iir_Kind_Vunit_Declaration => 644, - Iir_Kind_Package_Body => 652, - Iir_Kind_Architecture_Body => 665, - Iir_Kind_Type_Declaration => 672, - Iir_Kind_Anonymous_Type_Declaration => 678, - Iir_Kind_Subtype_Declaration => 686, - Iir_Kind_Nature_Declaration => 692, - Iir_Kind_Subnature_Declaration => 699, - Iir_Kind_Package_Header => 701, - Iir_Kind_Unit_Declaration => 710, - Iir_Kind_Library_Declaration => 718, - Iir_Kind_Component_Declaration => 728, - Iir_Kind_Attribute_Declaration => 735, - Iir_Kind_Group_Template_Declaration => 741, - Iir_Kind_Group_Declaration => 748, - Iir_Kind_Element_Declaration => 756, - Iir_Kind_Nature_Element_Declaration => 763, - Iir_Kind_Non_Object_Alias_Declaration => 771, - Iir_Kind_Psl_Declaration => 779, - Iir_Kind_Psl_Endpoint_Declaration => 793, - Iir_Kind_Enumeration_Literal => 805, - Iir_Kind_Function_Declaration => 831, - Iir_Kind_Procedure_Declaration => 854, - Iir_Kind_Function_Body => 864, - Iir_Kind_Procedure_Body => 875, - Iir_Kind_Function_Instantiation_Declaration => 886, - Iir_Kind_Procedure_Instantiation_Declaration => 896, - Iir_Kind_Terminal_Declaration => 905, - Iir_Kind_Object_Alias_Declaration => 917, - Iir_Kind_Free_Quantity_Declaration => 929, - Iir_Kind_Spectrum_Quantity_Declaration => 942, - Iir_Kind_Noise_Quantity_Declaration => 954, - Iir_Kind_Across_Quantity_Declaration => 970, - Iir_Kind_Through_Quantity_Declaration => 986, - Iir_Kind_File_Declaration => 1001, - Iir_Kind_Guard_Signal_Declaration => 1015, - Iir_Kind_Signal_Declaration => 1032, - Iir_Kind_Variable_Declaration => 1045, - Iir_Kind_Constant_Declaration => 1059, - Iir_Kind_Iterator_Declaration => 1071, - Iir_Kind_Interface_Constant_Declaration => 1088, - Iir_Kind_Interface_Variable_Declaration => 1104, - Iir_Kind_Interface_Signal_Declaration => 1125, - Iir_Kind_Interface_File_Declaration => 1141, - Iir_Kind_Interface_Quantity_Declaration => 1157, - Iir_Kind_Interface_Terminal_Declaration => 1169, - Iir_Kind_Interface_Type_Declaration => 1180, - Iir_Kind_Interface_Package_Declaration => 1193, - Iir_Kind_Interface_Function_Declaration => 1211, - Iir_Kind_Interface_Procedure_Declaration => 1225, - Iir_Kind_Signal_Attribute_Declaration => 1228, - Iir_Kind_Suspend_State_Declaration => 1231, - Iir_Kind_Identity_Operator => 1235, - Iir_Kind_Negation_Operator => 1239, - Iir_Kind_Absolute_Operator => 1243, - Iir_Kind_Not_Operator => 1247, - Iir_Kind_Implicit_Condition_Operator => 1251, - Iir_Kind_Condition_Operator => 1255, - Iir_Kind_Reduction_And_Operator => 1259, - Iir_Kind_Reduction_Or_Operator => 1263, - Iir_Kind_Reduction_Nand_Operator => 1267, - Iir_Kind_Reduction_Nor_Operator => 1271, - Iir_Kind_Reduction_Xor_Operator => 1275, - Iir_Kind_Reduction_Xnor_Operator => 1279, - Iir_Kind_And_Operator => 1284, - Iir_Kind_Or_Operator => 1289, - Iir_Kind_Nand_Operator => 1294, - Iir_Kind_Nor_Operator => 1299, - Iir_Kind_Xor_Operator => 1304, - Iir_Kind_Xnor_Operator => 1309, - Iir_Kind_Equality_Operator => 1314, - Iir_Kind_Inequality_Operator => 1319, - Iir_Kind_Less_Than_Operator => 1324, - Iir_Kind_Less_Than_Or_Equal_Operator => 1329, - Iir_Kind_Greater_Than_Operator => 1334, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1339, - Iir_Kind_Match_Equality_Operator => 1344, - Iir_Kind_Match_Inequality_Operator => 1349, - Iir_Kind_Match_Less_Than_Operator => 1354, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1359, - Iir_Kind_Match_Greater_Than_Operator => 1364, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1369, - Iir_Kind_Sll_Operator => 1374, - Iir_Kind_Sla_Operator => 1379, - Iir_Kind_Srl_Operator => 1384, - Iir_Kind_Sra_Operator => 1389, - Iir_Kind_Rol_Operator => 1394, - Iir_Kind_Ror_Operator => 1399, - Iir_Kind_Addition_Operator => 1404, - Iir_Kind_Substraction_Operator => 1409, - Iir_Kind_Concatenation_Operator => 1414, - Iir_Kind_Multiplication_Operator => 1419, - Iir_Kind_Division_Operator => 1424, - Iir_Kind_Modulus_Operator => 1429, - Iir_Kind_Remainder_Operator => 1434, - Iir_Kind_Exponentiation_Operator => 1439, - Iir_Kind_Function_Call => 1447, - Iir_Kind_Aggregate => 1454, - Iir_Kind_Parenthesis_Expression => 1457, - Iir_Kind_Qualified_Expression => 1461, - Iir_Kind_Type_Conversion => 1466, - Iir_Kind_Allocator_By_Expression => 1471, - Iir_Kind_Allocator_By_Subtype => 1477, - Iir_Kind_Selected_Element => 1485, - Iir_Kind_Dereference => 1490, - Iir_Kind_Implicit_Dereference => 1495, - Iir_Kind_Slice_Name => 1502, - Iir_Kind_Indexed_Name => 1508, - Iir_Kind_Psl_Prev => 1514, - Iir_Kind_Psl_Stable => 1519, - Iir_Kind_Psl_Rose => 1524, - Iir_Kind_Psl_Fell => 1529, - Iir_Kind_Psl_Onehot => 1532, - Iir_Kind_Psl_Onehot0 => 1535, - Iir_Kind_Psl_Expression => 1537, - Iir_Kind_Sensitized_Process_Statement => 1558, - Iir_Kind_Process_Statement => 1578, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1591, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1604, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1618, - Iir_Kind_Concurrent_Assertion_Statement => 1626, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1633, - Iir_Kind_Concurrent_Break_Statement => 1641, - Iir_Kind_Psl_Assert_Directive => 1655, - Iir_Kind_Psl_Assume_Directive => 1667, - Iir_Kind_Psl_Cover_Directive => 1679, - Iir_Kind_Psl_Restrict_Directive => 1690, - Iir_Kind_Block_Statement => 1704, - Iir_Kind_If_Generate_Statement => 1715, - Iir_Kind_Case_Generate_Statement => 1724, - Iir_Kind_For_Generate_Statement => 1733, - Iir_Kind_Component_Instantiation_Statement => 1744, - Iir_Kind_Psl_Default_Clock => 1747, - Iir_Kind_Generate_Statement_Body => 1758, - Iir_Kind_If_Generate_Else_Clause => 1764, - Iir_Kind_Simple_Simultaneous_Statement => 1771, - Iir_Kind_Simultaneous_Null_Statement => 1775, - Iir_Kind_Simultaneous_Procedural_Statement => 1786, - Iir_Kind_Simultaneous_Case_Statement => 1795, - Iir_Kind_Simultaneous_If_Statement => 1804, - Iir_Kind_Simultaneous_Elsif => 1810, - Iir_Kind_Simple_Signal_Assignment_Statement => 1821, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1832, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1844, - Iir_Kind_Signal_Force_Assignment_Statement => 1854, - Iir_Kind_Signal_Release_Assignment_Statement => 1863, - Iir_Kind_Null_Statement => 1867, - Iir_Kind_Assertion_Statement => 1874, - Iir_Kind_Report_Statement => 1880, - Iir_Kind_Wait_Statement => 1888, - Iir_Kind_Variable_Assignment_Statement => 1895, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1902, - Iir_Kind_Return_Statement => 1908, - Iir_Kind_For_Loop_Statement => 1919, - Iir_Kind_While_Loop_Statement => 1930, - Iir_Kind_Next_Statement => 1937, - Iir_Kind_Exit_Statement => 1944, - Iir_Kind_Case_Statement => 1953, - Iir_Kind_Procedure_Call_Statement => 1959, - Iir_Kind_Break_Statement => 1966, - Iir_Kind_If_Statement => 1976, - Iir_Kind_Suspend_State_Statement => 1980, - Iir_Kind_Elsif => 1986, - Iir_Kind_Character_Literal => 1993, - Iir_Kind_Simple_Name => 2000, - Iir_Kind_Selected_Name => 2008, - Iir_Kind_Operator_Symbol => 2013, - Iir_Kind_Reference_Name => 2018, - Iir_Kind_External_Constant_Name => 2027, - Iir_Kind_External_Signal_Name => 2036, - Iir_Kind_External_Variable_Name => 2046, - Iir_Kind_Selected_By_All_Name => 2052, - Iir_Kind_Parenthesis_Name => 2057, - Iir_Kind_Package_Pathname => 2061, - Iir_Kind_Absolute_Pathname => 2062, - Iir_Kind_Relative_Pathname => 2063, - Iir_Kind_Pathname_Element => 2068, - Iir_Kind_Base_Attribute => 2070, - Iir_Kind_Subtype_Attribute => 2075, - Iir_Kind_Element_Attribute => 2080, - Iir_Kind_Across_Attribute => 2085, - Iir_Kind_Through_Attribute => 2090, - Iir_Kind_Nature_Reference_Attribute => 2094, - Iir_Kind_Left_Type_Attribute => 2099, - Iir_Kind_Right_Type_Attribute => 2104, - Iir_Kind_High_Type_Attribute => 2109, - Iir_Kind_Low_Type_Attribute => 2114, - Iir_Kind_Ascending_Type_Attribute => 2119, - Iir_Kind_Image_Attribute => 2125, - Iir_Kind_Value_Attribute => 2131, - Iir_Kind_Pos_Attribute => 2137, - Iir_Kind_Val_Attribute => 2143, - Iir_Kind_Succ_Attribute => 2149, - Iir_Kind_Pred_Attribute => 2155, - Iir_Kind_Leftof_Attribute => 2161, - Iir_Kind_Rightof_Attribute => 2167, - Iir_Kind_Signal_Slew_Attribute => 2175, - Iir_Kind_Quantity_Slew_Attribute => 2183, - Iir_Kind_Ramp_Attribute => 2191, - Iir_Kind_Zoh_Attribute => 2199, - Iir_Kind_Ltf_Attribute => 2207, - Iir_Kind_Ztf_Attribute => 2217, - Iir_Kind_Dot_Attribute => 2224, - Iir_Kind_Integ_Attribute => 2231, - Iir_Kind_Above_Attribute => 2239, - Iir_Kind_Quantity_Delayed_Attribute => 2247, - Iir_Kind_Delayed_Attribute => 2256, - Iir_Kind_Stable_Attribute => 2265, - Iir_Kind_Quiet_Attribute => 2274, - Iir_Kind_Transaction_Attribute => 2283, - Iir_Kind_Event_Attribute => 2287, - Iir_Kind_Active_Attribute => 2291, - Iir_Kind_Last_Event_Attribute => 2295, - Iir_Kind_Last_Active_Attribute => 2299, - Iir_Kind_Last_Value_Attribute => 2303, - Iir_Kind_Driving_Attribute => 2307, - Iir_Kind_Driving_Value_Attribute => 2311, - Iir_Kind_Behavior_Attribute => 2311, - Iir_Kind_Structure_Attribute => 2311, - Iir_Kind_Simple_Name_Attribute => 2318, - Iir_Kind_Instance_Name_Attribute => 2323, - Iir_Kind_Path_Name_Attribute => 2328, - Iir_Kind_Left_Array_Attribute => 2335, - Iir_Kind_Right_Array_Attribute => 2342, - Iir_Kind_High_Array_Attribute => 2349, - Iir_Kind_Low_Array_Attribute => 2356, - Iir_Kind_Length_Array_Attribute => 2363, - Iir_Kind_Ascending_Array_Attribute => 2370, - Iir_Kind_Range_Array_Attribute => 2377, - Iir_Kind_Reverse_Range_Array_Attribute => 2384, - Iir_Kind_Attribute_Name => 2393 + Iir_Kind_Association_Element_By_Expression => 114, + Iir_Kind_Association_Element_By_Name => 122, + Iir_Kind_Association_Element_By_Individual => 131, + Iir_Kind_Association_Element_Open => 137, + Iir_Kind_Association_Element_Package => 143, + Iir_Kind_Association_Element_Type => 151, + Iir_Kind_Association_Element_Subprogram => 157, + Iir_Kind_Association_Element_Terminal => 163, + Iir_Kind_Choice_By_Range => 171, + Iir_Kind_Choice_By_Expression => 179, + Iir_Kind_Choice_By_Others => 185, + Iir_Kind_Choice_By_None => 191, + Iir_Kind_Choice_By_Name => 198, + Iir_Kind_Entity_Aspect_Entity => 200, + Iir_Kind_Entity_Aspect_Configuration => 201, + Iir_Kind_Entity_Aspect_Open => 201, + Iir_Kind_Psl_Hierarchical_Name => 203, + Iir_Kind_Block_Configuration => 209, + Iir_Kind_Block_Header => 213, + Iir_Kind_Component_Configuration => 220, + Iir_Kind_Binding_Indication => 224, + Iir_Kind_Entity_Class => 226, + Iir_Kind_Attribute_Value => 234, + Iir_Kind_Signature => 237, + Iir_Kind_Aggregate_Info => 244, + Iir_Kind_Procedure_Call => 248, + Iir_Kind_Record_Element_Constraint => 256, + Iir_Kind_Array_Element_Resolution => 258, + Iir_Kind_Record_Resolution => 259, + Iir_Kind_Record_Element_Resolution => 262, + Iir_Kind_Break_Element => 266, + Iir_Kind_Attribute_Specification => 275, + Iir_Kind_Disconnection_Specification => 281, + Iir_Kind_Step_Limit_Specification => 287, + Iir_Kind_Configuration_Specification => 293, + Iir_Kind_Access_Type_Definition => 300, + 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 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -5723,6 +5729,8 @@ package body Vhdl.Nodes_Meta is return Get_Next_Flag (N); when Field_In_Formal_Flag => return Get_In_Formal_Flag (N); + when Field_Inertial_Flag => + return Get_Inertial_Flag (N); when Field_Aggr_Dynamic_Flag => return Get_Aggr_Dynamic_Flag (N); when Field_Aggr_Others_Flag => @@ -5877,6 +5885,8 @@ package body Vhdl.Nodes_Meta is Set_Next_Flag (N, V); when Field_In_Formal_Flag => Set_In_Formal_Flag (N, V); + when Field_Inertial_Flag => + Set_Inertial_Flag (N, V); when Field_Aggr_Dynamic_Flag => Set_Aggr_Dynamic_Flag (N, V); when Field_Aggr_Others_Flag => @@ -11722,6 +11732,11 @@ package body Vhdl.Nodes_Meta is end case; end Has_In_Formal_Flag; + function Has_Inertial_Flag (K : Iir_Kind) return Boolean is + begin + return K = Iir_Kind_Association_Element_By_Expression; + end Has_Inertial_Flag; + function Has_Slice_Subtype (K : Iir_Kind) return Boolean is begin return K = Iir_Kind_Slice_Name; diff --git a/src/vhdl/vhdl-nodes_meta.ads b/src/vhdl/vhdl-nodes_meta.ads index cd226b6c3..bf7fdcae0 100644 --- a/src/vhdl/vhdl-nodes_meta.ads +++ b/src/vhdl/vhdl-nodes_meta.ads @@ -351,6 +351,7 @@ package Vhdl.Nodes_Meta is Field_Pathname_Suffix, Field_Pathname_Expression, Field_In_Formal_Flag, + Field_Inertial_Flag, Field_Slice_Subtype, Field_Suffix, Field_Index_Subtype, @@ -944,6 +945,7 @@ package Vhdl.Nodes_Meta is function Has_Pathname_Suffix (K : Iir_Kind) return Boolean; function Has_Pathname_Expression (K : Iir_Kind) return Boolean; function Has_In_Formal_Flag (K : Iir_Kind) return Boolean; + function Has_Inertial_Flag (K : Iir_Kind) return Boolean; function Has_Slice_Subtype (K : Iir_Kind) return Boolean; function Has_Suffix (K : Iir_Kind) return Boolean; function Has_Index_Subtype (K : Iir_Kind) return Boolean; diff --git a/src/vhdl/vhdl-sem.adb b/src/vhdl/vhdl-sem.adb index d24652797..804b11f8e 100644 --- a/src/vhdl/vhdl-sem.adb +++ b/src/vhdl/vhdl-sem.adb @@ -566,6 +566,9 @@ package body Vhdl.Sem is -- The actual, if an expression, must be a globally -- static expression. if Get_Expr_Staticness (Actual) < Globally then + -- This is an inertial association. + Set_Inertial_Flag (Assoc, True); + if Flags.Vhdl_Std < Vhdl_08 then -- LRM08 6.5.6.3 Port clauses Error_Msg_Sem |