diff options
-rw-r--r-- | pyGHDL/libghdl/errorout.py | 9 | ||||
-rw-r--r-- | pyGHDL/libghdl/vhdl/nodes.py | 13 | ||||
-rw-r--r-- | pyGHDL/libghdl/vhdl/nodes_meta.py | 567 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.adb | 16 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 7 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 385 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.ads | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_decls.adb | 3 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_inst.adb | 7 |
9 files changed, 538 insertions, 471 deletions
diff --git a/pyGHDL/libghdl/errorout.py b/pyGHDL/libghdl/errorout.py index a4dd7f3c9..0c9097fd1 100644 --- a/pyGHDL/libghdl/errorout.py +++ b/pyGHDL/libghdl/errorout.py @@ -48,7 +48,8 @@ class Msgid(IntEnum): Warnid_Attribute = 29 Warnid_Useless = 30 Warnid_No_Assoc = 31 - Warnid_Static = 32 - Msgid_Warning = 33 - Msgid_Error = 34 - Msgid_Fatal = 35 + Warnid_Conformance = 32 + Warnid_Static = 33 + Msgid_Warning = 34 + Msgid_Error = 35 + Msgid_Fatal = 36 diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py index a0120e8f4..0497aeb8c 100644 --- a/pyGHDL/libghdl/vhdl/nodes.py +++ b/pyGHDL/libghdl/vhdl/nodes.py @@ -3274,6 +3274,19 @@ def Set_Interface_Type_Subprograms(obj: Iir, value: Iir) -> None: @export +@BindToLibGHDL("vhdl__nodes__get_interface_type_definition") +def Get_Interface_Type_Definition(obj: Iir) -> Iir: + """""" + return 0 + + +@export +@BindToLibGHDL("vhdl__nodes__set_interface_type_definition") +def Set_Interface_Type_Definition(obj: Iir, value: Iir) -> None: + """""" + + +@export @BindToLibGHDL("vhdl__nodes__get_nature_definition") def Get_Nature_Definition(obj: Iir) -> Iir: """""" diff --git a/pyGHDL/libghdl/vhdl/nodes_meta.py b/pyGHDL/libghdl/vhdl/nodes_meta.py index b2cf84c88..474905914 100644 --- a/pyGHDL/libghdl/vhdl/nodes_meta.py +++ b/pyGHDL/libghdl/vhdl/nodes_meta.py @@ -217,286 +217,287 @@ class fields(IntEnum): Subtype_Definition = 97 Incomplete_Type_Declaration = 98 Interface_Type_Subprograms = 99 - Nature_Definition = 100 - Nature = 101 - Subnature_Indication = 102 - Reference_Terminal_Flag = 103 - Mode = 104 - Guarded_Signal_Flag = 105 - Signal_Kind = 106 - Base_Name = 107 - Interface_Declaration_Chain = 108 - Default_Subprogram = 109 - Subprogram_Specification = 110 - Sequential_Statement_Chain = 111 - Simultaneous_Statement_Chain = 112 - Subprogram_Body = 113 - Overload_Number = 114 - Subprogram_Depth = 115 - Subprogram_Hash = 116 - Impure_Depth = 117 - Return_Type = 118 - Implicit_Definition = 119 - Uninstantiated_Subprogram_Name = 120 - Default_Value = 121 - Deferred_Declaration = 122 - Deferred_Declaration_Flag = 123 - Shared_Flag = 124 - Design_Unit = 125 - Block_Statement = 126 - Signal_Driver = 127 - Declaration_Chain = 128 - File_Logical_Name = 129 - File_Open_Kind = 130 - Element_Position = 131 - Use_Clause_Chain = 132 - Context_Reference_Chain = 133 - Inherit_Spec_Chain = 134 - Selected_Name = 135 - Type_Declarator = 136 - Complete_Type_Definition = 137 - Incomplete_Type_Ref_Chain = 138 - Associated_Type = 139 - Enumeration_Literal_List = 140 - Entity_Class_Entry_Chain = 141 - Group_Constituent_List = 142 - Unit_Chain = 143 - Primary_Unit = 144 - Identifier = 145 - Label = 146 - Return_Identifier = 147 - Visible_Flag = 148 - Range_Constraint = 149 - Direction = 150 - Left_Limit = 151 - Right_Limit = 152 - Left_Limit_Expr = 153 - Right_Limit_Expr = 154 - Parent_Type = 155 - Simple_Nature = 156 - Base_Nature = 157 - Resolution_Indication = 158 - Record_Element_Resolution_Chain = 159 - Tolerance = 160 - Plus_Terminal_Name = 161 - Minus_Terminal_Name = 162 - Plus_Terminal = 163 - Minus_Terminal = 164 - Magnitude_Expression = 165 - Phase_Expression = 166 - Power_Expression = 167 - Simultaneous_Left = 168 - Simultaneous_Right = 169 - Text_File_Flag = 170 - Only_Characters_Flag = 171 - Is_Character_Type = 172 - Nature_Staticness = 173 - Type_Staticness = 174 - Constraint_State = 175 - Index_Subtype_List = 176 - Index_Subtype_Definition_List = 177 - Element_Subtype_Indication = 178 - Element_Subtype = 179 - Element_Subnature_Indication = 180 - Element_Subnature = 181 - Index_Constraint_List = 182 - Array_Element_Constraint = 183 - Has_Array_Constraint_Flag = 184 - Has_Element_Constraint_Flag = 185 - Elements_Declaration_List = 186 - Owned_Elements_Chain = 187 - Designated_Type = 188 - Designated_Subtype_Indication = 189 - Index_List = 190 - Reference = 191 - Nature_Declarator = 192 - Across_Type_Mark = 193 - Through_Type_Mark = 194 - Across_Type_Definition = 195 - Through_Type_Definition = 196 - Across_Type = 197 - Through_Type = 198 - Target = 199 - Waveform_Chain = 200 - Guard = 201 - Delay_Mechanism = 202 - Reject_Time_Expression = 203 - Force_Mode = 204 - Has_Force_Mode = 205 - Sensitivity_List = 206 - Process_Origin = 207 - Package_Origin = 208 - Condition_Clause = 209 - Break_Element = 210 - Selector_Quantity = 211 - Break_Quantity = 212 - Timeout_Clause = 213 - Postponed_Flag = 214 - Callees_List = 215 - Passive_Flag = 216 - Resolution_Function_Flag = 217 - Wait_State = 218 - All_Sensitized_State = 219 - Seen_Flag = 220 - Pure_Flag = 221 - Foreign_Flag = 222 - Resolved_Flag = 223 - Signal_Type_Flag = 224 - Has_Signal_Flag = 225 - Purity_State = 226 - Elab_Flag = 227 - Vendor_Library_Flag = 228 - Configuration_Mark_Flag = 229 - Configuration_Done_Flag = 230 - Index_Constraint_Flag = 231 - Hide_Implicit_Flag = 232 - Assertion_Condition = 233 - Report_Expression = 234 - Severity_Expression = 235 - Instantiated_Unit = 236 - Generic_Map_Aspect_Chain = 237 - Port_Map_Aspect_Chain = 238 - Configuration_Name = 239 - Component_Configuration = 240 - Configuration_Specification = 241 - Default_Binding_Indication = 242 - Default_Configuration_Declaration = 243 - Expression = 244 - Conditional_Expression_Chain = 245 - Allocator_Designated_Type = 246 - Selected_Waveform_Chain = 247 - Conditional_Waveform_Chain = 248 - Guard_Expression = 249 - Guard_Decl = 250 - Guard_Sensitivity_List = 251 - Attribute_Implicit_Chain = 252 - Block_Block_Configuration = 253 - Package_Header = 254 - Block_Header = 255 - Uninstantiated_Package_Name = 256 - Uninstantiated_Package_Decl = 257 - Instance_Source_File = 258 - Generate_Block_Configuration = 259 - Generate_Statement_Body = 260 - Alternative_Label = 261 - Generate_Else_Clause = 262 - Condition = 263 - Else_Clause = 264 - Parameter_Specification = 265 - Parent = 266 - Loop_Label = 267 - Exit_Flag = 268 - Next_Flag = 269 - Component_Name = 270 - Instantiation_List = 271 - Entity_Aspect = 272 - Default_Entity_Aspect = 273 - Binding_Indication = 274 - Named_Entity = 275 - Referenced_Name = 276 - Expr_Staticness = 277 - Scalar_Size = 278 - Error_Origin = 279 - Operand = 280 - Left = 281 - Right = 282 - Unit_Name = 283 - Name = 284 - Group_Template_Name = 285 - Name_Staticness = 286 - Prefix = 287 - Signature_Prefix = 288 - External_Pathname = 289 - Pathname_Suffix = 290 - Pathname_Expression = 291 - In_Formal_Flag = 292 - Inertial_Flag = 293 - Slice_Subtype = 294 - Suffix = 295 - Index_Subtype = 296 - Parameter = 297 - Parameter_2 = 298 - Parameter_3 = 299 - Parameter_4 = 300 - Attr_Chain = 301 - Attribute_Implicit_Declaration = 302 - Actual_Type = 303 - Actual_Type_Definition = 304 - Association_Chain = 305 - Individual_Association_Chain = 306 - Subprogram_Association_Chain = 307 - Aggregate_Info = 308 - Sub_Aggregate_Info = 309 - Aggr_Dynamic_Flag = 310 - Aggr_Min_Length = 311 - Aggr_Low_Limit = 312 - Aggr_High_Limit = 313 - Aggr_Others_Flag = 314 - Aggr_Named_Flag = 315 - Aggregate_Expand_Flag = 316 - Association_Choices_Chain = 317 - Case_Statement_Alternative_Chain = 318 - Matching_Flag = 319 - Choice_Staticness = 320 - Procedure_Call = 321 - Implementation = 322 - Parameter_Association_Chain = 323 - Method_Object = 324 - Subtype_Type_Mark = 325 - Subnature_Nature_Mark = 326 - Type_Conversion_Subtype = 327 - Type_Mark = 328 - File_Type_Mark = 329 - Return_Type_Mark = 330 - Has_Disconnect_Flag = 331 - Has_Active_Flag = 332 - Is_Within_Flag = 333 - Type_Marks_List = 334 - Implicit_Alias_Flag = 335 - Alias_Signature = 336 - Attribute_Signature = 337 - Overload_List = 338 - Simple_Name_Identifier = 339 - Simple_Name_Subtype = 340 - Protected_Type_Body = 341 - Protected_Type_Declaration = 342 - Use_Flag = 343 - End_Has_Reserved_Id = 344 - End_Has_Identifier = 345 - End_Has_Postponed = 346 - Has_Label = 347 - Has_Begin = 348 - Has_End = 349 - Has_Is = 350 - Has_Pure = 351 - Has_Body = 352 - Has_Parameter = 353 - Has_Component = 354 - Has_Identifier_List = 355 - Has_Mode = 356 - Has_Class = 357 - Has_Delay_Mechanism = 358 - Suspend_Flag = 359 - Stop_Flag = 360 - Is_Ref = 361 - Is_Forward_Ref = 362 - Psl_Property = 363 - Psl_Sequence = 364 - Psl_Declaration = 365 - Psl_Expression = 366 - Psl_Boolean = 367 - PSL_Clock = 368 - PSL_NFA = 369 - PSL_Nbr_States = 370 - PSL_Clock_Sensitivity = 371 - PSL_EOS_Flag = 372 - PSL_Abort_Flag = 373 - Count_Expression = 374 - Clock_Expression = 375 - Default_Clock = 376 - Foreign_Node = 377 - Suspend_State_Index = 378 - Suspend_State_Chain = 379 + Interface_Type_Definition = 100 + Nature_Definition = 101 + Nature = 102 + Subnature_Indication = 103 + Reference_Terminal_Flag = 104 + Mode = 105 + Guarded_Signal_Flag = 106 + Signal_Kind = 107 + Base_Name = 108 + Interface_Declaration_Chain = 109 + Default_Subprogram = 110 + Subprogram_Specification = 111 + Sequential_Statement_Chain = 112 + Simultaneous_Statement_Chain = 113 + Subprogram_Body = 114 + Overload_Number = 115 + Subprogram_Depth = 116 + Subprogram_Hash = 117 + Impure_Depth = 118 + Return_Type = 119 + Implicit_Definition = 120 + Uninstantiated_Subprogram_Name = 121 + Default_Value = 122 + Deferred_Declaration = 123 + Deferred_Declaration_Flag = 124 + Shared_Flag = 125 + Design_Unit = 126 + Block_Statement = 127 + Signal_Driver = 128 + Declaration_Chain = 129 + File_Logical_Name = 130 + File_Open_Kind = 131 + Element_Position = 132 + Use_Clause_Chain = 133 + Context_Reference_Chain = 134 + Inherit_Spec_Chain = 135 + Selected_Name = 136 + Type_Declarator = 137 + Complete_Type_Definition = 138 + Incomplete_Type_Ref_Chain = 139 + Associated_Type = 140 + Enumeration_Literal_List = 141 + Entity_Class_Entry_Chain = 142 + Group_Constituent_List = 143 + Unit_Chain = 144 + Primary_Unit = 145 + Identifier = 146 + Label = 147 + Return_Identifier = 148 + Visible_Flag = 149 + Range_Constraint = 150 + Direction = 151 + Left_Limit = 152 + Right_Limit = 153 + Left_Limit_Expr = 154 + Right_Limit_Expr = 155 + Parent_Type = 156 + Simple_Nature = 157 + Base_Nature = 158 + Resolution_Indication = 159 + Record_Element_Resolution_Chain = 160 + Tolerance = 161 + Plus_Terminal_Name = 162 + Minus_Terminal_Name = 163 + Plus_Terminal = 164 + Minus_Terminal = 165 + Magnitude_Expression = 166 + Phase_Expression = 167 + Power_Expression = 168 + Simultaneous_Left = 169 + Simultaneous_Right = 170 + Text_File_Flag = 171 + Only_Characters_Flag = 172 + Is_Character_Type = 173 + Nature_Staticness = 174 + Type_Staticness = 175 + Constraint_State = 176 + Index_Subtype_List = 177 + Index_Subtype_Definition_List = 178 + Element_Subtype_Indication = 179 + Element_Subtype = 180 + Element_Subnature_Indication = 181 + Element_Subnature = 182 + Index_Constraint_List = 183 + Array_Element_Constraint = 184 + Has_Array_Constraint_Flag = 185 + Has_Element_Constraint_Flag = 186 + Elements_Declaration_List = 187 + Owned_Elements_Chain = 188 + Designated_Type = 189 + Designated_Subtype_Indication = 190 + Index_List = 191 + Reference = 192 + Nature_Declarator = 193 + Across_Type_Mark = 194 + Through_Type_Mark = 195 + Across_Type_Definition = 196 + Through_Type_Definition = 197 + Across_Type = 198 + Through_Type = 199 + Target = 200 + Waveform_Chain = 201 + Guard = 202 + Delay_Mechanism = 203 + Reject_Time_Expression = 204 + Force_Mode = 205 + Has_Force_Mode = 206 + Sensitivity_List = 207 + Process_Origin = 208 + Package_Origin = 209 + Condition_Clause = 210 + Break_Element = 211 + Selector_Quantity = 212 + Break_Quantity = 213 + Timeout_Clause = 214 + Postponed_Flag = 215 + Callees_List = 216 + Passive_Flag = 217 + Resolution_Function_Flag = 218 + Wait_State = 219 + All_Sensitized_State = 220 + Seen_Flag = 221 + Pure_Flag = 222 + Foreign_Flag = 223 + Resolved_Flag = 224 + Signal_Type_Flag = 225 + Has_Signal_Flag = 226 + Purity_State = 227 + Elab_Flag = 228 + Vendor_Library_Flag = 229 + Configuration_Mark_Flag = 230 + Configuration_Done_Flag = 231 + Index_Constraint_Flag = 232 + Hide_Implicit_Flag = 233 + Assertion_Condition = 234 + Report_Expression = 235 + Severity_Expression = 236 + Instantiated_Unit = 237 + Generic_Map_Aspect_Chain = 238 + Port_Map_Aspect_Chain = 239 + Configuration_Name = 240 + Component_Configuration = 241 + Configuration_Specification = 242 + Default_Binding_Indication = 243 + Default_Configuration_Declaration = 244 + Expression = 245 + Conditional_Expression_Chain = 246 + Allocator_Designated_Type = 247 + Selected_Waveform_Chain = 248 + Conditional_Waveform_Chain = 249 + Guard_Expression = 250 + Guard_Decl = 251 + Guard_Sensitivity_List = 252 + Attribute_Implicit_Chain = 253 + Block_Block_Configuration = 254 + Package_Header = 255 + Block_Header = 256 + Uninstantiated_Package_Name = 257 + Uninstantiated_Package_Decl = 258 + Instance_Source_File = 259 + Generate_Block_Configuration = 260 + Generate_Statement_Body = 261 + Alternative_Label = 262 + Generate_Else_Clause = 263 + Condition = 264 + Else_Clause = 265 + Parameter_Specification = 266 + Parent = 267 + Loop_Label = 268 + Exit_Flag = 269 + Next_Flag = 270 + Component_Name = 271 + Instantiation_List = 272 + Entity_Aspect = 273 + Default_Entity_Aspect = 274 + Binding_Indication = 275 + Named_Entity = 276 + Referenced_Name = 277 + Expr_Staticness = 278 + Scalar_Size = 279 + Error_Origin = 280 + Operand = 281 + Left = 282 + Right = 283 + Unit_Name = 284 + Name = 285 + Group_Template_Name = 286 + Name_Staticness = 287 + Prefix = 288 + Signature_Prefix = 289 + External_Pathname = 290 + Pathname_Suffix = 291 + Pathname_Expression = 292 + In_Formal_Flag = 293 + Inertial_Flag = 294 + Slice_Subtype = 295 + Suffix = 296 + Index_Subtype = 297 + Parameter = 298 + Parameter_2 = 299 + Parameter_3 = 300 + Parameter_4 = 301 + Attr_Chain = 302 + Attribute_Implicit_Declaration = 303 + Actual_Type = 304 + Actual_Type_Definition = 305 + Association_Chain = 306 + Individual_Association_Chain = 307 + Subprogram_Association_Chain = 308 + Aggregate_Info = 309 + Sub_Aggregate_Info = 310 + Aggr_Dynamic_Flag = 311 + Aggr_Min_Length = 312 + Aggr_Low_Limit = 313 + Aggr_High_Limit = 314 + Aggr_Others_Flag = 315 + Aggr_Named_Flag = 316 + Aggregate_Expand_Flag = 317 + Association_Choices_Chain = 318 + Case_Statement_Alternative_Chain = 319 + Matching_Flag = 320 + Choice_Staticness = 321 + Procedure_Call = 322 + Implementation = 323 + Parameter_Association_Chain = 324 + Method_Object = 325 + Subtype_Type_Mark = 326 + Subnature_Nature_Mark = 327 + Type_Conversion_Subtype = 328 + Type_Mark = 329 + File_Type_Mark = 330 + Return_Type_Mark = 331 + Has_Disconnect_Flag = 332 + Has_Active_Flag = 333 + Is_Within_Flag = 334 + Type_Marks_List = 335 + Implicit_Alias_Flag = 336 + Alias_Signature = 337 + Attribute_Signature = 338 + Overload_List = 339 + Simple_Name_Identifier = 340 + Simple_Name_Subtype = 341 + Protected_Type_Body = 342 + Protected_Type_Declaration = 343 + Use_Flag = 344 + End_Has_Reserved_Id = 345 + End_Has_Identifier = 346 + End_Has_Postponed = 347 + Has_Label = 348 + Has_Begin = 349 + Has_End = 350 + Has_Is = 351 + Has_Pure = 352 + Has_Body = 353 + Has_Parameter = 354 + Has_Component = 355 + Has_Identifier_List = 356 + Has_Mode = 357 + Has_Class = 358 + Has_Delay_Mechanism = 359 + Suspend_Flag = 360 + Stop_Flag = 361 + Is_Ref = 362 + Is_Forward_Ref = 363 + Psl_Property = 364 + Psl_Sequence = 365 + Psl_Declaration = 366 + Psl_Expression = 367 + Psl_Boolean = 368 + PSL_Clock = 369 + PSL_NFA = 370 + PSL_Nbr_States = 371 + PSL_Clock_Sensitivity = 372 + PSL_EOS_Flag = 373 + PSL_Abort_Flag = 374 + Count_Expression = 375 + Clock_Expression = 376 + Default_Clock = 377 + Foreign_Node = 378 + Suspend_State_Index = 379 + Suspend_State_Chain = 380 def Get_Boolean(node, field): @@ -1232,6 +1233,12 @@ def Has_Interface_Type_Subprograms(kind: IirKind) -> bool: @export +@BindToLibGHDL("vhdl__nodes_meta__has_interface_type_definition") +def Has_Interface_Type_Definition(kind: IirKind) -> bool: + """""" + + +@export @BindToLibGHDL("vhdl__nodes_meta__has_nature_definition") def Has_Nature_Definition(kind: IirKind) -> bool: """""" diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb index 9b6329c74..f03e1ab92 100644 --- a/src/vhdl/vhdl-nodes.adb +++ b/src/vhdl/vhdl-nodes.adb @@ -2982,6 +2982,22 @@ package body Vhdl.Nodes is Set_Field4 (Target, Subprg); end Set_Interface_Type_Subprograms; + function Get_Interface_Type_Definition (N : Iir) return Iir is + begin + pragma Assert (N /= Null_Iir); + pragma Assert (Has_Interface_Type_Definition (Get_Kind (N)), + "no field Interface_Type_Definition"); + return Get_Field5 (N); + end Get_Interface_Type_Definition; + + procedure Set_Interface_Type_Definition (N : Iir; Atype : Iir) is + begin + pragma Assert (N /= Null_Iir); + pragma Assert (Has_Interface_Type_Definition (Get_Kind (N)), + "no field Interface_Type_Definition"); + Set_Field5 (N, Atype); + end Set_Interface_Type_Definition; + function Get_Nature_Definition (Target : Iir) return Iir is begin pragma Assert (Target /= Null_Iir); diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 376c99daa..16907b607 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -1503,6 +1503,8 @@ package Vhdl.Nodes is -- -- Get/Set_Parent (Field0) -- + -- Get/Set_Interface_Type_Definition (Field5) + -- -- Get/Set_Type (Field1) -- -- Get/Set_Chain (Field2) @@ -8161,6 +8163,11 @@ package Vhdl.Nodes is function Get_Interface_Type_Subprograms (Target : Iir) return Iir; procedure Set_Interface_Type_Subprograms (Target : Iir; Subprg : Iir); + -- Owner of the interface type definition. + -- Field: Field5 + function Get_Interface_Type_Definition (N : Iir) return Iir; + procedure Set_Interface_Type_Definition (N : Iir; Atype : Iir); + -- Field: Field1 function Get_Nature_Definition (Target : Iir) return Iir; procedure Set_Nature_Definition (Target : Iir; Def : Iir); diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 2d92d3bae..e6e3129d3 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -117,6 +117,7 @@ package body Vhdl.Nodes_Meta is Field_Subtype_Definition => Type_Iir, Field_Incomplete_Type_Declaration => Type_Iir, Field_Interface_Type_Subprograms => Type_Iir, + Field_Interface_Type_Definition => Type_Iir, Field_Nature_Definition => Type_Iir, Field_Nature => Type_Iir, Field_Subnature_Indication => Type_Iir, @@ -607,6 +608,8 @@ package body Vhdl.Nodes_Meta is return "incomplete_type_declaration"; when Field_Interface_Type_Subprograms => return "interface_type_subprograms"; + when Field_Interface_Type_Definition => + return "interface_type_definition"; when Field_Nature_Definition => return "nature_definition"; when Field_Nature => @@ -2023,6 +2026,8 @@ package body Vhdl.Nodes_Meta is return Attr_Ref; when Field_Interface_Type_Subprograms => return Attr_Chain; + when Field_Interface_Type_Definition => + return Attr_None; when Field_Nature_Definition => return Attr_None; when Field_Nature => @@ -3910,6 +3915,7 @@ package body Vhdl.Nodes_Meta is Field_Open_Flag, Field_Name_Staticness, Field_Parent, + Field_Interface_Type_Definition, Field_Type, Field_Chain, Field_Interface_Type_Subprograms, @@ -5455,191 +5461,191 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Interface_File_Declaration => 1147, Iir_Kind_Interface_Quantity_Declaration => 1163, Iir_Kind_Interface_Terminal_Declaration => 1175, - Iir_Kind_Interface_Type_Declaration => 1186, - Iir_Kind_Interface_Package_Declaration => 1199, - Iir_Kind_Interface_Function_Declaration => 1218, - Iir_Kind_Interface_Procedure_Declaration => 1233, - Iir_Kind_Attribute_Implicit_Declaration => 1236, - Iir_Kind_Suspend_State_Declaration => 1239, - Iir_Kind_Identity_Operator => 1243, - Iir_Kind_Negation_Operator => 1247, - Iir_Kind_Absolute_Operator => 1251, - Iir_Kind_Not_Operator => 1255, - Iir_Kind_Implicit_Condition_Operator => 1259, - Iir_Kind_Condition_Operator => 1263, - Iir_Kind_Reduction_And_Operator => 1267, - Iir_Kind_Reduction_Or_Operator => 1271, - Iir_Kind_Reduction_Nand_Operator => 1275, - Iir_Kind_Reduction_Nor_Operator => 1279, - Iir_Kind_Reduction_Xor_Operator => 1283, - Iir_Kind_Reduction_Xnor_Operator => 1287, - Iir_Kind_And_Operator => 1292, - Iir_Kind_Or_Operator => 1297, - Iir_Kind_Nand_Operator => 1302, - Iir_Kind_Nor_Operator => 1307, - Iir_Kind_Xor_Operator => 1312, - Iir_Kind_Xnor_Operator => 1317, - Iir_Kind_Equality_Operator => 1322, - Iir_Kind_Inequality_Operator => 1327, - Iir_Kind_Less_Than_Operator => 1332, - Iir_Kind_Less_Than_Or_Equal_Operator => 1337, - Iir_Kind_Greater_Than_Operator => 1342, - Iir_Kind_Greater_Than_Or_Equal_Operator => 1347, - Iir_Kind_Match_Equality_Operator => 1352, - Iir_Kind_Match_Inequality_Operator => 1357, - Iir_Kind_Match_Less_Than_Operator => 1362, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1367, - Iir_Kind_Match_Greater_Than_Operator => 1372, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1377, - Iir_Kind_Sll_Operator => 1382, - Iir_Kind_Sla_Operator => 1387, - Iir_Kind_Srl_Operator => 1392, - Iir_Kind_Sra_Operator => 1397, - Iir_Kind_Rol_Operator => 1402, - Iir_Kind_Ror_Operator => 1407, - Iir_Kind_Addition_Operator => 1412, - Iir_Kind_Substraction_Operator => 1417, - Iir_Kind_Concatenation_Operator => 1422, - Iir_Kind_Multiplication_Operator => 1427, - Iir_Kind_Division_Operator => 1432, - Iir_Kind_Modulus_Operator => 1437, - Iir_Kind_Remainder_Operator => 1442, - Iir_Kind_Exponentiation_Operator => 1447, - Iir_Kind_Function_Call => 1455, - Iir_Kind_Aggregate => 1462, - Iir_Kind_Parenthesis_Expression => 1465, - Iir_Kind_Qualified_Expression => 1469, - Iir_Kind_Type_Conversion => 1474, - Iir_Kind_Allocator_By_Expression => 1479, - Iir_Kind_Allocator_By_Subtype => 1485, - Iir_Kind_Selected_Element => 1493, - Iir_Kind_Dereference => 1498, - Iir_Kind_Implicit_Dereference => 1503, - Iir_Kind_Slice_Name => 1510, - Iir_Kind_Indexed_Name => 1516, - Iir_Kind_Psl_Prev => 1522, - Iir_Kind_Psl_Stable => 1527, - Iir_Kind_Psl_Rose => 1532, - Iir_Kind_Psl_Fell => 1537, - Iir_Kind_Psl_Onehot => 1540, - Iir_Kind_Psl_Onehot0 => 1543, - Iir_Kind_Psl_Expression => 1545, - Iir_Kind_Sensitized_Process_Statement => 1567, - Iir_Kind_Process_Statement => 1588, - Iir_Kind_Concurrent_Simple_Signal_Assignment => 1601, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1614, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1628, - Iir_Kind_Concurrent_Assertion_Statement => 1636, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1643, - Iir_Kind_Concurrent_Break_Statement => 1651, - Iir_Kind_Psl_Assert_Directive => 1665, - Iir_Kind_Psl_Assume_Directive => 1677, - Iir_Kind_Psl_Cover_Directive => 1689, - Iir_Kind_Psl_Restrict_Directive => 1700, - Iir_Kind_Block_Statement => 1714, - Iir_Kind_If_Generate_Statement => 1725, - Iir_Kind_Case_Generate_Statement => 1734, - Iir_Kind_For_Generate_Statement => 1743, - Iir_Kind_Component_Instantiation_Statement => 1754, - Iir_Kind_Psl_Default_Clock => 1757, - Iir_Kind_Generate_Statement_Body => 1768, - Iir_Kind_If_Generate_Else_Clause => 1774, - Iir_Kind_Simple_Simultaneous_Statement => 1781, - Iir_Kind_Simultaneous_Null_Statement => 1785, - Iir_Kind_Simultaneous_Procedural_Statement => 1796, - Iir_Kind_Simultaneous_Case_Statement => 1805, - Iir_Kind_Simultaneous_If_Statement => 1814, - Iir_Kind_Simultaneous_Elsif => 1820, - Iir_Kind_Simple_Signal_Assignment_Statement => 1831, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1842, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1854, - Iir_Kind_Signal_Force_Assignment_Statement => 1864, - Iir_Kind_Signal_Release_Assignment_Statement => 1873, - Iir_Kind_Null_Statement => 1877, - Iir_Kind_Assertion_Statement => 1884, - Iir_Kind_Report_Statement => 1890, - Iir_Kind_Wait_Statement => 1898, - Iir_Kind_Variable_Assignment_Statement => 1905, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1912, - Iir_Kind_Return_Statement => 1918, - Iir_Kind_For_Loop_Statement => 1929, - Iir_Kind_While_Loop_Statement => 1940, - Iir_Kind_Next_Statement => 1947, - Iir_Kind_Exit_Statement => 1954, - Iir_Kind_Case_Statement => 1963, - Iir_Kind_Procedure_Call_Statement => 1969, - Iir_Kind_Break_Statement => 1976, - Iir_Kind_If_Statement => 1986, - Iir_Kind_Suspend_State_Statement => 1990, - Iir_Kind_Elsif => 1996, - Iir_Kind_Character_Literal => 2003, - Iir_Kind_Simple_Name => 2010, - Iir_Kind_Selected_Name => 2018, - Iir_Kind_Operator_Symbol => 2023, - Iir_Kind_Reference_Name => 2028, - Iir_Kind_External_Constant_Name => 2037, - Iir_Kind_External_Signal_Name => 2046, - Iir_Kind_External_Variable_Name => 2056, - Iir_Kind_Selected_By_All_Name => 2062, - Iir_Kind_Parenthesis_Name => 2067, - Iir_Kind_Package_Pathname => 2071, - Iir_Kind_Absolute_Pathname => 2072, - Iir_Kind_Relative_Pathname => 2073, - Iir_Kind_Pathname_Element => 2078, - Iir_Kind_Base_Attribute => 2080, - Iir_Kind_Subtype_Attribute => 2085, - Iir_Kind_Element_Attribute => 2090, - Iir_Kind_Across_Attribute => 2095, - Iir_Kind_Through_Attribute => 2100, - Iir_Kind_Nature_Reference_Attribute => 2104, - Iir_Kind_Left_Type_Attribute => 2109, - Iir_Kind_Right_Type_Attribute => 2114, - Iir_Kind_High_Type_Attribute => 2119, - Iir_Kind_Low_Type_Attribute => 2124, - Iir_Kind_Ascending_Type_Attribute => 2129, - Iir_Kind_Image_Attribute => 2135, - Iir_Kind_Value_Attribute => 2141, - Iir_Kind_Pos_Attribute => 2147, - Iir_Kind_Val_Attribute => 2153, - Iir_Kind_Succ_Attribute => 2159, - Iir_Kind_Pred_Attribute => 2165, - Iir_Kind_Leftof_Attribute => 2171, - Iir_Kind_Rightof_Attribute => 2177, - Iir_Kind_Signal_Slew_Attribute => 2185, - Iir_Kind_Quantity_Slew_Attribute => 2193, - Iir_Kind_Ramp_Attribute => 2201, - Iir_Kind_Zoh_Attribute => 2209, - Iir_Kind_Ltf_Attribute => 2217, - Iir_Kind_Ztf_Attribute => 2227, - Iir_Kind_Dot_Attribute => 2234, - Iir_Kind_Integ_Attribute => 2241, - Iir_Kind_Quantity_Delayed_Attribute => 2249, - Iir_Kind_Above_Attribute => 2257, - Iir_Kind_Delayed_Attribute => 2266, - Iir_Kind_Stable_Attribute => 2275, - Iir_Kind_Quiet_Attribute => 2284, - Iir_Kind_Transaction_Attribute => 2293, - Iir_Kind_Event_Attribute => 2297, - Iir_Kind_Active_Attribute => 2301, - Iir_Kind_Last_Event_Attribute => 2305, - Iir_Kind_Last_Active_Attribute => 2309, - Iir_Kind_Last_Value_Attribute => 2313, - Iir_Kind_Driving_Attribute => 2317, - Iir_Kind_Driving_Value_Attribute => 2321, - Iir_Kind_Behavior_Attribute => 2321, - Iir_Kind_Structure_Attribute => 2321, - Iir_Kind_Simple_Name_Attribute => 2328, - Iir_Kind_Instance_Name_Attribute => 2333, - Iir_Kind_Path_Name_Attribute => 2338, - Iir_Kind_Left_Array_Attribute => 2345, - Iir_Kind_Right_Array_Attribute => 2352, - Iir_Kind_High_Array_Attribute => 2359, - Iir_Kind_Low_Array_Attribute => 2366, - Iir_Kind_Length_Array_Attribute => 2373, - Iir_Kind_Ascending_Array_Attribute => 2380, - Iir_Kind_Range_Array_Attribute => 2387, - Iir_Kind_Reverse_Range_Array_Attribute => 2394, - Iir_Kind_Attribute_Name => 2403 + Iir_Kind_Interface_Type_Declaration => 1187, + Iir_Kind_Interface_Package_Declaration => 1200, + Iir_Kind_Interface_Function_Declaration => 1219, + Iir_Kind_Interface_Procedure_Declaration => 1234, + Iir_Kind_Attribute_Implicit_Declaration => 1237, + Iir_Kind_Suspend_State_Declaration => 1240, + Iir_Kind_Identity_Operator => 1244, + Iir_Kind_Negation_Operator => 1248, + Iir_Kind_Absolute_Operator => 1252, + Iir_Kind_Not_Operator => 1256, + Iir_Kind_Implicit_Condition_Operator => 1260, + Iir_Kind_Condition_Operator => 1264, + Iir_Kind_Reduction_And_Operator => 1268, + Iir_Kind_Reduction_Or_Operator => 1272, + Iir_Kind_Reduction_Nand_Operator => 1276, + Iir_Kind_Reduction_Nor_Operator => 1280, + Iir_Kind_Reduction_Xor_Operator => 1284, + Iir_Kind_Reduction_Xnor_Operator => 1288, + Iir_Kind_And_Operator => 1293, + Iir_Kind_Or_Operator => 1298, + Iir_Kind_Nand_Operator => 1303, + Iir_Kind_Nor_Operator => 1308, + Iir_Kind_Xor_Operator => 1313, + Iir_Kind_Xnor_Operator => 1318, + Iir_Kind_Equality_Operator => 1323, + Iir_Kind_Inequality_Operator => 1328, + Iir_Kind_Less_Than_Operator => 1333, + Iir_Kind_Less_Than_Or_Equal_Operator => 1338, + Iir_Kind_Greater_Than_Operator => 1343, + Iir_Kind_Greater_Than_Or_Equal_Operator => 1348, + Iir_Kind_Match_Equality_Operator => 1353, + Iir_Kind_Match_Inequality_Operator => 1358, + Iir_Kind_Match_Less_Than_Operator => 1363, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1368, + Iir_Kind_Match_Greater_Than_Operator => 1373, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1378, + Iir_Kind_Sll_Operator => 1383, + Iir_Kind_Sla_Operator => 1388, + Iir_Kind_Srl_Operator => 1393, + Iir_Kind_Sra_Operator => 1398, + Iir_Kind_Rol_Operator => 1403, + Iir_Kind_Ror_Operator => 1408, + Iir_Kind_Addition_Operator => 1413, + Iir_Kind_Substraction_Operator => 1418, + Iir_Kind_Concatenation_Operator => 1423, + Iir_Kind_Multiplication_Operator => 1428, + Iir_Kind_Division_Operator => 1433, + Iir_Kind_Modulus_Operator => 1438, + Iir_Kind_Remainder_Operator => 1443, + Iir_Kind_Exponentiation_Operator => 1448, + Iir_Kind_Function_Call => 1456, + Iir_Kind_Aggregate => 1463, + Iir_Kind_Parenthesis_Expression => 1466, + Iir_Kind_Qualified_Expression => 1470, + Iir_Kind_Type_Conversion => 1475, + Iir_Kind_Allocator_By_Expression => 1480, + Iir_Kind_Allocator_By_Subtype => 1486, + Iir_Kind_Selected_Element => 1494, + Iir_Kind_Dereference => 1499, + Iir_Kind_Implicit_Dereference => 1504, + Iir_Kind_Slice_Name => 1511, + Iir_Kind_Indexed_Name => 1517, + Iir_Kind_Psl_Prev => 1523, + Iir_Kind_Psl_Stable => 1528, + Iir_Kind_Psl_Rose => 1533, + Iir_Kind_Psl_Fell => 1538, + Iir_Kind_Psl_Onehot => 1541, + Iir_Kind_Psl_Onehot0 => 1544, + Iir_Kind_Psl_Expression => 1546, + Iir_Kind_Sensitized_Process_Statement => 1568, + Iir_Kind_Process_Statement => 1589, + Iir_Kind_Concurrent_Simple_Signal_Assignment => 1602, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1615, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1629, + Iir_Kind_Concurrent_Assertion_Statement => 1637, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1644, + Iir_Kind_Concurrent_Break_Statement => 1652, + Iir_Kind_Psl_Assert_Directive => 1666, + Iir_Kind_Psl_Assume_Directive => 1678, + Iir_Kind_Psl_Cover_Directive => 1690, + Iir_Kind_Psl_Restrict_Directive => 1701, + Iir_Kind_Block_Statement => 1715, + Iir_Kind_If_Generate_Statement => 1726, + Iir_Kind_Case_Generate_Statement => 1735, + Iir_Kind_For_Generate_Statement => 1744, + Iir_Kind_Component_Instantiation_Statement => 1755, + Iir_Kind_Psl_Default_Clock => 1758, + Iir_Kind_Generate_Statement_Body => 1769, + Iir_Kind_If_Generate_Else_Clause => 1775, + Iir_Kind_Simple_Simultaneous_Statement => 1782, + Iir_Kind_Simultaneous_Null_Statement => 1786, + Iir_Kind_Simultaneous_Procedural_Statement => 1797, + Iir_Kind_Simultaneous_Case_Statement => 1806, + Iir_Kind_Simultaneous_If_Statement => 1815, + Iir_Kind_Simultaneous_Elsif => 1821, + Iir_Kind_Simple_Signal_Assignment_Statement => 1832, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1843, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1855, + Iir_Kind_Signal_Force_Assignment_Statement => 1865, + Iir_Kind_Signal_Release_Assignment_Statement => 1874, + Iir_Kind_Null_Statement => 1878, + Iir_Kind_Assertion_Statement => 1885, + Iir_Kind_Report_Statement => 1891, + Iir_Kind_Wait_Statement => 1899, + Iir_Kind_Variable_Assignment_Statement => 1906, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1913, + Iir_Kind_Return_Statement => 1919, + Iir_Kind_For_Loop_Statement => 1930, + Iir_Kind_While_Loop_Statement => 1941, + Iir_Kind_Next_Statement => 1948, + Iir_Kind_Exit_Statement => 1955, + Iir_Kind_Case_Statement => 1964, + Iir_Kind_Procedure_Call_Statement => 1970, + Iir_Kind_Break_Statement => 1977, + Iir_Kind_If_Statement => 1987, + Iir_Kind_Suspend_State_Statement => 1991, + Iir_Kind_Elsif => 1997, + Iir_Kind_Character_Literal => 2004, + Iir_Kind_Simple_Name => 2011, + Iir_Kind_Selected_Name => 2019, + Iir_Kind_Operator_Symbol => 2024, + Iir_Kind_Reference_Name => 2029, + Iir_Kind_External_Constant_Name => 2038, + Iir_Kind_External_Signal_Name => 2047, + Iir_Kind_External_Variable_Name => 2057, + Iir_Kind_Selected_By_All_Name => 2063, + Iir_Kind_Parenthesis_Name => 2068, + Iir_Kind_Package_Pathname => 2072, + Iir_Kind_Absolute_Pathname => 2073, + Iir_Kind_Relative_Pathname => 2074, + Iir_Kind_Pathname_Element => 2079, + Iir_Kind_Base_Attribute => 2081, + Iir_Kind_Subtype_Attribute => 2086, + Iir_Kind_Element_Attribute => 2091, + Iir_Kind_Across_Attribute => 2096, + Iir_Kind_Through_Attribute => 2101, + Iir_Kind_Nature_Reference_Attribute => 2105, + Iir_Kind_Left_Type_Attribute => 2110, + Iir_Kind_Right_Type_Attribute => 2115, + Iir_Kind_High_Type_Attribute => 2120, + Iir_Kind_Low_Type_Attribute => 2125, + Iir_Kind_Ascending_Type_Attribute => 2130, + Iir_Kind_Image_Attribute => 2136, + Iir_Kind_Value_Attribute => 2142, + Iir_Kind_Pos_Attribute => 2148, + Iir_Kind_Val_Attribute => 2154, + Iir_Kind_Succ_Attribute => 2160, + Iir_Kind_Pred_Attribute => 2166, + Iir_Kind_Leftof_Attribute => 2172, + Iir_Kind_Rightof_Attribute => 2178, + Iir_Kind_Signal_Slew_Attribute => 2186, + Iir_Kind_Quantity_Slew_Attribute => 2194, + Iir_Kind_Ramp_Attribute => 2202, + Iir_Kind_Zoh_Attribute => 2210, + Iir_Kind_Ltf_Attribute => 2218, + Iir_Kind_Ztf_Attribute => 2228, + Iir_Kind_Dot_Attribute => 2235, + Iir_Kind_Integ_Attribute => 2242, + Iir_Kind_Quantity_Delayed_Attribute => 2250, + Iir_Kind_Above_Attribute => 2258, + Iir_Kind_Delayed_Attribute => 2267, + Iir_Kind_Stable_Attribute => 2276, + Iir_Kind_Quiet_Attribute => 2285, + Iir_Kind_Transaction_Attribute => 2294, + Iir_Kind_Event_Attribute => 2298, + Iir_Kind_Active_Attribute => 2302, + Iir_Kind_Last_Event_Attribute => 2306, + Iir_Kind_Last_Active_Attribute => 2310, + Iir_Kind_Last_Value_Attribute => 2314, + Iir_Kind_Driving_Attribute => 2318, + Iir_Kind_Driving_Value_Attribute => 2322, + Iir_Kind_Behavior_Attribute => 2322, + Iir_Kind_Structure_Attribute => 2322, + Iir_Kind_Simple_Name_Attribute => 2329, + Iir_Kind_Instance_Name_Attribute => 2334, + Iir_Kind_Path_Name_Attribute => 2339, + Iir_Kind_Left_Array_Attribute => 2346, + Iir_Kind_Right_Array_Attribute => 2353, + Iir_Kind_High_Array_Attribute => 2360, + Iir_Kind_Low_Array_Attribute => 2367, + Iir_Kind_Length_Array_Attribute => 2374, + Iir_Kind_Ascending_Array_Attribute => 2381, + Iir_Kind_Range_Array_Attribute => 2388, + Iir_Kind_Reverse_Range_Array_Attribute => 2395, + Iir_Kind_Attribute_Name => 2404 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -6232,6 +6238,8 @@ package body Vhdl.Nodes_Meta is return Get_Incomplete_Type_Declaration (N); when Field_Interface_Type_Subprograms => return Get_Interface_Type_Subprograms (N); + when Field_Interface_Type_Definition => + return Get_Interface_Type_Definition (N); when Field_Nature_Definition => return Get_Nature_Definition (N); when Field_Nature => @@ -6696,6 +6704,8 @@ package body Vhdl.Nodes_Meta is Set_Incomplete_Type_Declaration (N, V); when Field_Interface_Type_Subprograms => Set_Interface_Type_Subprograms (N, V); + when Field_Interface_Type_Definition => + Set_Interface_Type_Definition (N, V); when Field_Nature_Definition => Set_Nature_Definition (N, V); when Field_Nature => @@ -8989,6 +8999,11 @@ package body Vhdl.Nodes_Meta is return K = Iir_Kind_Interface_Type_Declaration; end Has_Interface_Type_Subprograms; + function Has_Interface_Type_Definition (K : Iir_Kind) return Boolean is + begin + return K = Iir_Kind_Interface_Type_Declaration; + end Has_Interface_Type_Definition; + function Has_Nature_Definition (K : Iir_Kind) return Boolean is begin return K = Iir_Kind_Nature_Declaration; diff --git a/src/vhdl/vhdl-nodes_meta.ads b/src/vhdl/vhdl-nodes_meta.ads index 214f2f067..940f6d8fb 100644 --- a/src/vhdl/vhdl-nodes_meta.ads +++ b/src/vhdl/vhdl-nodes_meta.ads @@ -161,6 +161,7 @@ package Vhdl.Nodes_Meta is Field_Subtype_Definition, Field_Incomplete_Type_Declaration, Field_Interface_Type_Subprograms, + Field_Interface_Type_Definition, Field_Nature_Definition, Field_Nature, Field_Subnature_Indication, @@ -754,6 +755,7 @@ package Vhdl.Nodes_Meta is function Has_Subtype_Definition (K : Iir_Kind) return Boolean; function Has_Incomplete_Type_Declaration (K : Iir_Kind) return Boolean; function Has_Interface_Type_Subprograms (K : Iir_Kind) return Boolean; + function Has_Interface_Type_Definition (K : Iir_Kind) return Boolean; function Has_Nature_Definition (K : Iir_Kind) return Boolean; function Has_Nature (K : Iir_Kind) return Boolean; function Has_Subnature_Indication (K : Iir_Kind) return Boolean; diff --git a/src/vhdl/vhdl-sem_decls.adb b/src/vhdl/vhdl-sem_decls.adb index 0d5a02bad..55cc4b793 100644 --- a/src/vhdl/vhdl-sem_decls.adb +++ b/src/vhdl/vhdl-sem_decls.adb @@ -550,11 +550,12 @@ package body Vhdl.Sem_Decls is Finters : Iir; Op_Eq, Op_Neq : Iir; begin - -- Create type definition. + -- Create type definition. The definition is owned by the declaration. Def := Create_Iir (Iir_Kind_Interface_Type_Definition); Set_Location (Def, Get_Location (Inter)); Set_Type_Declarator (Def, Inter); Set_Type (Inter, Def); + Set_Interface_Type_Definition (Inter, Def); Set_Type_Staticness (Def, None); Set_Resolved_Flag (Def, False); Set_Signal_Type_Flag (Def, True); diff --git a/src/vhdl/vhdl-sem_inst.adb b/src/vhdl/vhdl-sem_inst.adb index d184aa0ea..d8f2728ab 100644 --- a/src/vhdl/vhdl-sem_inst.adb +++ b/src/vhdl/vhdl-sem_inst.adb @@ -1253,7 +1253,12 @@ package body Vhdl.Sem_Inst is declare S : constant Iir := Get_Iir (N, F); begin - if S = E then + if F = Field_Interface_Type_Definition then + -- Do not substitute this Interface_Type_Definition, + -- it is only to own the type definition in the + -- uninstantiated interface. + null; + elsif S = E then -- Substitute Set_Iir (N, F, Rep); pragma Assert (Get_Field_Attribute (F) = Attr_Ref); |