From a9f68a1d91f8ea2a74d8ad4c34f9c777746848a4 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 5 Apr 2021 08:56:13 +0200 Subject: vhdl: add Iir_Kind_Foreign_Module --- pyGHDL/libghdl/vhdl/nodes.py | 635 +++++++++++++++++++------------------- pyGHDL/libghdl/vhdl/nodes_meta.py | 3 + 2 files changed, 325 insertions(+), 313 deletions(-) (limited to 'pyGHDL/libghdl/vhdl') diff --git a/pyGHDL/libghdl/vhdl/nodes.py b/pyGHDL/libghdl/vhdl/nodes.py index 9aa63deb1..3d0c43f4b 100644 --- a/pyGHDL/libghdl/vhdl/nodes.py +++ b/pyGHDL/libghdl/vhdl/nodes.py @@ -20,319 +20,320 @@ class Iir_Kind: Error = 1 Design_File = 2 Design_Unit = 3 - Library_Clause = 4 - Use_Clause = 5 - Context_Reference = 6 - Integer_Literal = 7 - Floating_Point_Literal = 8 - Null_Literal = 9 - String_Literal8 = 10 - Physical_Int_Literal = 11 - Physical_Fp_Literal = 12 - Simple_Aggregate = 13 - Overflow_Literal = 14 - Unaffected_Waveform = 15 - Waveform_Element = 16 - Conditional_Waveform = 17 - Conditional_Expression = 18 - Association_Element_By_Expression = 19 - Association_Element_By_Individual = 20 - Association_Element_Open = 21 - Association_Element_Package = 22 - Association_Element_Type = 23 - Association_Element_Subprogram = 24 - Association_Element_Terminal = 25 - Choice_By_Range = 26 - Choice_By_Expression = 27 - Choice_By_Others = 28 - Choice_By_None = 29 - Choice_By_Name = 30 - Entity_Aspect_Entity = 31 - Entity_Aspect_Configuration = 32 - Entity_Aspect_Open = 33 - Psl_Hierarchical_Name = 34 - Block_Configuration = 35 - Block_Header = 36 - Component_Configuration = 37 - Binding_Indication = 38 - Entity_Class = 39 - Attribute_Value = 40 - Signature = 41 - Aggregate_Info = 42 - Procedure_Call = 43 - Record_Element_Constraint = 44 - Array_Element_Resolution = 45 - Record_Resolution = 46 - Record_Element_Resolution = 47 - Break_Element = 48 - Attribute_Specification = 49 - Disconnection_Specification = 50 - Step_Limit_Specification = 51 - Configuration_Specification = 52 - Access_Type_Definition = 53 - Incomplete_Type_Definition = 54 - Interface_Type_Definition = 55 - File_Type_Definition = 56 - Protected_Type_Declaration = 57 - Record_Type_Definition = 58 - Array_Type_Definition = 59 - Array_Subtype_Definition = 60 - Record_Subtype_Definition = 61 - Access_Subtype_Definition = 62 - Physical_Subtype_Definition = 63 - Floating_Subtype_Definition = 64 - Integer_Subtype_Definition = 65 - Enumeration_Subtype_Definition = 66 - Enumeration_Type_Definition = 67 - Integer_Type_Definition = 68 - Floating_Type_Definition = 69 - Physical_Type_Definition = 70 - Range_Expression = 71 - Protected_Type_Body = 72 - Wildcard_Type_Definition = 73 - Subtype_Definition = 74 - Scalar_Nature_Definition = 75 - Record_Nature_Definition = 76 - Array_Nature_Definition = 77 - Array_Subnature_Definition = 78 - Overload_List = 79 - Entity_Declaration = 80 - Configuration_Declaration = 81 - Context_Declaration = 82 - Package_Declaration = 83 - Package_Instantiation_Declaration = 84 - Vmode_Declaration = 85 - Vprop_Declaration = 86 - Vunit_Declaration = 87 - Package_Body = 88 - Architecture_Body = 89 - Type_Declaration = 90 - Anonymous_Type_Declaration = 91 - Subtype_Declaration = 92 - Nature_Declaration = 93 - Subnature_Declaration = 94 - Package_Header = 95 - Unit_Declaration = 96 - Library_Declaration = 97 - Component_Declaration = 98 - Attribute_Declaration = 99 - Group_Template_Declaration = 100 - Group_Declaration = 101 - Element_Declaration = 102 - Nature_Element_Declaration = 103 - Non_Object_Alias_Declaration = 104 - Psl_Declaration = 105 - Psl_Endpoint_Declaration = 106 - Enumeration_Literal = 107 - Function_Declaration = 108 - Procedure_Declaration = 109 - Function_Body = 110 - Procedure_Body = 111 - Function_Instantiation_Declaration = 112 - Procedure_Instantiation_Declaration = 113 - Terminal_Declaration = 114 - Object_Alias_Declaration = 115 - Free_Quantity_Declaration = 116 - Spectrum_Quantity_Declaration = 117 - Noise_Quantity_Declaration = 118 - Across_Quantity_Declaration = 119 - Through_Quantity_Declaration = 120 - File_Declaration = 121 - Guard_Signal_Declaration = 122 - Signal_Declaration = 123 - Variable_Declaration = 124 - Constant_Declaration = 125 - Iterator_Declaration = 126 - Interface_Constant_Declaration = 127 - Interface_Variable_Declaration = 128 - Interface_Signal_Declaration = 129 - Interface_File_Declaration = 130 - Interface_Quantity_Declaration = 131 - Interface_Terminal_Declaration = 132 - Interface_Type_Declaration = 133 - Interface_Package_Declaration = 134 - Interface_Function_Declaration = 135 - Interface_Procedure_Declaration = 136 - Anonymous_Signal_Declaration = 137 - Signal_Attribute_Declaration = 138 - Identity_Operator = 139 - Negation_Operator = 140 - Absolute_Operator = 141 - Not_Operator = 142 - Implicit_Condition_Operator = 143 - Condition_Operator = 144 - Reduction_And_Operator = 145 - Reduction_Or_Operator = 146 - Reduction_Nand_Operator = 147 - Reduction_Nor_Operator = 148 - Reduction_Xor_Operator = 149 - Reduction_Xnor_Operator = 150 - And_Operator = 151 - Or_Operator = 152 - Nand_Operator = 153 - Nor_Operator = 154 - Xor_Operator = 155 - Xnor_Operator = 156 - Equality_Operator = 157 - Inequality_Operator = 158 - Less_Than_Operator = 159 - Less_Than_Or_Equal_Operator = 160 - Greater_Than_Operator = 161 - Greater_Than_Or_Equal_Operator = 162 - Match_Equality_Operator = 163 - Match_Inequality_Operator = 164 - Match_Less_Than_Operator = 165 - Match_Less_Than_Or_Equal_Operator = 166 - Match_Greater_Than_Operator = 167 - Match_Greater_Than_Or_Equal_Operator = 168 - Sll_Operator = 169 - Sla_Operator = 170 - Srl_Operator = 171 - Sra_Operator = 172 - Rol_Operator = 173 - Ror_Operator = 174 - Addition_Operator = 175 - Substraction_Operator = 176 - Concatenation_Operator = 177 - Multiplication_Operator = 178 - Division_Operator = 179 - Modulus_Operator = 180 - Remainder_Operator = 181 - Exponentiation_Operator = 182 - Function_Call = 183 - Aggregate = 184 - Parenthesis_Expression = 185 - Qualified_Expression = 186 - Type_Conversion = 187 - Allocator_By_Expression = 188 - Allocator_By_Subtype = 189 - Selected_Element = 190 - Dereference = 191 - Implicit_Dereference = 192 - Slice_Name = 193 - Indexed_Name = 194 - Psl_Prev = 195 - Psl_Stable = 196 - Psl_Rose = 197 - Psl_Fell = 198 - Psl_Onehot = 199 - Psl_Onehot0 = 200 - Psl_Expression = 201 - Sensitized_Process_Statement = 202 - Process_Statement = 203 - Concurrent_Simple_Signal_Assignment = 204 - Concurrent_Conditional_Signal_Assignment = 205 - Concurrent_Selected_Signal_Assignment = 206 - Concurrent_Assertion_Statement = 207 - Concurrent_Procedure_Call_Statement = 208 - Concurrent_Break_Statement = 209 - Psl_Assert_Directive = 210 - Psl_Assume_Directive = 211 - Psl_Cover_Directive = 212 - Psl_Restrict_Directive = 213 - Block_Statement = 214 - If_Generate_Statement = 215 - Case_Generate_Statement = 216 - For_Generate_Statement = 217 - Component_Instantiation_Statement = 218 - Psl_Default_Clock = 219 - Generate_Statement_Body = 220 - If_Generate_Else_Clause = 221 - Simple_Simultaneous_Statement = 222 - Simultaneous_Null_Statement = 223 - Simultaneous_Procedural_Statement = 224 - Simultaneous_Case_Statement = 225 - Simultaneous_If_Statement = 226 - Simultaneous_Elsif = 227 - Simple_Signal_Assignment_Statement = 228 - Conditional_Signal_Assignment_Statement = 229 - Selected_Waveform_Assignment_Statement = 230 - Signal_Force_Assignment_Statement = 231 - Signal_Release_Assignment_Statement = 232 - Null_Statement = 233 - Assertion_Statement = 234 - Report_Statement = 235 - Wait_Statement = 236 - Variable_Assignment_Statement = 237 - Conditional_Variable_Assignment_Statement = 238 - Return_Statement = 239 - For_Loop_Statement = 240 - While_Loop_Statement = 241 - Next_Statement = 242 - Exit_Statement = 243 - Case_Statement = 244 - Procedure_Call_Statement = 245 - Break_Statement = 246 - If_Statement = 247 - Elsif = 248 - Character_Literal = 249 - Simple_Name = 250 - Selected_Name = 251 - Operator_Symbol = 252 - Reference_Name = 253 - External_Constant_Name = 254 - External_Signal_Name = 255 - External_Variable_Name = 256 - Selected_By_All_Name = 257 - Parenthesis_Name = 258 - Package_Pathname = 259 - Absolute_Pathname = 260 - Relative_Pathname = 261 - Pathname_Element = 262 - Base_Attribute = 263 - Subtype_Attribute = 264 - Element_Attribute = 265 - Across_Attribute = 266 - Through_Attribute = 267 - Nature_Reference_Attribute = 268 - Left_Type_Attribute = 269 - Right_Type_Attribute = 270 - High_Type_Attribute = 271 - Low_Type_Attribute = 272 - Ascending_Type_Attribute = 273 - Image_Attribute = 274 - Value_Attribute = 275 - Pos_Attribute = 276 - Val_Attribute = 277 - Succ_Attribute = 278 - Pred_Attribute = 279 - Leftof_Attribute = 280 - Rightof_Attribute = 281 - Signal_Slew_Attribute = 282 - Quantity_Slew_Attribute = 283 - Ramp_Attribute = 284 - Zoh_Attribute = 285 - Ltf_Attribute = 286 - Ztf_Attribute = 287 - Dot_Attribute = 288 - Integ_Attribute = 289 - Above_Attribute = 290 - Quantity_Delayed_Attribute = 291 - Delayed_Attribute = 292 - Stable_Attribute = 293 - Quiet_Attribute = 294 - Transaction_Attribute = 295 - Event_Attribute = 296 - Active_Attribute = 297 - Last_Event_Attribute = 298 - Last_Active_Attribute = 299 - Last_Value_Attribute = 300 - Driving_Attribute = 301 - Driving_Value_Attribute = 302 - Behavior_Attribute = 303 - Structure_Attribute = 304 - Simple_Name_Attribute = 305 - Instance_Name_Attribute = 306 - Path_Name_Attribute = 307 - Left_Array_Attribute = 308 - Right_Array_Attribute = 309 - High_Array_Attribute = 310 - Low_Array_Attribute = 311 - Length_Array_Attribute = 312 - Ascending_Array_Attribute = 313 - Range_Array_Attribute = 314 - Reverse_Range_Array_Attribute = 315 - Attribute_Name = 316 + Foreign_Module = 4 + Library_Clause = 5 + Use_Clause = 6 + Context_Reference = 7 + Integer_Literal = 8 + Floating_Point_Literal = 9 + Null_Literal = 10 + String_Literal8 = 11 + Physical_Int_Literal = 12 + Physical_Fp_Literal = 13 + Simple_Aggregate = 14 + Overflow_Literal = 15 + Unaffected_Waveform = 16 + Waveform_Element = 17 + Conditional_Waveform = 18 + Conditional_Expression = 19 + Association_Element_By_Expression = 20 + Association_Element_By_Individual = 21 + Association_Element_Open = 22 + Association_Element_Package = 23 + Association_Element_Type = 24 + Association_Element_Subprogram = 25 + Association_Element_Terminal = 26 + Choice_By_Range = 27 + Choice_By_Expression = 28 + Choice_By_Others = 29 + Choice_By_None = 30 + Choice_By_Name = 31 + Entity_Aspect_Entity = 32 + Entity_Aspect_Configuration = 33 + Entity_Aspect_Open = 34 + Psl_Hierarchical_Name = 35 + Block_Configuration = 36 + Block_Header = 37 + Component_Configuration = 38 + Binding_Indication = 39 + Entity_Class = 40 + Attribute_Value = 41 + Signature = 42 + Aggregate_Info = 43 + Procedure_Call = 44 + Record_Element_Constraint = 45 + Array_Element_Resolution = 46 + Record_Resolution = 47 + Record_Element_Resolution = 48 + Break_Element = 49 + Attribute_Specification = 50 + Disconnection_Specification = 51 + Step_Limit_Specification = 52 + Configuration_Specification = 53 + Access_Type_Definition = 54 + Incomplete_Type_Definition = 55 + Interface_Type_Definition = 56 + File_Type_Definition = 57 + Protected_Type_Declaration = 58 + Record_Type_Definition = 59 + Array_Type_Definition = 60 + Array_Subtype_Definition = 61 + Record_Subtype_Definition = 62 + Access_Subtype_Definition = 63 + Physical_Subtype_Definition = 64 + Floating_Subtype_Definition = 65 + Integer_Subtype_Definition = 66 + Enumeration_Subtype_Definition = 67 + Enumeration_Type_Definition = 68 + Integer_Type_Definition = 69 + Floating_Type_Definition = 70 + Physical_Type_Definition = 71 + Range_Expression = 72 + Protected_Type_Body = 73 + Wildcard_Type_Definition = 74 + Subtype_Definition = 75 + Scalar_Nature_Definition = 76 + Record_Nature_Definition = 77 + Array_Nature_Definition = 78 + Array_Subnature_Definition = 79 + Overload_List = 80 + Entity_Declaration = 81 + Configuration_Declaration = 82 + Context_Declaration = 83 + Package_Declaration = 84 + Package_Instantiation_Declaration = 85 + Vmode_Declaration = 86 + Vprop_Declaration = 87 + Vunit_Declaration = 88 + Package_Body = 89 + Architecture_Body = 90 + Type_Declaration = 91 + Anonymous_Type_Declaration = 92 + Subtype_Declaration = 93 + Nature_Declaration = 94 + Subnature_Declaration = 95 + Package_Header = 96 + Unit_Declaration = 97 + Library_Declaration = 98 + Component_Declaration = 99 + Attribute_Declaration = 100 + Group_Template_Declaration = 101 + Group_Declaration = 102 + Element_Declaration = 103 + Nature_Element_Declaration = 104 + Non_Object_Alias_Declaration = 105 + Psl_Declaration = 106 + Psl_Endpoint_Declaration = 107 + Enumeration_Literal = 108 + Function_Declaration = 109 + Procedure_Declaration = 110 + Function_Body = 111 + Procedure_Body = 112 + Function_Instantiation_Declaration = 113 + Procedure_Instantiation_Declaration = 114 + Terminal_Declaration = 115 + Object_Alias_Declaration = 116 + Free_Quantity_Declaration = 117 + Spectrum_Quantity_Declaration = 118 + Noise_Quantity_Declaration = 119 + Across_Quantity_Declaration = 120 + Through_Quantity_Declaration = 121 + File_Declaration = 122 + Guard_Signal_Declaration = 123 + Signal_Declaration = 124 + Variable_Declaration = 125 + Constant_Declaration = 126 + Iterator_Declaration = 127 + Interface_Constant_Declaration = 128 + Interface_Variable_Declaration = 129 + Interface_Signal_Declaration = 130 + Interface_File_Declaration = 131 + Interface_Quantity_Declaration = 132 + Interface_Terminal_Declaration = 133 + Interface_Type_Declaration = 134 + Interface_Package_Declaration = 135 + Interface_Function_Declaration = 136 + Interface_Procedure_Declaration = 137 + Anonymous_Signal_Declaration = 138 + Signal_Attribute_Declaration = 139 + Identity_Operator = 140 + Negation_Operator = 141 + Absolute_Operator = 142 + Not_Operator = 143 + Implicit_Condition_Operator = 144 + Condition_Operator = 145 + Reduction_And_Operator = 146 + Reduction_Or_Operator = 147 + Reduction_Nand_Operator = 148 + Reduction_Nor_Operator = 149 + Reduction_Xor_Operator = 150 + Reduction_Xnor_Operator = 151 + And_Operator = 152 + Or_Operator = 153 + Nand_Operator = 154 + Nor_Operator = 155 + Xor_Operator = 156 + Xnor_Operator = 157 + Equality_Operator = 158 + Inequality_Operator = 159 + Less_Than_Operator = 160 + Less_Than_Or_Equal_Operator = 161 + Greater_Than_Operator = 162 + Greater_Than_Or_Equal_Operator = 163 + Match_Equality_Operator = 164 + Match_Inequality_Operator = 165 + Match_Less_Than_Operator = 166 + Match_Less_Than_Or_Equal_Operator = 167 + Match_Greater_Than_Operator = 168 + Match_Greater_Than_Or_Equal_Operator = 169 + Sll_Operator = 170 + Sla_Operator = 171 + Srl_Operator = 172 + Sra_Operator = 173 + Rol_Operator = 174 + Ror_Operator = 175 + Addition_Operator = 176 + Substraction_Operator = 177 + Concatenation_Operator = 178 + Multiplication_Operator = 179 + Division_Operator = 180 + Modulus_Operator = 181 + Remainder_Operator = 182 + Exponentiation_Operator = 183 + Function_Call = 184 + Aggregate = 185 + Parenthesis_Expression = 186 + Qualified_Expression = 187 + Type_Conversion = 188 + Allocator_By_Expression = 189 + Allocator_By_Subtype = 190 + Selected_Element = 191 + Dereference = 192 + Implicit_Dereference = 193 + Slice_Name = 194 + Indexed_Name = 195 + Psl_Prev = 196 + Psl_Stable = 197 + Psl_Rose = 198 + Psl_Fell = 199 + Psl_Onehot = 200 + Psl_Onehot0 = 201 + Psl_Expression = 202 + Sensitized_Process_Statement = 203 + Process_Statement = 204 + Concurrent_Simple_Signal_Assignment = 205 + Concurrent_Conditional_Signal_Assignment = 206 + Concurrent_Selected_Signal_Assignment = 207 + Concurrent_Assertion_Statement = 208 + Concurrent_Procedure_Call_Statement = 209 + Concurrent_Break_Statement = 210 + Psl_Assert_Directive = 211 + Psl_Assume_Directive = 212 + Psl_Cover_Directive = 213 + Psl_Restrict_Directive = 214 + Block_Statement = 215 + If_Generate_Statement = 216 + Case_Generate_Statement = 217 + For_Generate_Statement = 218 + Component_Instantiation_Statement = 219 + Psl_Default_Clock = 220 + Generate_Statement_Body = 221 + If_Generate_Else_Clause = 222 + Simple_Simultaneous_Statement = 223 + Simultaneous_Null_Statement = 224 + Simultaneous_Procedural_Statement = 225 + Simultaneous_Case_Statement = 226 + Simultaneous_If_Statement = 227 + Simultaneous_Elsif = 228 + Simple_Signal_Assignment_Statement = 229 + Conditional_Signal_Assignment_Statement = 230 + Selected_Waveform_Assignment_Statement = 231 + Signal_Force_Assignment_Statement = 232 + Signal_Release_Assignment_Statement = 233 + Null_Statement = 234 + Assertion_Statement = 235 + Report_Statement = 236 + Wait_Statement = 237 + Variable_Assignment_Statement = 238 + Conditional_Variable_Assignment_Statement = 239 + Return_Statement = 240 + For_Loop_Statement = 241 + While_Loop_Statement = 242 + Next_Statement = 243 + Exit_Statement = 244 + Case_Statement = 245 + Procedure_Call_Statement = 246 + Break_Statement = 247 + If_Statement = 248 + Elsif = 249 + Character_Literal = 250 + Simple_Name = 251 + Selected_Name = 252 + Operator_Symbol = 253 + Reference_Name = 254 + External_Constant_Name = 255 + External_Signal_Name = 256 + External_Variable_Name = 257 + Selected_By_All_Name = 258 + Parenthesis_Name = 259 + Package_Pathname = 260 + Absolute_Pathname = 261 + Relative_Pathname = 262 + Pathname_Element = 263 + Base_Attribute = 264 + Subtype_Attribute = 265 + Element_Attribute = 266 + Across_Attribute = 267 + Through_Attribute = 268 + Nature_Reference_Attribute = 269 + Left_Type_Attribute = 270 + Right_Type_Attribute = 271 + High_Type_Attribute = 272 + Low_Type_Attribute = 273 + Ascending_Type_Attribute = 274 + Image_Attribute = 275 + Value_Attribute = 276 + Pos_Attribute = 277 + Val_Attribute = 278 + Succ_Attribute = 279 + Pred_Attribute = 280 + Leftof_Attribute = 281 + Rightof_Attribute = 282 + Signal_Slew_Attribute = 283 + Quantity_Slew_Attribute = 284 + Ramp_Attribute = 285 + Zoh_Attribute = 286 + Ltf_Attribute = 287 + Ztf_Attribute = 288 + Dot_Attribute = 289 + Integ_Attribute = 290 + Above_Attribute = 291 + Quantity_Delayed_Attribute = 292 + Delayed_Attribute = 293 + Stable_Attribute = 294 + Quiet_Attribute = 295 + Transaction_Attribute = 296 + Event_Attribute = 297 + Active_Attribute = 298 + Last_Event_Attribute = 299 + Last_Active_Attribute = 300 + Last_Value_Attribute = 301 + Driving_Attribute = 302 + Driving_Value_Attribute = 303 + Behavior_Attribute = 304 + Structure_Attribute = 305 + Simple_Name_Attribute = 306 + Instance_Name_Attribute = 307 + Path_Name_Attribute = 308 + Left_Array_Attribute = 309 + Right_Array_Attribute = 310 + High_Array_Attribute = 311 + Low_Array_Attribute = 312 + Length_Array_Attribute = 313 + Ascending_Array_Attribute = 314 + Range_Array_Attribute = 315 + Reverse_Range_Array_Attribute = 316 + Attribute_Name = 317 @export @@ -350,6 +351,11 @@ class Iir_Kinds: Iir_Kind.Architecture_Body, ] + Design_Unit = [ + Iir_Kind.Design_Unit, + Iir_Kind.Foreign_Module, + ] + Primary_Unit = [ Iir_Kind.Entity_Declaration, Iir_Kind.Configuration_Declaration, @@ -2883,3 +2889,6 @@ Set_Clock_Expression = libghdl.vhdl__nodes__set_clock_expression Get_Default_Clock = libghdl.vhdl__nodes__get_default_clock Set_Default_Clock = libghdl.vhdl__nodes__set_default_clock + +Get_Foreign_Node = libghdl.vhdl__nodes__get_foreign_node +Set_Foreign_Node = libghdl.vhdl__nodes__set_foreign_node diff --git a/pyGHDL/libghdl/vhdl/nodes_meta.py b/pyGHDL/libghdl/vhdl/nodes_meta.py index 255aac29b..97f2b31d3 100644 --- a/pyGHDL/libghdl/vhdl/nodes_meta.py +++ b/pyGHDL/libghdl/vhdl/nodes_meta.py @@ -440,6 +440,7 @@ class fields: Count_Expression = 367 Clock_Expression = 368 Default_Clock = 369 + Foreign_Node = 370 Get_Boolean = libghdl.vhdl__nodes_meta__get_boolean @@ -1308,3 +1309,5 @@ Has_Count_Expression = libghdl.vhdl__nodes_meta__has_count_expression Has_Clock_Expression = libghdl.vhdl__nodes_meta__has_clock_expression Has_Default_Clock = libghdl.vhdl__nodes_meta__has_default_clock + +Has_Foreign_Node = libghdl.vhdl__nodes_meta__has_foreign_node -- cgit v1.2.3