diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-07-21 06:45:24 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-07-21 06:45:24 +0200 |
commit | 341a8698ccb6b795d46b9570bac06e240c7664de (patch) | |
tree | f818881d50e3da9fe055cbf3a6ce4c2472e16aaf /src | |
parent | f440e1b0289a1f969b9190a11831e384b911db0e (diff) | |
download | ghdl-341a8698ccb6b795d46b9570bac06e240c7664de.tar.gz ghdl-341a8698ccb6b795d46b9570bac06e240c7664de.tar.bz2 ghdl-341a8698ccb6b795d46b9570bac06e240c7664de.zip |
vhdl-nodes: renaming.
Node Iir_Kind_Signal_Attribute_Declaration is now
Iir_Kind_Attribute_Implicit_Declaration
Will also handle quantities.
Diffstat (limited to 'src')
-rw-r--r-- | src/synth/elab-vhdl_decls.adb | 6 | ||||
-rw-r--r-- | src/synth/synth-vhdl_decls.adb | 4 | ||||
-rw-r--r-- | src/vhdl/translate/trans-chap4.adb | 8 | ||||
-rw-r--r-- | src/vhdl/translate/trans-rtis.adb | 6 | ||||
-rw-r--r-- | src/vhdl/vhdl-annotations.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-canon.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-elocations.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-elocations.ads | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-errors.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.adb | 34 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 26 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 73 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.ads | 9 | ||||
-rw-r--r-- | src/vhdl/vhdl-prints.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_decls.adb | 40 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_decls.ads | 22 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_names.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_scopes.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_stmts.adb | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-utils.adb | 2 |
21 files changed, 130 insertions, 128 deletions
diff --git a/src/synth/elab-vhdl_decls.adb b/src/synth/elab-vhdl_decls.adb index 12b3675bd..ffa0ee0a7 100644 --- a/src/synth/elab-vhdl_decls.adb +++ b/src/synth/elab-vhdl_decls.adb @@ -302,11 +302,11 @@ package body Elab.Vhdl_Decls is null; when Iir_Kind_Configuration_Specification => null; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => declare El : Node; begin - El := Get_Signal_Attribute_Chain (Decl); + El := Get_Attribute_Implicit_Chain (Decl); while El /= Null_Node loop Elab_Declaration (Syn_Inst, El, Force_Init, Last_Type); El := Get_Attr_Chain (El); @@ -393,7 +393,7 @@ package body Elab.Vhdl_Decls is when Iir_Kind_Psl_Default_Clock => -- Ignored; directly used by PSL directives. null; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => -- Not supported by synthesis. null; when others => diff --git a/src/synth/synth-vhdl_decls.adb b/src/synth/synth-vhdl_decls.adb index 56d7ab9e0..dfbedff91 100644 --- a/src/synth/synth-vhdl_decls.adb +++ b/src/synth/synth-vhdl_decls.adb @@ -625,7 +625,7 @@ package body Synth.Vhdl_Decls is null; when Iir_Kind_Configuration_Specification => null; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => -- Not supported by synthesis. null; when others => @@ -765,7 +765,7 @@ package body Synth.Vhdl_Decls is when Iir_Kind_Psl_Default_Clock => -- Ignored; directly used by PSL directives. null; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => -- Not supported by synthesis. null; when Iir_Kind_Package_Instantiation_Declaration => diff --git a/src/vhdl/translate/trans-chap4.adb b/src/vhdl/translate/trans-chap4.adb index f1db4d40b..ab94b68fc 100644 --- a/src/vhdl/translate/trans-chap4.adb +++ b/src/vhdl/translate/trans-chap4.adb @@ -1933,11 +1933,11 @@ package body Trans.Chap4 is when Iir_Kind_Attribute_Specification => Chap5.Translate_Attribute_Specification (Decl); - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => declare Sig : Iir; begin - Sig := Get_Signal_Attribute_Chain (Decl); + Sig := Get_Attribute_Implicit_Chain (Decl); while Is_Valid (Sig) loop Chap4.Create_Implicit_Signal (Sig); Sig := Get_Attr_Chain (Sig); @@ -2709,11 +2709,11 @@ package body Trans.Chap4 is | Iir_Kind_Procedure_Body => null; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => declare Sig : Iir; begin - Sig := Get_Signal_Attribute_Chain (Decl); + Sig := Get_Attribute_Implicit_Chain (Decl); while Is_Valid (Sig) loop case Iir_Kinds_Signal_Attribute (Get_Kind (Sig)) is when Iir_Kind_Stable_Attribute diff --git a/src/vhdl/translate/trans-rtis.adb b/src/vhdl/translate/trans-rtis.adb index eeddad578..80871cfd8 100644 --- a/src/vhdl/translate/trans-rtis.adb +++ b/src/vhdl/translate/trans-rtis.adb @@ -2195,7 +2195,7 @@ package body Trans.Rtis is | Iir_Kind_Interface_Constant_Declaration | Iir_Kind_Variable_Declaration | Iir_Kind_File_Declaration - | Iir_Kind_Signal_Attribute_Declaration => + | Iir_Kind_Attribute_Implicit_Declaration => null; when Iir_Kind_Object_Alias_Declaration | Iir_Kind_Attribute_Declaration => @@ -2332,12 +2332,12 @@ package body Trans.Rtis is Generate_Object (Decl, Info.Signal_Rti); Add_Rti_Node (Info.Signal_Rti); end; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => declare Sig : Iir; Info : Signal_Info_Acc; begin - Sig := Get_Signal_Attribute_Chain (Decl); + Sig := Get_Attribute_Implicit_Chain (Decl); while Is_Valid (Sig) loop case Iir_Kinds_Signal_Attribute (Get_Kind (Sig)) is when Iir_Kind_Stable_Attribute diff --git a/src/vhdl/vhdl-annotations.adb b/src/vhdl/vhdl-annotations.adb index c36fec8ee..7a2487278 100644 --- a/src/vhdl/vhdl-annotations.adb +++ b/src/vhdl/vhdl-annotations.adb @@ -726,11 +726,11 @@ package body Vhdl.Annotations is when Iir_Kind_Package_Body => Annotate_Package_Body (Decl); - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => declare Attr : Iir; begin - Attr := Get_Signal_Attribute_Chain (Decl); + Attr := Get_Attribute_Implicit_Chain (Decl); while Is_Valid (Attr) loop Create_Signal_Info (Block_Info, Attr); Attr := Get_Attr_Chain (Attr); diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index 151be16ef..0f2b2a494 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -3270,7 +3270,7 @@ package body Vhdl.Canon is when Iir_Kind_Package_Instantiation_Declaration => return Canon_Package_Instantiation_Declaration (Decl); - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => null; when Iir_Kind_Nature_Declaration diff --git a/src/vhdl/vhdl-elocations.adb b/src/vhdl/vhdl-elocations.adb index 11f4a87d2..b5950bdd7 100644 --- a/src/vhdl/vhdl-elocations.adb +++ b/src/vhdl/vhdl-elocations.adb @@ -296,7 +296,7 @@ package body Vhdl.Elocations is | Iir_Kind_Guard_Signal_Declaration | Iir_Kind_Interface_Function_Declaration | Iir_Kind_Interface_Procedure_Declaration - | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Attribute_Implicit_Declaration | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Identity_Operator | Iir_Kind_Negation_Operator diff --git a/src/vhdl/vhdl-elocations.ads b/src/vhdl/vhdl-elocations.ads index 810507a9f..2f7d430e5 100644 --- a/src/vhdl/vhdl-elocations.ads +++ b/src/vhdl/vhdl-elocations.ads @@ -279,7 +279,7 @@ package Vhdl.Elocations is -- Iir_Kind_Guard_Signal_Declaration (None) - -- Iir_Kind_Signal_Attribute_Declaration (None) + -- Iir_Kind_Attribute_Implicit_Declaration (None) -- Iir_Kind_Suspend_State_Declaration (None) -- Iir_Kind_Constant_Declaration (L1) diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb index 78ac59779..c2bb046bd 100644 --- a/src/vhdl/vhdl-errors.adb +++ b/src/vhdl/vhdl-errors.adb @@ -485,9 +485,9 @@ package body Vhdl.Errors is return Disp_Identifier (Node, "non-object alias"); when Iir_Kind_Guard_Signal_Declaration => return "GUARD signal"; - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => -- Should not appear. - return "signal attribute"; + return "implicit declaration"; when Iir_Kind_Suspend_State_Declaration => -- Should not appear. return "suspend state variable"; diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb index 0671e3f35..da0629d1a 100644 --- a/src/vhdl/vhdl-nodes.adb +++ b/src/vhdl/vhdl-nodes.adb @@ -1082,7 +1082,7 @@ package body Vhdl.Nodes is | Iir_Kind_Interface_Quantity_Declaration | Iir_Kind_Interface_Terminal_Declaration | Iir_Kind_Interface_Type_Declaration - | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Attribute_Implicit_Declaration | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Identity_Operator | Iir_Kind_Negation_Operator @@ -5397,21 +5397,21 @@ package body Vhdl.Nodes is Set_Field4 (Guard, Iir_List_To_Iir (List)); end Set_Guard_Sensitivity_List; - function Get_Signal_Attribute_Chain (Decl : Iir) return Iir is + function Get_Attribute_Implicit_Chain (Decl : Iir) return Iir is begin pragma Assert (Decl /= Null_Iir); - pragma Assert (Has_Signal_Attribute_Chain (Get_Kind (Decl)), - "no field Signal_Attribute_Chain"); + pragma Assert (Has_Attribute_Implicit_Chain (Get_Kind (Decl)), + "no field Attribute_Implicit_Chain"); return Get_Field3 (Decl); - end Get_Signal_Attribute_Chain; + end Get_Attribute_Implicit_Chain; - procedure Set_Signal_Attribute_Chain (Decl : Iir; Chain : Iir) is + procedure Set_Attribute_Implicit_Chain (Decl : Iir; Chain : Iir) is begin pragma Assert (Decl /= Null_Iir); - pragma Assert (Has_Signal_Attribute_Chain (Get_Kind (Decl)), - "no field Signal_Attribute_Chain"); + pragma Assert (Has_Attribute_Implicit_Chain (Get_Kind (Decl)), + "no field Attribute_Implicit_Chain"); Set_Field3 (Decl, Chain); - end Set_Signal_Attribute_Chain; + end Set_Attribute_Implicit_Chain; function Get_Block_Block_Configuration (Block : Iir) return Iir is begin @@ -6218,21 +6218,21 @@ package body Vhdl.Nodes is Set_Field2 (Attr, Chain); end Set_Attr_Chain; - function Get_Signal_Attribute_Declaration (Attr : Iir) return Iir is + function Get_Attribute_Implicit_Declaration (Attr : Iir) return Iir is begin pragma Assert (Attr /= Null_Iir); - pragma Assert (Has_Signal_Attribute_Declaration (Get_Kind (Attr)), - "no field Signal_Attribute_Declaration"); + pragma Assert (Has_Attribute_Implicit_Declaration (Get_Kind (Attr)), + "no field Attribute_Implicit_Declaration"); return Get_Field3 (Attr); - end Get_Signal_Attribute_Declaration; + end Get_Attribute_Implicit_Declaration; - procedure Set_Signal_Attribute_Declaration (Attr : Iir; Decl : Iir) is + procedure Set_Attribute_Implicit_Declaration (Attr : Iir; Decl : Iir) is begin pragma Assert (Attr /= Null_Iir); - pragma Assert (Has_Signal_Attribute_Declaration (Get_Kind (Attr)), - "no field Signal_Attribute_Declaration"); + pragma Assert (Has_Attribute_Implicit_Declaration (Get_Kind (Attr)), + "no field Attribute_Implicit_Declaration"); Set_Field3 (Attr, Decl); - end Set_Signal_Attribute_Declaration; + end Set_Attribute_Implicit_Declaration; function Get_Actual_Type (Target : Iir) return Iir is begin diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 9dee8320a..6c96fd176 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -1869,18 +1869,18 @@ package Vhdl.Nodes is -- -- Get/Set_Is_Ref (Flag12) - -- Iir_Kind_Signal_Attribute_Declaration (Short) + -- Iir_Kind_Attribute_Implicit_Declaration (Short) -- - -- Chain of implicit signals created from signal attribute. This is just - -- an helper so that translation can create these implicit signals at the - -- same time as user signal declarations. + -- Chain of implicit signals or quantiies created from attributes. This + -- is just an helper so that translation can create these implicit + -- signals or quantities at the same time as other declarations. -- -- Get/Set_Parent (Field0) -- -- Get/Set_Chain (Field2) -- -- Chain of signals - -- Get/Set_Signal_Attribute_Chain (Field3) + -- Get/Set_Attribute_Implicit_Chain (Field3) -- Iir_Kind_Suspend_State_Declaration (Short) -- @@ -4644,7 +4644,7 @@ package Vhdl.Nodes is -- Get/Set_Attr_Chain (Field2) -- -- Head of the chain. Used only to ease the reconstruction of the chain. - -- Get/Set_Signal_Attribute_Declaration (Field3) + -- Get/Set_Attribute_Implicit_Declaration (Field3) -- -- Only for Iir_Kind_Above_Attribute: -- Only for Iir_Kind_Quantity_Delayed_Attribute: @@ -4752,12 +4752,12 @@ package Vhdl.Nodes is -- Get/Set_Type (Field1) -- -- Next attribute signal in the chain owned by the - -- signal_attribute_declaration. Usual Get/Set_Chain is not used here as + -- attribute_implicit_declaration. Usual Get/Set_Chain is not used here as -- the chain is composed only of forward references. -- Get/Set_Attr_Chain (Field2) -- -- Head of the chain. Used only to ease the reconstruction of the chain. - -- Get/Set_Signal_Attribute_Declaration (Field3) + -- Get/Set_Attribute_Implicit_Declaration (Field3) -- -- Get/Set_Base_Name (Field5) -- @@ -5034,7 +5034,7 @@ package Vhdl.Nodes is Iir_Kind_Interface_Function_Declaration, -- interface Iir_Kind_Interface_Procedure_Declaration, -- interface - Iir_Kind_Signal_Attribute_Declaration, + Iir_Kind_Attribute_Implicit_Declaration, Iir_Kind_Suspend_State_Declaration, -- Expressions. @@ -8910,8 +8910,8 @@ package Vhdl.Nodes is procedure Set_Guard_Sensitivity_List (Guard : Iir; List : Iir_List); -- Field: Field3 Forward_Ref - function Get_Signal_Attribute_Chain (Decl : Iir) return Iir; - procedure Set_Signal_Attribute_Chain (Decl : Iir; Chain : Iir); + function Get_Attribute_Implicit_Chain (Decl : Iir) return Iir; + procedure Set_Attribute_Implicit_Chain (Decl : Iir; Chain : Iir); -- Block_Configuration that applies to this block statement. -- Field: Field6 Forward_Ref @@ -9148,8 +9148,8 @@ package Vhdl.Nodes is procedure Set_Attr_Chain (Attr : Iir; Chain : Iir); -- Field: Field3 Forward_Ref - function Get_Signal_Attribute_Declaration (Attr : Iir) return Iir; - procedure Set_Signal_Attribute_Declaration (Attr : Iir; Decl : Iir); + function Get_Attribute_Implicit_Declaration (Attr : Iir) return Iir; + procedure Set_Attribute_Implicit_Declaration (Attr : Iir; Decl : Iir); -- Type of the actual for an association by individual. -- Unless the formal is an unconstrained array type, this is the same as diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index 789bdbacb..cd6f666d8 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -266,7 +266,7 @@ package body Vhdl.Nodes_Meta is Field_Guard_Expression => Type_Iir, Field_Guard_Decl => Type_Iir, Field_Guard_Sensitivity_List => Type_Iir_List, - Field_Signal_Attribute_Chain => Type_Iir, + Field_Attribute_Implicit_Chain => Type_Iir, Field_Block_Block_Configuration => Type_Iir, Field_Package_Header => Type_Iir, Field_Block_Header => Type_Iir, @@ -316,7 +316,7 @@ package body Vhdl.Nodes_Meta is Field_Parameter_3 => Type_Iir, Field_Parameter_4 => Type_Iir, Field_Attr_Chain => Type_Iir, - Field_Signal_Attribute_Declaration => Type_Iir, + Field_Attribute_Implicit_Declaration => Type_Iir, Field_Actual_Type => Type_Iir, Field_Actual_Type_Definition => Type_Iir, Field_Association_Chain => Type_Iir, @@ -901,8 +901,8 @@ package body Vhdl.Nodes_Meta is return "guard_decl"; when Field_Guard_Sensitivity_List => return "guard_sensitivity_list"; - when Field_Signal_Attribute_Chain => - return "signal_attribute_chain"; + when Field_Attribute_Implicit_Chain => + return "attribute_implicit_chain"; when Field_Block_Block_Configuration => return "block_block_configuration"; when Field_Package_Header => @@ -1001,8 +1001,8 @@ package body Vhdl.Nodes_Meta is return "parameter_4"; when Field_Attr_Chain => return "attr_chain"; - when Field_Signal_Attribute_Declaration => - return "signal_attribute_declaration"; + when Field_Attribute_Implicit_Declaration => + return "attribute_implicit_declaration"; when Field_Actual_Type => return "actual_type"; when Field_Actual_Type_Definition => @@ -1443,8 +1443,8 @@ package body Vhdl.Nodes_Meta is return "interface_function_declaration"; when Iir_Kind_Interface_Procedure_Declaration => return "interface_procedure_declaration"; - when Iir_Kind_Signal_Attribute_Declaration => - return "signal_attribute_declaration"; + when Iir_Kind_Attribute_Implicit_Declaration => + return "attribute_implicit_declaration"; when Iir_Kind_Suspend_State_Declaration => return "suspend_state_declaration"; when Iir_Kind_Identity_Operator => @@ -2309,7 +2309,7 @@ package body Vhdl.Nodes_Meta is return Attr_None; when Field_Guard_Sensitivity_List => return Attr_Of_Ref; - when Field_Signal_Attribute_Chain => + when Field_Attribute_Implicit_Chain => return Attr_Forward_Ref; when Field_Block_Block_Configuration => return Attr_Forward_Ref; @@ -2409,7 +2409,7 @@ package body Vhdl.Nodes_Meta is return Attr_None; when Field_Attr_Chain => return Attr_Forward_Ref; - when Field_Signal_Attribute_Declaration => + when Field_Attribute_Implicit_Declaration => return Attr_Forward_Ref; when Field_Actual_Type => return Attr_Ref; @@ -3939,10 +3939,10 @@ package body Vhdl.Nodes_Meta is Field_Chain, Field_Interface_Declaration_Chain, Field_Return_Type_Mark, - -- Iir_Kind_Signal_Attribute_Declaration + -- Iir_Kind_Attribute_Implicit_Declaration Field_Parent, Field_Chain, - Field_Signal_Attribute_Chain, + Field_Attribute_Implicit_Chain, -- Iir_Kind_Suspend_State_Declaration Field_Parent, Field_Chain, @@ -5089,7 +5089,7 @@ package body Vhdl.Nodes_Meta is Field_Prefix, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Base_Name, -- Iir_Kind_Integ_Attribute Field_Expr_Staticness, @@ -5097,7 +5097,7 @@ package body Vhdl.Nodes_Meta is Field_Prefix, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Base_Name, -- Iir_Kind_Quantity_Delayed_Attribute Field_Expr_Staticness, @@ -5105,7 +5105,7 @@ package body Vhdl.Nodes_Meta is Field_Prefix, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Parameter, Field_Base_Name, -- Iir_Kind_Above_Attribute @@ -5114,7 +5114,7 @@ package body Vhdl.Nodes_Meta is Field_Prefix, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Parameter, Field_Base_Name, -- Iir_Kind_Delayed_Attribute @@ -5125,7 +5125,7 @@ package body Vhdl.Nodes_Meta is Field_Parameter, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Base_Name, -- Iir_Kind_Stable_Attribute Field_Has_Active_Flag, @@ -5135,7 +5135,7 @@ package body Vhdl.Nodes_Meta is Field_Parameter, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Base_Name, -- Iir_Kind_Quiet_Attribute Field_Has_Active_Flag, @@ -5145,7 +5145,7 @@ package body Vhdl.Nodes_Meta is Field_Parameter, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Base_Name, -- Iir_Kind_Transaction_Attribute Field_Has_Active_Flag, @@ -5155,7 +5155,7 @@ package body Vhdl.Nodes_Meta is Field_Parameter, Field_Type, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Base_Name, -- Iir_Kind_Event_Attribute Field_Expr_Staticness, @@ -5433,7 +5433,7 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Interface_Package_Declaration => 1197, Iir_Kind_Interface_Function_Declaration => 1215, Iir_Kind_Interface_Procedure_Declaration => 1229, - Iir_Kind_Signal_Attribute_Declaration => 1232, + Iir_Kind_Attribute_Implicit_Declaration => 1232, Iir_Kind_Suspend_State_Declaration => 1235, Iir_Kind_Identity_Operator => 1239, Iir_Kind_Negation_Operator => 1243, @@ -6388,8 +6388,8 @@ package body Vhdl.Nodes_Meta is return Get_Guard_Expression (N); when Field_Guard_Decl => return Get_Guard_Decl (N); - when Field_Signal_Attribute_Chain => - return Get_Signal_Attribute_Chain (N); + when Field_Attribute_Implicit_Chain => + return Get_Attribute_Implicit_Chain (N); when Field_Block_Block_Configuration => return Get_Block_Block_Configuration (N); when Field_Package_Header => @@ -6468,8 +6468,8 @@ package body Vhdl.Nodes_Meta is return Get_Parameter_4 (N); when Field_Attr_Chain => return Get_Attr_Chain (N); - when Field_Signal_Attribute_Declaration => - return Get_Signal_Attribute_Declaration (N); + when Field_Attribute_Implicit_Declaration => + return Get_Attribute_Implicit_Declaration (N); when Field_Actual_Type => return Get_Actual_Type (N); when Field_Actual_Type_Definition => @@ -6848,8 +6848,8 @@ package body Vhdl.Nodes_Meta is Set_Guard_Expression (N, V); when Field_Guard_Decl => Set_Guard_Decl (N, V); - when Field_Signal_Attribute_Chain => - Set_Signal_Attribute_Chain (N, V); + when Field_Attribute_Implicit_Chain => + Set_Attribute_Implicit_Chain (N, V); when Field_Block_Block_Configuration => Set_Block_Block_Configuration (N, V); when Field_Package_Header => @@ -6928,8 +6928,8 @@ package body Vhdl.Nodes_Meta is Set_Parameter_4 (N, V); when Field_Attr_Chain => Set_Attr_Chain (N, V); - when Field_Signal_Attribute_Declaration => - Set_Signal_Attribute_Declaration (N, V); + when Field_Attribute_Implicit_Declaration => + Set_Attribute_Implicit_Declaration (N, V); when Field_Actual_Type => Set_Actual_Type (N, V); when Field_Actual_Type_Definition => @@ -8613,7 +8613,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Interface_Package_Declaration | Iir_Kind_Interface_Function_Declaration | Iir_Kind_Interface_Procedure_Declaration - | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Attribute_Implicit_Declaration | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Sensitized_Process_Statement | Iir_Kind_Process_Statement @@ -10824,10 +10824,10 @@ package body Vhdl.Nodes_Meta is return K = Iir_Kind_Guard_Signal_Declaration; end Has_Guard_Sensitivity_List; - function Has_Signal_Attribute_Chain (K : Iir_Kind) return Boolean is + function Has_Attribute_Implicit_Chain (K : Iir_Kind) return Boolean is begin - return K = Iir_Kind_Signal_Attribute_Declaration; - end Has_Signal_Attribute_Chain; + return K = Iir_Kind_Attribute_Implicit_Declaration; + end Has_Attribute_Implicit_Chain; function Has_Block_Block_Configuration (K : Iir_Kind) return Boolean is begin @@ -11037,7 +11037,7 @@ package body Vhdl.Nodes_Meta is | Iir_Kind_Interface_Package_Declaration | Iir_Kind_Interface_Function_Declaration | Iir_Kind_Interface_Procedure_Declaration - | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Attribute_Implicit_Declaration | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Sensitized_Process_Statement | Iir_Kind_Process_Statement @@ -11854,7 +11854,8 @@ package body Vhdl.Nodes_Meta is end case; end Has_Attr_Chain; - function Has_Signal_Attribute_Declaration (K : Iir_Kind) return Boolean is + function Has_Attribute_Implicit_Declaration (K : Iir_Kind) + return Boolean is begin case K is when Iir_Kind_Dot_Attribute @@ -11869,7 +11870,7 @@ package body Vhdl.Nodes_Meta is when others => return False; end case; - end Has_Signal_Attribute_Declaration; + end Has_Attribute_Implicit_Declaration; function Has_Actual_Type (K : Iir_Kind) return Boolean is begin diff --git a/src/vhdl/vhdl-nodes_meta.ads b/src/vhdl/vhdl-nodes_meta.ads index bf7fdcae0..51e9531aa 100644 --- a/src/vhdl/vhdl-nodes_meta.ads +++ b/src/vhdl/vhdl-nodes_meta.ads @@ -310,7 +310,7 @@ package Vhdl.Nodes_Meta is Field_Guard_Expression, Field_Guard_Decl, Field_Guard_Sensitivity_List, - Field_Signal_Attribute_Chain, + Field_Attribute_Implicit_Chain, Field_Block_Block_Configuration, Field_Package_Header, Field_Block_Header, @@ -360,7 +360,7 @@ package Vhdl.Nodes_Meta is Field_Parameter_3, Field_Parameter_4, Field_Attr_Chain, - Field_Signal_Attribute_Declaration, + Field_Attribute_Implicit_Declaration, Field_Actual_Type, Field_Actual_Type_Definition, Field_Association_Chain, @@ -904,7 +904,7 @@ package Vhdl.Nodes_Meta is function Has_Guard_Expression (K : Iir_Kind) return Boolean; function Has_Guard_Decl (K : Iir_Kind) return Boolean; function Has_Guard_Sensitivity_List (K : Iir_Kind) return Boolean; - function Has_Signal_Attribute_Chain (K : Iir_Kind) return Boolean; + function Has_Attribute_Implicit_Chain (K : Iir_Kind) return Boolean; function Has_Block_Block_Configuration (K : Iir_Kind) return Boolean; function Has_Package_Header (K : Iir_Kind) return Boolean; function Has_Block_Header (K : Iir_Kind) return Boolean; @@ -954,7 +954,8 @@ package Vhdl.Nodes_Meta is function Has_Parameter_3 (K : Iir_Kind) return Boolean; function Has_Parameter_4 (K : Iir_Kind) return Boolean; function Has_Attr_Chain (K : Iir_Kind) return Boolean; - function Has_Signal_Attribute_Declaration (K : Iir_Kind) return Boolean; + function Has_Attribute_Implicit_Declaration (K : Iir_Kind) + return Boolean; function Has_Actual_Type (K : Iir_Kind) return Boolean; function Has_Actual_Type_Definition (K : Iir_Kind) return Boolean; function Has_Association_Chain (K : Iir_Kind) return Boolean; diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb index 06725456c..8f54d2b5c 100644 --- a/src/vhdl/vhdl-prints.adb +++ b/src/vhdl/vhdl-prints.adb @@ -2498,7 +2498,7 @@ package body Vhdl.Prints is Disp_Attribute_Declaration (Ctxt, Decl); when Iir_Kind_Attribute_Specification => Disp_Attribute_Specification (Ctxt, Decl); - when Iir_Kind_Signal_Attribute_Declaration => + when Iir_Kind_Attribute_Implicit_Declaration => null; when Iir_Kind_Group_Template_Declaration => Disp_Group_Template_Declaration (Ctxt, Decl); diff --git a/src/vhdl/vhdl-sem.adb b/src/vhdl/vhdl-sem.adb index 20b5f13ad..8510398ff 100644 --- a/src/vhdl/vhdl-sem.adb +++ b/src/vhdl/vhdl-sem.adb @@ -2887,7 +2887,7 @@ package body Vhdl.Sem is is Unit : constant Iir_Design_Unit := Get_Design_Unit (Pkg); Header : constant Iir := Get_Package_Header (Pkg); - Implicit : Implicit_Signal_Declaration_Type; + Implicit : Implicit_Declaration_Type; begin Sem_Scopes.Add_Name (Pkg); Set_Visible_Flag (Pkg, True); @@ -3462,7 +3462,7 @@ package body Vhdl.Sem is Library : constant Iir := Get_Library (Get_Design_File (Design_Unit)); Prev_Unit : Iir; Old_Design_Unit : Iir_Design_Unit; - Implicit : Implicit_Signal_Declaration_Type; + Implicit : Implicit_Declaration_Type; begin -- Sanity check: can analyze either previously analyzed unit or just -- parsed unit. diff --git a/src/vhdl/vhdl-sem_decls.adb b/src/vhdl/vhdl-sem_decls.adb index 6b3b1176a..11a07a1ae 100644 --- a/src/vhdl/vhdl-sem_decls.adb +++ b/src/vhdl/vhdl-sem_decls.adb @@ -35,11 +35,11 @@ with Vhdl.Xrefs; use Vhdl.Xrefs; package body Vhdl.Sem_Decls is -- Region that can declare signals. Used to add implicit declarations. - Current_Signals_Region : Implicit_Signal_Declaration_Type := + Current_Signals_Region : Implicit_Declaration_Type := (Null_Iir, Null_Iir, Null_Iir, False, Null_Iir); procedure Push_Signals_Declarative_Part - (Cell: out Implicit_Signal_Declaration_Type; Decls_Parent : Iir) is + (Cell: out Implicit_Declaration_Type; Decls_Parent : Iir) is begin Cell := Current_Signals_Region; Current_Signals_Region := @@ -47,13 +47,13 @@ package body Vhdl.Sem_Decls is end Push_Signals_Declarative_Part; procedure Pop_Signals_Declarative_Part - (Cell: in Implicit_Signal_Declaration_Type) is + (Cell: in Implicit_Declaration_Type) is begin Current_Signals_Region := Cell; end Pop_Signals_Declarative_Part; -- Insert the implicit signal declaration after LAST_DECL. - procedure Insert_Implicit_Signal (Last_Decl : Iir) is + procedure Insert_Implicit_Declaration (Last_Decl : Iir) is begin if Last_Decl = Null_Iir then Set_Declaration_Chain (Current_Signals_Region.Decls_Parent, @@ -61,51 +61,51 @@ package body Vhdl.Sem_Decls is else Set_Chain (Last_Decl, Current_Signals_Region.Implicit_Decl); end if; - end Insert_Implicit_Signal; + end Insert_Implicit_Declaration; - -- Add SIG as an implicit declaration in the current region. - procedure Add_Declaration_For_Implicit_Signal (Sig : Iir) + -- Add Attr as an implicit declaration in the current region. + procedure Add_Implicit_Declaration (Attr : Iir) is Decl : Iir; begin -- We deal only with signal attribute. - pragma Assert (Get_Kind (Sig) in Iir_Kinds_AMS_Signal_Attribute); + pragma Assert (Get_Kind (Attr) in Iir_Kinds_AMS_Signal_Attribute); -- There must be a declarative part for implicit signals. pragma Assert (Current_Signals_Region.Decls_Parent /= Null_Iir); -- Attr_Chain must be empty. - pragma Assert (Get_Attr_Chain (Sig) = Null_Iir); + pragma Assert (Get_Attr_Chain (Attr) = Null_Iir); if Current_Signals_Region.Implicit_Decl = Null_Iir then -- Create the signal_attribute_declaration to hold all the implicit -- signals. - Decl := Create_Iir (Iir_Kind_Signal_Attribute_Declaration); - Location_Copy (Decl, Sig); + Decl := Create_Iir (Iir_Kind_Attribute_Implicit_Declaration); + Location_Copy (Decl, Attr); Set_Parent (Decl, Current_Signals_Region.Decls_Parent); -- Save the implicit declaration. Current_Signals_Region.Implicit_Decl := Decl; -- Append SIG (this is the first one). - Set_Signal_Attribute_Chain (Decl, Sig); + Set_Attribute_Implicit_Chain (Decl, Attr); if Current_Signals_Region.Decls_Analyzed then -- Declarative region was completely analyzed. Just append DECL -- at the end of declarations. - Insert_Implicit_Signal (Current_Signals_Region.Last_Decl); + Insert_Implicit_Declaration (Current_Signals_Region.Last_Decl); Current_Signals_Region.Last_Decl := Current_Signals_Region.Implicit_Decl; end if; else -- Append SIG. - Set_Attr_Chain (Current_Signals_Region.Last_Attribute_Signal, Sig); + Set_Attr_Chain (Current_Signals_Region.Last_Attribute, Attr); end if; - Current_Signals_Region.Last_Attribute_Signal := Sig; + Current_Signals_Region.Last_Attribute := Attr; - Set_Signal_Attribute_Declaration - (Sig, Current_Signals_Region.Implicit_Decl); - end Add_Declaration_For_Implicit_Signal; + Set_Attribute_Implicit_Declaration + (Attr, Current_Signals_Region.Implicit_Decl); + end Add_Implicit_Declaration; -- Insert pending implicit declarations after the last analyzed LAST_DECL, -- and update it. Then the caller has to insert the declaration which @@ -122,12 +122,12 @@ package body Vhdl.Sem_Decls is pragma Assert (not Current_Signals_Region.Decls_Analyzed); -- Add pending implicit declarations before the current one. - Insert_Implicit_Signal (Last_Decl); + Insert_Implicit_Declaration (Last_Decl); Last_Decl := Current_Signals_Region.Implicit_Decl; -- Detach the implicit declaration. Current_Signals_Region.Implicit_Decl := Null_Iir; - Current_Signals_Region.Last_Attribute_Signal := Null_Iir; + Current_Signals_Region.Last_Attribute := Null_Iir; end if; end Insert_Pending_Implicit_Declarations; diff --git a/src/vhdl/vhdl-sem_decls.ads b/src/vhdl/vhdl-sem_decls.ads index a6f36cd10..4c585868c 100644 --- a/src/vhdl/vhdl-sem_decls.ads +++ b/src/vhdl/vhdl-sem_decls.ads @@ -81,29 +81,29 @@ package Vhdl.Sem_Decls is -- declarations lists must register and unregister themselves with -- push_declarative_region_with_signals and -- pop_declarative_region_with_signals. - type Implicit_Signal_Declaration_Type is private; + type Implicit_Declaration_Type is private; procedure Push_Signals_Declarative_Part - (Cell: out Implicit_Signal_Declaration_Type; Decls_Parent : Iir); + (Cell: out Implicit_Declaration_Type; Decls_Parent : Iir); procedure Pop_Signals_Declarative_Part - (Cell: in Implicit_Signal_Declaration_Type); + (Cell: in Implicit_Declaration_Type); - -- Declare an implicit signal. This is called from sem_names when a - -- signal attribute is analyzed. - procedure Add_Declaration_For_Implicit_Signal (Sig : Iir); + -- Declare an implicit signal or an implicit quantity. This is called + -- from sem_names when an attribute is analyzed. + procedure Add_Implicit_Declaration (Attr : Iir); private - type Implicit_Signal_Declaration_Type is record + type Implicit_Declaration_Type is record -- Declaration or statement than will contain implicit declarations. Decls_Parent : Iir; - -- Set to the signal_attribute_declaration when created (ie when the - -- first attribute signal is added). + -- Set to the attribute_declaration when created (ie when the + -- first attribute is added). Implicit_Decl : Iir; - -- Last attribute signal inserted in the current Implicit_Decl. - Last_Attribute_Signal : Iir; + -- Last attribute inserted in the current Implicit_Decl. + Last_Attribute : Iir; -- If True, declarations of DECLS_PARENT have already been analyzed. -- So implicit declarations are appended to the parent, and the last diff --git a/src/vhdl/vhdl-sem_names.adb b/src/vhdl/vhdl-sem_names.adb index a7ec56888..e7a1f836a 100644 --- a/src/vhdl/vhdl-sem_names.adb +++ b/src/vhdl/vhdl-sem_names.adb @@ -1378,7 +1378,7 @@ package body Vhdl.Sem_Names is Set_Parameter (Attr, Param); end if; - Sem_Decls.Add_Declaration_For_Implicit_Signal (Attr); + Sem_Decls.Add_Implicit_Declaration (Attr); end if; when Iir_Kind_Ramp_Attribute | Iir_Kind_Signal_Slew_Attribute @@ -4122,7 +4122,7 @@ package body Vhdl.Sem_Names is end if; -- Add a declaration for it. - Sem_Decls.Add_Declaration_For_Implicit_Signal (Res); + Sem_Decls.Add_Implicit_Declaration (Res); return Res; end Sem_Signal_Signal_Attribute; diff --git a/src/vhdl/vhdl-sem_scopes.adb b/src/vhdl/vhdl-sem_scopes.adb index 086660316..fd690f364 100644 --- a/src/vhdl/vhdl-sem_scopes.adb +++ b/src/vhdl/vhdl-sem_scopes.adb @@ -1113,7 +1113,7 @@ package body Vhdl.Sem_Scopes is | Iir_Kind_Disconnection_Specification => null; when Iir_Kinds_Signal_Attribute - | Iir_Kind_Signal_Attribute_Declaration => + | Iir_Kind_Attribute_Implicit_Declaration => null; when Iir_Kind_Protected_Type_Body diff --git a/src/vhdl/vhdl-sem_stmts.adb b/src/vhdl/vhdl-sem_stmts.adb index dff5f256b..72f370629 100644 --- a/src/vhdl/vhdl-sem_stmts.adb +++ b/src/vhdl/vhdl-sem_stmts.adb @@ -2611,7 +2611,7 @@ package body Vhdl.Sem_Stmts is procedure Sem_Block (Blk: Iir) is - Implicit : Implicit_Signal_Declaration_Type; + Implicit : Implicit_Declaration_Type; Prev_Psl_Default_Clock : Iir; begin Prev_Psl_Default_Clock := Current_Psl_Default_Clock; diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb index 2d36c07ad..800a0c9df 100644 --- a/src/vhdl/vhdl-utils.adb +++ b/src/vhdl/vhdl-utils.adb @@ -323,7 +323,7 @@ package body Vhdl.Utils is | Iir_Kind_Subtype_Definition | Iir_Kind_Group_Template_Declaration | Iir_Kind_Group_Declaration - | Iir_Kind_Signal_Attribute_Declaration + | Iir_Kind_Attribute_Implicit_Declaration | Iir_Kind_Suspend_State_Declaration | Iir_Kind_Unaffected_Waveform | Iir_Kind_Waveform_Element |