diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-08-01 08:00:18 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-08-01 08:00:18 +0200 |
commit | 024086cfb9c965abc579aa7fb5efc3e63d39c6b5 (patch) | |
tree | 04f913c5405fc3e3e358c688d2a41c5b2117b915 /python/libghdl/thin/vhdl | |
parent | a358d58e8592316fa1421445e73531e00247744f (diff) | |
download | ghdl-024086cfb9c965abc579aa7fb5efc3e63d39c6b5.tar.gz ghdl-024086cfb9c965abc579aa7fb5efc3e63d39c6b5.tar.bz2 ghdl-024086cfb9c965abc579aa7fb5efc3e63d39c6b5.zip |
vhdl: parse and analyze force/release signal assignment statements.
For #1416
Diffstat (limited to 'python/libghdl/thin/vhdl')
-rw-r--r-- | python/libghdl/thin/vhdl/nodes.py | 180 | ||||
-rw-r--r-- | python/libghdl/thin/vhdl/nodes_meta.py | 389 |
2 files changed, 296 insertions, 273 deletions
diff --git a/python/libghdl/thin/vhdl/nodes.py b/python/libghdl/thin/vhdl/nodes.py index f1eb1b721..32e07a6c5 100644 --- a/python/libghdl/thin/vhdl/nodes.py +++ b/python/libghdl/thin/vhdl/nodes.py @@ -239,90 +239,92 @@ class Iir_Kind: Simple_Signal_Assignment_Statement = 224 Conditional_Signal_Assignment_Statement = 225 Selected_Waveform_Assignment_Statement = 226 - Null_Statement = 227 - Assertion_Statement = 228 - Report_Statement = 229 - Wait_Statement = 230 - Variable_Assignment_Statement = 231 - Conditional_Variable_Assignment_Statement = 232 - Return_Statement = 233 - For_Loop_Statement = 234 - While_Loop_Statement = 235 - Next_Statement = 236 - Exit_Statement = 237 - Case_Statement = 238 - Procedure_Call_Statement = 239 - Break_Statement = 240 - If_Statement = 241 - Elsif = 242 - Character_Literal = 243 - Simple_Name = 244 - Selected_Name = 245 - Operator_Symbol = 246 - Reference_Name = 247 - External_Constant_Name = 248 - External_Signal_Name = 249 - External_Variable_Name = 250 - Selected_By_All_Name = 251 - Parenthesis_Name = 252 - Package_Pathname = 253 - Absolute_Pathname = 254 - Relative_Pathname = 255 - Pathname_Element = 256 - Base_Attribute = 257 - Subtype_Attribute = 258 - Element_Attribute = 259 - Across_Attribute = 260 - Through_Attribute = 261 - Nature_Reference_Attribute = 262 - Left_Type_Attribute = 263 - Right_Type_Attribute = 264 - High_Type_Attribute = 265 - Low_Type_Attribute = 266 - Ascending_Type_Attribute = 267 - Image_Attribute = 268 - Value_Attribute = 269 - Pos_Attribute = 270 - Val_Attribute = 271 - Succ_Attribute = 272 - Pred_Attribute = 273 - Leftof_Attribute = 274 - Rightof_Attribute = 275 - Signal_Slew_Attribute = 276 - Quantity_Slew_Attribute = 277 - Ramp_Attribute = 278 - Zoh_Attribute = 279 - Ltf_Attribute = 280 - Ztf_Attribute = 281 - Dot_Attribute = 282 - Integ_Attribute = 283 - Above_Attribute = 284 - Quantity_Delayed_Attribute = 285 - Delayed_Attribute = 286 - Stable_Attribute = 287 - Quiet_Attribute = 288 - Transaction_Attribute = 289 - Event_Attribute = 290 - Active_Attribute = 291 - Last_Event_Attribute = 292 - Last_Active_Attribute = 293 - Last_Value_Attribute = 294 - Driving_Attribute = 295 - Driving_Value_Attribute = 296 - Behavior_Attribute = 297 - Structure_Attribute = 298 - Simple_Name_Attribute = 299 - Instance_Name_Attribute = 300 - Path_Name_Attribute = 301 - Left_Array_Attribute = 302 - Right_Array_Attribute = 303 - High_Array_Attribute = 304 - Low_Array_Attribute = 305 - Length_Array_Attribute = 306 - Ascending_Array_Attribute = 307 - Range_Array_Attribute = 308 - Reverse_Range_Array_Attribute = 309 - Attribute_Name = 310 + Signal_Force_Assignment_Statement = 227 + Signal_Release_Assignment_Statement = 228 + Null_Statement = 229 + Assertion_Statement = 230 + Report_Statement = 231 + Wait_Statement = 232 + Variable_Assignment_Statement = 233 + Conditional_Variable_Assignment_Statement = 234 + Return_Statement = 235 + For_Loop_Statement = 236 + While_Loop_Statement = 237 + Next_Statement = 238 + Exit_Statement = 239 + Case_Statement = 240 + Procedure_Call_Statement = 241 + Break_Statement = 242 + If_Statement = 243 + Elsif = 244 + Character_Literal = 245 + Simple_Name = 246 + Selected_Name = 247 + Operator_Symbol = 248 + Reference_Name = 249 + External_Constant_Name = 250 + External_Signal_Name = 251 + External_Variable_Name = 252 + Selected_By_All_Name = 253 + Parenthesis_Name = 254 + Package_Pathname = 255 + Absolute_Pathname = 256 + Relative_Pathname = 257 + Pathname_Element = 258 + Base_Attribute = 259 + Subtype_Attribute = 260 + Element_Attribute = 261 + Across_Attribute = 262 + Through_Attribute = 263 + Nature_Reference_Attribute = 264 + Left_Type_Attribute = 265 + Right_Type_Attribute = 266 + High_Type_Attribute = 267 + Low_Type_Attribute = 268 + Ascending_Type_Attribute = 269 + Image_Attribute = 270 + Value_Attribute = 271 + Pos_Attribute = 272 + Val_Attribute = 273 + Succ_Attribute = 274 + Pred_Attribute = 275 + Leftof_Attribute = 276 + Rightof_Attribute = 277 + Signal_Slew_Attribute = 278 + Quantity_Slew_Attribute = 279 + Ramp_Attribute = 280 + Zoh_Attribute = 281 + Ltf_Attribute = 282 + Ztf_Attribute = 283 + Dot_Attribute = 284 + Integ_Attribute = 285 + Above_Attribute = 286 + Quantity_Delayed_Attribute = 287 + Delayed_Attribute = 288 + Stable_Attribute = 289 + Quiet_Attribute = 290 + Transaction_Attribute = 291 + Event_Attribute = 292 + Active_Attribute = 293 + Last_Event_Attribute = 294 + Last_Active_Attribute = 295 + Last_Value_Attribute = 296 + Driving_Attribute = 297 + Driving_Value_Attribute = 298 + Behavior_Attribute = 299 + Structure_Attribute = 300 + Simple_Name_Attribute = 301 + Instance_Name_Attribute = 302 + Path_Name_Attribute = 303 + Left_Array_Attribute = 304 + Right_Array_Attribute = 305 + High_Array_Attribute = 306 + Low_Array_Attribute = 307 + Length_Array_Attribute = 308 + Ascending_Array_Attribute = 309 + Range_Array_Attribute = 310 + Reverse_Range_Array_Attribute = 311 + Attribute_Name = 312 class Iir_Kinds: @@ -682,6 +684,8 @@ class Iir_Kinds: Iir_Kind.Simple_Signal_Assignment_Statement, Iir_Kind.Conditional_Signal_Assignment_Statement, Iir_Kind.Selected_Waveform_Assignment_Statement, + Iir_Kind.Signal_Force_Assignment_Statement, + Iir_Kind.Signal_Release_Assignment_Statement, Iir_Kind.Null_Statement, Iir_Kind.Assertion_Statement, Iir_Kind.Report_Statement, @@ -2365,6 +2369,14 @@ Get_Reject_Time_Expression = libghdl.vhdl__nodes__get_reject_time_expression Set_Reject_Time_Expression = libghdl.vhdl__nodes__set_reject_time_expression +Get_Force_Mode = libghdl.vhdl__nodes__get_force_mode + +Set_Force_Mode = libghdl.vhdl__nodes__set_force_mode + +Get_Has_Force_Mode = libghdl.vhdl__nodes__get_has_force_mode + +Set_Has_Force_Mode = libghdl.vhdl__nodes__set_has_force_mode + Get_Sensitivity_List = libghdl.vhdl__nodes__get_sensitivity_list Set_Sensitivity_List = libghdl.vhdl__nodes__set_sensitivity_list diff --git a/python/libghdl/thin/vhdl/nodes_meta.py b/python/libghdl/thin/vhdl/nodes_meta.py index 352f30ca7..68b9e51a0 100644 --- a/python/libghdl/thin/vhdl/nodes_meta.py +++ b/python/libghdl/thin/vhdl/nodes_meta.py @@ -26,27 +26,28 @@ class types: Iir_Constraint = 8 Iir_Delay_Mechanism = 9 Iir_Flist = 10 - Iir_Index32 = 11 - Iir_Int32 = 12 - Iir_List = 13 - Iir_Mode = 14 - Iir_Predefined_Functions = 15 - Iir_Pure_State = 16 - Iir_Signal_Kind = 17 - Iir_Staticness = 18 - Int32 = 19 - Int64 = 20 - Name_Id = 21 - Number_Base_Type = 22 - PSL_NFA = 23 - PSL_Node = 24 - Scalar_Size = 25 - Source_File_Entry = 26 - Source_Ptr = 27 - String8_Id = 28 - Time_Stamp_Id = 29 - Token_Type = 30 - Tri_State_Type = 31 + Iir_Force_Mode = 11 + Iir_Index32 = 12 + Iir_Int32 = 13 + Iir_List = 14 + Iir_Mode = 15 + Iir_Predefined_Functions = 16 + Iir_Pure_State = 17 + Iir_Signal_Kind = 18 + Iir_Staticness = 19 + Int32 = 20 + Int64 = 21 + Name_Id = 22 + Number_Base_Type = 23 + PSL_NFA = 24 + PSL_Node = 25 + Scalar_Size = 26 + Source_File_Entry = 27 + Source_Ptr = 28 + String8_Id = 29 + Time_Stamp_Id = 30 + Token_Type = 31 + Tri_State_Type = 32 class Attr: @@ -258,174 +259,176 @@ class fields: Guard = 193 Delay_Mechanism = 194 Reject_Time_Expression = 195 - Sensitivity_List = 196 - Process_Origin = 197 - Package_Origin = 198 - Condition_Clause = 199 - Break_Element = 200 - Selector_Quantity = 201 - Break_Quantity = 202 - Timeout_Clause = 203 - Postponed_Flag = 204 - Callees_List = 205 - Passive_Flag = 206 - Resolution_Function_Flag = 207 - Wait_State = 208 - All_Sensitized_State = 209 - Seen_Flag = 210 - Pure_Flag = 211 - Foreign_Flag = 212 - Resolved_Flag = 213 - Signal_Type_Flag = 214 - Has_Signal_Flag = 215 - Purity_State = 216 - Elab_Flag = 217 - Vendor_Library_Flag = 218 - Configuration_Mark_Flag = 219 - Configuration_Done_Flag = 220 - Index_Constraint_Flag = 221 - Hide_Implicit_Flag = 222 - Assertion_Condition = 223 - Report_Expression = 224 - Severity_Expression = 225 - Instantiated_Unit = 226 - Generic_Map_Aspect_Chain = 227 - Port_Map_Aspect_Chain = 228 - Configuration_Name = 229 - Component_Configuration = 230 - Configuration_Specification = 231 - Default_Binding_Indication = 232 - Default_Configuration_Declaration = 233 - Expression = 234 - Conditional_Expression_Chain = 235 - Allocator_Designated_Type = 236 - Selected_Waveform_Chain = 237 - Conditional_Waveform_Chain = 238 - Guard_Expression = 239 - Guard_Decl = 240 - Guard_Sensitivity_List = 241 - Signal_Attribute_Chain = 242 - Block_Block_Configuration = 243 - Package_Header = 244 - Block_Header = 245 - Uninstantiated_Package_Name = 246 - Uninstantiated_Package_Decl = 247 - Instance_Source_File = 248 - Generate_Block_Configuration = 249 - Generate_Statement_Body = 250 - Alternative_Label = 251 - Generate_Else_Clause = 252 - Condition = 253 - Else_Clause = 254 - Parameter_Specification = 255 - Parent = 256 - Loop_Label = 257 - Exit_Flag = 258 - Next_Flag = 259 - Component_Name = 260 - Instantiation_List = 261 - Entity_Aspect = 262 - Default_Entity_Aspect = 263 - Binding_Indication = 264 - Named_Entity = 265 - Alias_Declaration = 266 - Referenced_Name = 267 - Expr_Staticness = 268 - Scalar_Size = 269 - Error_Origin = 270 - Operand = 271 - Left = 272 - Right = 273 - Unit_Name = 274 - Name = 275 - Group_Template_Name = 276 - Name_Staticness = 277 - Prefix = 278 - Signature_Prefix = 279 - External_Pathname = 280 - Pathname_Suffix = 281 - Pathname_Expression = 282 - In_Formal_Flag = 283 - Slice_Subtype = 284 - Suffix = 285 - Index_Subtype = 286 - Parameter = 287 - Parameter_2 = 288 - Parameter_3 = 289 - Parameter_4 = 290 - Attr_Chain = 291 - Signal_Attribute_Declaration = 292 - Actual_Type = 293 - Actual_Type_Definition = 294 - Association_Chain = 295 - Individual_Association_Chain = 296 - Subprogram_Association_Chain = 297 - Aggregate_Info = 298 - Sub_Aggregate_Info = 299 - Aggr_Dynamic_Flag = 300 - Aggr_Min_Length = 301 - Aggr_Low_Limit = 302 - Aggr_High_Limit = 303 - Aggr_Others_Flag = 304 - Aggr_Named_Flag = 305 - Aggregate_Expand_Flag = 306 - Association_Choices_Chain = 307 - Case_Statement_Alternative_Chain = 308 - Choice_Staticness = 309 - Procedure_Call = 310 - Implementation = 311 - Parameter_Association_Chain = 312 - Method_Object = 313 - Subtype_Type_Mark = 314 - Subnature_Nature_Mark = 315 - Type_Conversion_Subtype = 316 - Type_Mark = 317 - File_Type_Mark = 318 - Return_Type_Mark = 319 - Has_Disconnect_Flag = 320 - Has_Active_Flag = 321 - Is_Within_Flag = 322 - Type_Marks_List = 323 - Implicit_Alias_Flag = 324 - Alias_Signature = 325 - Attribute_Signature = 326 - Overload_List = 327 - Simple_Name_Identifier = 328 - Simple_Name_Subtype = 329 - Protected_Type_Body = 330 - Protected_Type_Declaration = 331 - Use_Flag = 332 - End_Has_Reserved_Id = 333 - End_Has_Identifier = 334 - End_Has_Postponed = 335 - Has_Label = 336 - Has_Begin = 337 - Has_End = 338 - Has_Is = 339 - Has_Pure = 340 - Has_Body = 341 - Has_Parameter = 342 - Has_Component = 343 - Has_Identifier_List = 344 - Has_Mode = 345 - Has_Class = 346 - Has_Delay_Mechanism = 347 - Suspend_Flag = 348 - Is_Ref = 349 - Is_Forward_Ref = 350 - Psl_Property = 351 - Psl_Sequence = 352 - Psl_Declaration = 353 - Psl_Expression = 354 - Psl_Boolean = 355 - PSL_Clock = 356 - PSL_NFA = 357 - PSL_Nbr_States = 358 - PSL_Clock_Sensitivity = 359 - PSL_EOS_Flag = 360 - Count_Expression = 361 - Clock_Expression = 362 - Default_Clock = 363 + Force_Mode = 196 + Has_Force_Mode = 197 + Sensitivity_List = 198 + Process_Origin = 199 + Package_Origin = 200 + Condition_Clause = 201 + Break_Element = 202 + Selector_Quantity = 203 + Break_Quantity = 204 + Timeout_Clause = 205 + Postponed_Flag = 206 + Callees_List = 207 + Passive_Flag = 208 + Resolution_Function_Flag = 209 + Wait_State = 210 + All_Sensitized_State = 211 + Seen_Flag = 212 + Pure_Flag = 213 + Foreign_Flag = 214 + Resolved_Flag = 215 + Signal_Type_Flag = 216 + Has_Signal_Flag = 217 + Purity_State = 218 + Elab_Flag = 219 + Vendor_Library_Flag = 220 + Configuration_Mark_Flag = 221 + Configuration_Done_Flag = 222 + Index_Constraint_Flag = 223 + Hide_Implicit_Flag = 224 + Assertion_Condition = 225 + Report_Expression = 226 + Severity_Expression = 227 + Instantiated_Unit = 228 + Generic_Map_Aspect_Chain = 229 + Port_Map_Aspect_Chain = 230 + Configuration_Name = 231 + Component_Configuration = 232 + Configuration_Specification = 233 + Default_Binding_Indication = 234 + Default_Configuration_Declaration = 235 + Expression = 236 + Conditional_Expression_Chain = 237 + Allocator_Designated_Type = 238 + Selected_Waveform_Chain = 239 + Conditional_Waveform_Chain = 240 + Guard_Expression = 241 + Guard_Decl = 242 + Guard_Sensitivity_List = 243 + Signal_Attribute_Chain = 244 + Block_Block_Configuration = 245 + Package_Header = 246 + Block_Header = 247 + Uninstantiated_Package_Name = 248 + Uninstantiated_Package_Decl = 249 + Instance_Source_File = 250 + Generate_Block_Configuration = 251 + Generate_Statement_Body = 252 + Alternative_Label = 253 + Generate_Else_Clause = 254 + Condition = 255 + Else_Clause = 256 + Parameter_Specification = 257 + Parent = 258 + Loop_Label = 259 + Exit_Flag = 260 + Next_Flag = 261 + Component_Name = 262 + Instantiation_List = 263 + Entity_Aspect = 264 + Default_Entity_Aspect = 265 + Binding_Indication = 266 + Named_Entity = 267 + Alias_Declaration = 268 + Referenced_Name = 269 + Expr_Staticness = 270 + Scalar_Size = 271 + Error_Origin = 272 + Operand = 273 + Left = 274 + Right = 275 + Unit_Name = 276 + Name = 277 + Group_Template_Name = 278 + Name_Staticness = 279 + Prefix = 280 + Signature_Prefix = 281 + External_Pathname = 282 + Pathname_Suffix = 283 + Pathname_Expression = 284 + In_Formal_Flag = 285 + Slice_Subtype = 286 + Suffix = 287 + Index_Subtype = 288 + Parameter = 289 + Parameter_2 = 290 + Parameter_3 = 291 + Parameter_4 = 292 + Attr_Chain = 293 + Signal_Attribute_Declaration = 294 + Actual_Type = 295 + Actual_Type_Definition = 296 + Association_Chain = 297 + Individual_Association_Chain = 298 + Subprogram_Association_Chain = 299 + Aggregate_Info = 300 + Sub_Aggregate_Info = 301 + Aggr_Dynamic_Flag = 302 + Aggr_Min_Length = 303 + Aggr_Low_Limit = 304 + Aggr_High_Limit = 305 + Aggr_Others_Flag = 306 + Aggr_Named_Flag = 307 + Aggregate_Expand_Flag = 308 + Association_Choices_Chain = 309 + Case_Statement_Alternative_Chain = 310 + Choice_Staticness = 311 + Procedure_Call = 312 + Implementation = 313 + Parameter_Association_Chain = 314 + Method_Object = 315 + Subtype_Type_Mark = 316 + Subnature_Nature_Mark = 317 + Type_Conversion_Subtype = 318 + Type_Mark = 319 + File_Type_Mark = 320 + Return_Type_Mark = 321 + Has_Disconnect_Flag = 322 + Has_Active_Flag = 323 + Is_Within_Flag = 324 + Type_Marks_List = 325 + Implicit_Alias_Flag = 326 + Alias_Signature = 327 + Attribute_Signature = 328 + Overload_List = 329 + Simple_Name_Identifier = 330 + Simple_Name_Subtype = 331 + Protected_Type_Body = 332 + Protected_Type_Declaration = 333 + Use_Flag = 334 + End_Has_Reserved_Id = 335 + End_Has_Identifier = 336 + End_Has_Postponed = 337 + Has_Label = 338 + Has_Begin = 339 + Has_End = 340 + Has_Is = 341 + Has_Pure = 342 + Has_Body = 343 + Has_Parameter = 344 + Has_Component = 345 + Has_Identifier_List = 346 + Has_Mode = 347 + Has_Class = 348 + Has_Delay_Mechanism = 349 + Suspend_Flag = 350 + Is_Ref = 351 + Is_Forward_Ref = 352 + Psl_Property = 353 + Psl_Sequence = 354 + Psl_Declaration = 355 + Psl_Expression = 356 + Psl_Boolean = 357 + PSL_Clock = 358 + PSL_NFA = 359 + PSL_Nbr_States = 360 + PSL_Clock_Sensitivity = 361 + PSL_EOS_Flag = 362 + Count_Expression = 363 + Clock_Expression = 364 + Default_Clock = 365 Get_Boolean = libghdl.vhdl__nodes_meta__get_boolean @@ -450,6 +453,8 @@ Get_Iir_Delay_Mechanism = libghdl.vhdl__nodes_meta__get_iir_delay_mechanism Get_Iir_Flist = libghdl.vhdl__nodes_meta__get_iir_flist +Get_Iir_Force_Mode = libghdl.vhdl__nodes_meta__get_iir_force_mode + Get_Iir_Index32 = libghdl.vhdl__nodes_meta__get_iir_index32 Get_Iir_Int32 = libghdl.vhdl__nodes_meta__get_iir_int32 @@ -1081,6 +1086,12 @@ Has_Delay_Mechanism =\ Has_Reject_Time_Expression =\ libghdl.vhdl__nodes_meta__has_reject_time_expression +Has_Force_Mode =\ + libghdl.vhdl__nodes_meta__has_force_mode + +Has_Has_Force_Mode =\ + libghdl.vhdl__nodes_meta__has_has_force_mode + Has_Sensitivity_List =\ libghdl.vhdl__nodes_meta__has_sensitivity_list |