diff options
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 56 | ||||
-rw-r--r-- | src/ghdldrv/ghdldrv.adb | 182 | ||||
-rw-r--r-- | src/ghdldrv/ghdllocal.adb | 106 | ||||
-rw-r--r-- | src/ghdldrv/ghdllocal.ads | 8 | ||||
-rw-r--r-- | src/vhdl/iirs.ads | 3 | ||||
-rw-r--r-- | src/vhdl/nodes_meta.adb | 320 |
6 files changed, 360 insertions, 315 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index ef81487..33f1b8b 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -516,6 +516,7 @@ package body Ghdlcomp is Next_Arg : Natural; Date : Date_Type; Unit : Iir_Design_Unit; + Lib : Iir_Library_Declaration; begin Extract_Elab_Unit ("-m", Args, Next_Arg); Setup_Libraries (True); @@ -523,12 +524,26 @@ package body Ghdlcomp is -- Create list of files. Files_List := Build_Dependence (Prim_Name, Sec_Name); + -- Unmark all libraries. + Lib := Libraries.Std_Library; + while Lib /= Null_Iir loop + Set_Elab_Flag (Lib, False); + Lib := Get_Chain (Lib); + end loop; + Date := Get_Date (Libraries.Work_Library); for I in Natural loop File := Get_Nth_Element (Files_List, I); exit when File = Null_Iir; - if Get_Library (File) = Libraries.Work_Library then + if File = Std_Package.Std_Standard_File then + null; + elsif Source_File_Modified (File) + or else Is_File_Outdated (File) + then + Lib := Get_Library (File); + Date := Get_Date (Lib); + -- Mark this file as analyzed. Set_Analysis_Time_Stamp (File, Files_Map.Get_Os_Time_Stamp); @@ -542,10 +557,45 @@ package body Ghdlcomp is end if; Unit := Get_Chain (Unit); end loop; + + Set_Date (Lib, Date); + + -- Need to be written to disk. + Set_Elab_Flag (Lib, True); end if; end loop; - Set_Date (Libraries.Work_Library, Date); - Libraries.Save_Work_Library; + + -- Save modified libraries. + if Get_Elab_Flag (Libraries.Work_Library) then + Libraries.Save_Work_Library; + Set_Elab_Flag (Libraries.Work_Library, False); + end if; + + declare + use Libraries; + Old_Work_Library : constant Iir_Library_Declaration := Work_Library; + Old_Work_Library_Name : constant Name_Id := Work_Library_Name; + Old_Work_Directory : constant Name_Id := Work_Directory; + begin + Lib := Libraries.Std_Library; + while Lib /= Null_Iir loop + if Get_Elab_Flag (Lib) then + if Lib = Std_Library then + Error ("need to rebuild std library"); + raise Compile_Error; + end if; + Work_Library := Lib; + Work_Library_Name := Get_Identifier (Lib); + Work_Directory := Get_Library_Directory (Lib); + Libraries.Save_Work_Library; + Set_Elab_Flag (Lib, False); + end if; + Lib := Get_Chain (Lib); + end loop; + Work_Library := Old_Work_Library; + Work_Library_Name := Old_Work_Library_Name; + Work_Directory := Old_Work_Directory; + end; exception when Compilation_Error => if Flag_Expect_Failure then diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb index 7e418d6..2a32595 100644 --- a/src/ghdldrv/ghdldrv.adb +++ b/src/ghdldrv/ghdldrv.adb @@ -364,130 +364,6 @@ package body Ghdldrv is & Get_Object_Suffix.all; end Get_Object_Filename; - Last_Stamp : Time_Stamp_Id; - Last_Stamp_File : Iir; - - function Is_File_Outdated (Design_File : Iir_Design_File) return Boolean - is - use Files_Map; - - Name : Name_Id; - - File : Source_File_Entry; - begin - -- Std.Standard is never outdated. - if Design_File = Std_Package.Std_Standard_File then - return False; - end if; - - Name := Get_Design_File_Filename (Design_File); - declare - Obj_Pathname : String := Get_Object_Filename (Design_File) & Nul; - Stamp : Time_Stamp_Id; - begin - Stamp := Get_File_Time_Stamp (Obj_Pathname'Address); - - -- If the object file does not exist, recompile the file. - if Stamp = Null_Time_Stamp then - if Flag_Verbose then - Put_Line ("no object file for " & Image (Name)); - end if; - return True; - end if; - - -- Keep the time stamp of the most recently analyzed unit. - if Last_Stamp = Null_Time_Stamp - or else Is_Gt (Stamp, Last_Stamp) - then - Last_Stamp := Stamp; - Last_Stamp_File := Design_File; - end if; - end; - - -- 2) file has been modified. - File := Load_Source_File (Get_Design_File_Directory (Design_File), - Get_Design_File_Filename (Design_File)); - if not Is_Eq (Get_File_Time_Stamp (File), - Get_File_Time_Stamp (Design_File)) - then - if Flag_Verbose then - Put_Line ("file " & Image (Get_File_Name (File)) - & " has been modified"); - end if; - return True; - end if; - - return False; - end Is_File_Outdated; - - function Is_Unit_Outdated (Unit : Iir_Design_Unit) return Boolean - is - Design_File : Iir_Design_File; - begin - -- Std.Standard is never outdated. - if Unit = Std_Package.Std_Standard_Unit then - return False; - end if; - - Design_File := Get_Design_File (Unit); - - -- 1) not yet analyzed: - if Get_Date (Unit) not in Date_Valid then - if Flag_Verbose then - Disp_Library_Unit (Get_Library_Unit (Unit)); - Put_Line (" was not analyzed"); - end if; - return True; - end if; - - -- 3) the object file does not exist. - -- Already checked. - - -- 4) one of the dependence is newer - declare - Depends : Iir_List; - El : Iir; - Dep : Iir_Design_Unit; - Stamp : Time_Stamp_Id; - Dep_File : Iir_Design_File; - begin - Depends := Get_Dependence_List (Unit); - Stamp := Get_Analysis_Time_Stamp (Design_File); - if Depends /= Null_Iir_List then - for I in Natural loop - El := Get_Nth_Element (Depends, I); - exit when El = Null_Iir; - Dep := Libraries.Find_Design_Unit (El); - if Dep = Null_Iir then - if Flag_Verbose then - Disp_Library_Unit (Unit); - Put (" depends on an unknown unit "); - Disp_Library_Unit (El); - New_Line; - end if; - return True; - end if; - Dep_File := Get_Design_File (Dep); - if Dep /= Std_Package.Std_Standard_Unit - and then Files_Map.Is_Gt (Get_Analysis_Time_Stamp (Dep_File), - Stamp) - then - if Flag_Verbose then - Disp_Library_Unit (Get_Library_Unit (Unit)); - Put (" depends on: "); - Disp_Library_Unit (Get_Library_Unit (Dep)); - Put (" (more recently analyzed)"); - New_Line; - end if; - return True; - end if; - end loop; - end if; - end; - - return False; - end Is_Unit_Outdated; - procedure Add_Argument (Inst : in out Instance; Arg : String_Access) is begin @@ -1381,6 +1257,40 @@ package body Ghdldrv is end if; end Decode_Option; + Last_Stamp : Time_Stamp_Id; + Last_Stamp_File : Iir; + + function Missing_Object_File (Design_File : Iir_Design_File) return Boolean + is + use Files_Map; + + Name : constant Name_Id := Get_Design_File_Filename (Design_File); + Obj_Pathname : constant String := + Get_Object_Filename (Design_File) & Nul; + Stamp : Time_Stamp_Id; + File : Source_File_Entry; + begin + Stamp := Get_File_Time_Stamp (Obj_Pathname'Address); + + -- If the object file does not exist, recompile the file. + if Stamp = Null_Time_Stamp then + if Flag_Verbose then + Put_Line ("no object file for " & Image (Name)); + end if; + return True; + end if; + + -- Keep the time stamp of the most recently analyzed unit. + if Last_Stamp = Null_Time_Stamp + or else Is_Gt (Stamp, Last_Stamp) + then + Last_Stamp := Stamp; + Last_Stamp_File := Design_File; + end if; + + return False; + end Missing_Object_File; + procedure Perform_Action (Cmd : in out Command_Make; Args : Argument_List) is use Configuration; @@ -1463,25 +1373,15 @@ package body Ghdldrv is File := Get_Nth_Element (Files_List, I); exit when File = Null_Iir; - Need_Analyze := False; - if Is_File_Outdated (File) then + if File = Std_Package.Std_Standard_File then + Need_Analyze := False; + elsif Missing_Object_File (File) + or else Source_File_Modified (File) + or else Is_File_Outdated (File) + then Need_Analyze := True; else - Unit := Get_First_Design_Unit (File); - while Unit /= Null_Iir loop - Lib_Unit := Get_Library_Unit (Unit); - -- Check if the unit is outdated (except for default - -- configurations). - if not (Get_Kind (Lib_Unit) = Iir_Kind_Configuration_Declaration - and then Get_Identifier (Lib_Unit) = Null_Identifier) - then - if Is_Unit_Outdated (Unit) then - Need_Analyze := True; - exit; - end if; - end if; - Unit := Get_Chain (Unit); - end loop; + Need_Analyze := False; end if; Lib := Get_Library (File); diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index ede9526..91bdfac 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -15,7 +15,7 @@ -- along with GCC; see the file COPYING. If not, write to the Free -- Software Foundation, 59 Temple Place - Suite 330, Boston, MA -- 02111-1307, USA. -with Ada.Text_IO; +with Ada.Text_IO; use Ada.Text_IO; with Ada.Command_Line; use Ada.Command_Line; with GNAT.Directory_Operations; with Types; use Types; @@ -52,7 +52,6 @@ package body Ghdllocal is (Unit : Iir_Design_Unit; Main : Boolean := False) is use Errorout; - use Ada.Text_IO; Config : Iir_Design_Unit; Lib : Iir; begin @@ -157,7 +156,6 @@ package body Ghdllocal is procedure Disp_Long_Help (Cmd : Command_Lib) is pragma Unreferenced (Cmd); - use Ada.Text_IO; procedure P (Str : String) renames Put_Line; begin P ("Main options (try --options-help for details):"); @@ -440,9 +438,7 @@ package body Ghdllocal is end if; end Setup_Libraries; - procedure Disp_Config_Prefixes - is - use Ada.Text_IO; + procedure Disp_Config_Prefixes is begin Put ("command line prefix (--PREFIX): "); if Switch_Prefix_Path = null then @@ -476,7 +472,6 @@ package body Ghdllocal is procedure Disp_Library_Unit (Unit : Iir) is - use Ada.Text_IO; use Name_Table; Id : Name_Id; begin @@ -518,7 +513,6 @@ package body Ghdllocal is procedure Disp_Library (Name : Name_Id) is - use Ada.Text_IO; use Libraries; Lib : Iir_Library_Declaration; File : Iir_Design_File; @@ -665,7 +659,6 @@ package body Ghdllocal is is pragma Unreferenced (Cmd); - use Ada.Text_IO; use Name_Table; Id : Name_Id; Design_File : Iir_Design_File; @@ -727,7 +720,6 @@ package body Ghdllocal is procedure Perform_Action (Cmd : in out Command_Import; Args : Argument_List) is pragma Unreferenced (Cmd); - use Ada.Text_IO; Id : Name_Id; Design_File : Iir_Design_File; Unit : Iir; @@ -812,7 +804,6 @@ package body Ghdllocal is procedure Analyze_One_File (File_Name : String) is - use Ada.Text_IO; Id : Name_Id; Design_File : Iir_Design_File; Unit : Iir; @@ -896,7 +887,6 @@ package body Ghdllocal is procedure Delete (Str : String) is - use Ada.Text_IO; Status : Boolean; begin Delete_File (Str'Address, Status); @@ -1360,6 +1350,98 @@ package body Ghdllocal is return Files_List; end Build_Dependence; + function Source_File_Modified (File : Iir_Design_File) return Boolean + is + use Files_Map; + + Fe : Source_File_Entry; + begin + -- 2) file has been modified. + Fe := Load_Source_File (Get_Design_File_Directory (File), + Get_Design_File_Filename (File)); + if not Is_Eq (Get_File_Time_Stamp (Fe), + Get_File_Time_Stamp (File)) + then + if Flag_Verbose then + Put_Line ("file " & Name_Table.Image (Get_File_Name (Fe)) + & " has been modified"); + end if; + return True; + else + return False; + end if; + end Source_File_Modified; + + function Is_File_Outdated (File : Iir_Design_File) return Boolean + is + Unit : Iir; + Lib_Unit : Iir; + begin + Unit := Get_First_Design_Unit (File); + while Unit /= Null_Iir loop + Lib_Unit := Get_Library_Unit (Unit); + if Get_Kind (Lib_Unit) = Iir_Kind_Configuration_Declaration + and then Get_Identifier (Lib_Unit) = Null_Identifier + then + -- Do not consider default configurations (there is no user code + -- for them). + null; + elsif Get_Date (Unit) not in Date_Valid then + -- Unit not yet analyzed: + if Flag_Verbose then + Disp_Library_Unit (Get_Library_Unit (Unit)); + Put_Line (" was not analyzed"); + end if; + return True; + else + -- Check if one of the dependence is newer + declare + Depends : constant Iir_List := Get_Dependence_List (Unit); + Stamp : constant Time_Stamp_Id := + Get_Analysis_Time_Stamp (File); + El : Iir; + Dep : Iir_Design_Unit; + Dep_File : Iir_Design_File; + begin + if Depends /= Null_Iir_List then + for I in Natural loop + El := Get_Nth_Element (Depends, I); + exit when El = Null_Iir; + Dep := Libraries.Find_Design_Unit (El); + if Dep = Null_Iir then + if Flag_Verbose then + Disp_Library_Unit (Unit); + Put (" depends on an unknown unit "); + Disp_Library_Unit (El); + New_Line; + end if; + return True; + end if; + Dep_File := Get_Design_File (Dep); + if Dep /= Std_Package.Std_Standard_Unit + and then + Files_Map.Is_Gt (Get_Analysis_Time_Stamp (Dep_File), + Stamp) + then + if Flag_Verbose then + Disp_Library_Unit (Get_Library_Unit (Unit)); + Put (" depends on: "); + Disp_Library_Unit (Get_Library_Unit (Dep)); + Put (" (more recently analyzed)"); + New_Line; + end if; + return True; + end if; + end loop; + end if; + end; + end if; + Unit := Get_Chain (Unit); + end loop; + + return False; + end Is_File_Outdated; + -- Convert NAME to lower cases, unless it is an extended identifier. function Convert_Name (Name : String_Access) return String_Access is diff --git a/src/ghdldrv/ghdllocal.ads b/src/ghdldrv/ghdllocal.ads index d64846f..7c5d193 100644 --- a/src/ghdldrv/ghdllocal.ads +++ b/src/ghdldrv/ghdllocal.ads @@ -108,6 +108,14 @@ package Ghdllocal is function Build_Dependence (Prim : String_Access; Sec : String_Access) return Iir_List; + -- Return True iff file FILE has been modified (the file time stamp does + -- no correspond to what was recorded in the library). + function Source_File_Modified (File : Iir_Design_File) return Boolean; + + -- Return True iff FILE need to be analyzed because one of its dependences + -- has been analyzed more recently. + function Is_File_Outdated (File : Iir_Design_File) return Boolean; + Prim_Name : String_Access; Sec_Name : String_Access; diff --git a/src/vhdl/iirs.ads b/src/vhdl/iirs.ads index 79b003e..2ce529f 100644 --- a/src/vhdl/iirs.ads +++ b/src/vhdl/iirs.ads @@ -877,6 +877,9 @@ package Iirs is -- -- Get/Set_Library_Directory (Field5) -- + -- Used to compute dependences. + -- Get/Set_Elab_Flag (Flag3) + -- -- Get/Set_Visible_Flag (Flag4) -- Iir_Kind_Component_Declaration (Medium) diff --git a/src/vhdl/nodes_meta.adb b/src/vhdl/nodes_meta.adb index 9d8b878..e6c5b7d 100644 --- a/src/vhdl/nodes_meta.adb +++ b/src/vhdl/nodes_meta.adb @@ -2537,6 +2537,7 @@ package body Nodes_Meta is Field_Identifier, Field_Date, Field_Library_Directory, + Field_Elab_Flag, Field_Visible_Flag, Field_Design_File_Chain, Field_Chain, @@ -3880,164 +3881,164 @@ package body Nodes_Meta is Iir_Kind_Architecture_Body => 489, Iir_Kind_Package_Header => 491, Iir_Kind_Unit_Declaration => 500, - Iir_Kind_Library_Declaration => 506, - Iir_Kind_Component_Declaration => 516, - Iir_Kind_Attribute_Declaration => 523, - Iir_Kind_Group_Template_Declaration => 529, - Iir_Kind_Group_Declaration => 536, - Iir_Kind_Element_Declaration => 543, - Iir_Kind_Non_Object_Alias_Declaration => 551, - Iir_Kind_Psl_Declaration => 559, - Iir_Kind_Terminal_Declaration => 565, - Iir_Kind_Free_Quantity_Declaration => 574, - Iir_Kind_Across_Quantity_Declaration => 586, - Iir_Kind_Through_Quantity_Declaration => 598, - Iir_Kind_Enumeration_Literal => 609, - Iir_Kind_Function_Declaration => 633, - Iir_Kind_Procedure_Declaration => 655, - Iir_Kind_Function_Body => 665, - Iir_Kind_Procedure_Body => 675, - Iir_Kind_Object_Alias_Declaration => 687, - Iir_Kind_File_Declaration => 702, - Iir_Kind_Guard_Signal_Declaration => 715, - Iir_Kind_Signal_Declaration => 732, - Iir_Kind_Variable_Declaration => 745, - Iir_Kind_Constant_Declaration => 759, - Iir_Kind_Iterator_Declaration => 771, - Iir_Kind_Interface_Constant_Declaration => 787, - Iir_Kind_Interface_Variable_Declaration => 803, - Iir_Kind_Interface_Signal_Declaration => 824, - Iir_Kind_Interface_File_Declaration => 840, - Iir_Kind_Interface_Package_Declaration => 849, - Iir_Kind_Identity_Operator => 853, - Iir_Kind_Negation_Operator => 857, - Iir_Kind_Absolute_Operator => 861, - Iir_Kind_Not_Operator => 865, - Iir_Kind_Condition_Operator => 869, - Iir_Kind_Reduction_And_Operator => 873, - Iir_Kind_Reduction_Or_Operator => 877, - Iir_Kind_Reduction_Nand_Operator => 881, - Iir_Kind_Reduction_Nor_Operator => 885, - Iir_Kind_Reduction_Xor_Operator => 889, - Iir_Kind_Reduction_Xnor_Operator => 893, - Iir_Kind_And_Operator => 898, - Iir_Kind_Or_Operator => 903, - Iir_Kind_Nand_Operator => 908, - Iir_Kind_Nor_Operator => 913, - Iir_Kind_Xor_Operator => 918, - Iir_Kind_Xnor_Operator => 923, - Iir_Kind_Equality_Operator => 928, - Iir_Kind_Inequality_Operator => 933, - Iir_Kind_Less_Than_Operator => 938, - Iir_Kind_Less_Than_Or_Equal_Operator => 943, - Iir_Kind_Greater_Than_Operator => 948, - Iir_Kind_Greater_Than_Or_Equal_Operator => 953, - Iir_Kind_Match_Equality_Operator => 958, - Iir_Kind_Match_Inequality_Operator => 963, - Iir_Kind_Match_Less_Than_Operator => 968, - Iir_Kind_Match_Less_Than_Or_Equal_Operator => 973, - Iir_Kind_Match_Greater_Than_Operator => 978, - Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 983, - Iir_Kind_Sll_Operator => 988, - Iir_Kind_Sla_Operator => 993, - Iir_Kind_Srl_Operator => 998, - Iir_Kind_Sra_Operator => 1003, - Iir_Kind_Rol_Operator => 1008, - Iir_Kind_Ror_Operator => 1013, - Iir_Kind_Addition_Operator => 1018, - Iir_Kind_Substraction_Operator => 1023, - Iir_Kind_Concatenation_Operator => 1028, - Iir_Kind_Multiplication_Operator => 1033, - Iir_Kind_Division_Operator => 1038, - Iir_Kind_Modulus_Operator => 1043, - Iir_Kind_Remainder_Operator => 1048, - Iir_Kind_Exponentiation_Operator => 1053, - Iir_Kind_Function_Call => 1061, - Iir_Kind_Aggregate => 1067, - Iir_Kind_Parenthesis_Expression => 1070, - Iir_Kind_Qualified_Expression => 1074, - Iir_Kind_Type_Conversion => 1079, - Iir_Kind_Allocator_By_Expression => 1083, - Iir_Kind_Allocator_By_Subtype => 1087, - Iir_Kind_Selected_Element => 1093, - Iir_Kind_Dereference => 1098, - Iir_Kind_Implicit_Dereference => 1103, - Iir_Kind_Slice_Name => 1110, - Iir_Kind_Indexed_Name => 1116, - Iir_Kind_Psl_Expression => 1118, - Iir_Kind_Sensitized_Process_Statement => 1137, - Iir_Kind_Process_Statement => 1155, - Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1166, - Iir_Kind_Concurrent_Selected_Signal_Assignment => 1178, - Iir_Kind_Concurrent_Assertion_Statement => 1186, - Iir_Kind_Psl_Default_Clock => 1190, - Iir_Kind_Psl_Assert_Statement => 1199, - Iir_Kind_Psl_Cover_Statement => 1208, - Iir_Kind_Concurrent_Procedure_Call_Statement => 1214, - Iir_Kind_Block_Statement => 1227, - Iir_Kind_Generate_Statement => 1239, - Iir_Kind_Component_Instantiation_Statement => 1249, - Iir_Kind_Simple_Simultaneous_Statement => 1256, - Iir_Kind_Signal_Assignment_Statement => 1265, - Iir_Kind_Null_Statement => 1269, - Iir_Kind_Assertion_Statement => 1276, - Iir_Kind_Report_Statement => 1282, - Iir_Kind_Wait_Statement => 1289, - Iir_Kind_Variable_Assignment_Statement => 1295, - Iir_Kind_Return_Statement => 1301, - Iir_Kind_For_Loop_Statement => 1309, - Iir_Kind_While_Loop_Statement => 1316, - Iir_Kind_Next_Statement => 1322, - Iir_Kind_Exit_Statement => 1328, - Iir_Kind_Case_Statement => 1335, - Iir_Kind_Procedure_Call_Statement => 1340, - Iir_Kind_If_Statement => 1348, - Iir_Kind_Elsif => 1353, - Iir_Kind_Character_Literal => 1360, - Iir_Kind_Simple_Name => 1367, - Iir_Kind_Selected_Name => 1375, - Iir_Kind_Operator_Symbol => 1380, - Iir_Kind_Selected_By_All_Name => 1385, - Iir_Kind_Parenthesis_Name => 1389, - Iir_Kind_Base_Attribute => 1391, - Iir_Kind_Left_Type_Attribute => 1396, - Iir_Kind_Right_Type_Attribute => 1401, - Iir_Kind_High_Type_Attribute => 1406, - Iir_Kind_Low_Type_Attribute => 1411, - Iir_Kind_Ascending_Type_Attribute => 1416, - Iir_Kind_Image_Attribute => 1422, - Iir_Kind_Value_Attribute => 1428, - Iir_Kind_Pos_Attribute => 1434, - Iir_Kind_Val_Attribute => 1440, - Iir_Kind_Succ_Attribute => 1446, - Iir_Kind_Pred_Attribute => 1452, - Iir_Kind_Leftof_Attribute => 1458, - Iir_Kind_Rightof_Attribute => 1464, - Iir_Kind_Delayed_Attribute => 1472, - Iir_Kind_Stable_Attribute => 1480, - Iir_Kind_Quiet_Attribute => 1488, - Iir_Kind_Transaction_Attribute => 1496, - Iir_Kind_Event_Attribute => 1500, - Iir_Kind_Active_Attribute => 1504, - Iir_Kind_Last_Event_Attribute => 1508, - Iir_Kind_Last_Active_Attribute => 1512, - Iir_Kind_Last_Value_Attribute => 1516, - Iir_Kind_Driving_Attribute => 1520, - Iir_Kind_Driving_Value_Attribute => 1524, - Iir_Kind_Behavior_Attribute => 1524, - Iir_Kind_Structure_Attribute => 1524, - Iir_Kind_Simple_Name_Attribute => 1531, - Iir_Kind_Instance_Name_Attribute => 1536, - Iir_Kind_Path_Name_Attribute => 1541, - Iir_Kind_Left_Array_Attribute => 1548, - Iir_Kind_Right_Array_Attribute => 1555, - Iir_Kind_High_Array_Attribute => 1562, - Iir_Kind_Low_Array_Attribute => 1569, - Iir_Kind_Length_Array_Attribute => 1576, - Iir_Kind_Ascending_Array_Attribute => 1583, - Iir_Kind_Range_Array_Attribute => 1590, - Iir_Kind_Reverse_Range_Array_Attribute => 1597, - Iir_Kind_Attribute_Name => 1605 + Iir_Kind_Library_Declaration => 507, + Iir_Kind_Component_Declaration => 517, + Iir_Kind_Attribute_Declaration => 524, + Iir_Kind_Group_Template_Declaration => 530, + Iir_Kind_Group_Declaration => 537, + Iir_Kind_Element_Declaration => 544, + Iir_Kind_Non_Object_Alias_Declaration => 552, + Iir_Kind_Psl_Declaration => 560, + Iir_Kind_Terminal_Declaration => 566, + Iir_Kind_Free_Quantity_Declaration => 575, + Iir_Kind_Across_Quantity_Declaration => 587, + Iir_Kind_Through_Quantity_Declaration => 599, + Iir_Kind_Enumeration_Literal => 610, + Iir_Kind_Function_Declaration => 634, + Iir_Kind_Procedure_Declaration => 656, + Iir_Kind_Function_Body => 666, + Iir_Kind_Procedure_Body => 676, + Iir_Kind_Object_Alias_Declaration => 688, + Iir_Kind_File_Declaration => 703, + Iir_Kind_Guard_Signal_Declaration => 716, + Iir_Kind_Signal_Declaration => 733, + Iir_Kind_Variable_Declaration => 746, + Iir_Kind_Constant_Declaration => 760, + Iir_Kind_Iterator_Declaration => 772, + Iir_Kind_Interface_Constant_Declaration => 788, + Iir_Kind_Interface_Variable_Declaration => 804, + Iir_Kind_Interface_Signal_Declaration => 825, + Iir_Kind_Interface_File_Declaration => 841, + Iir_Kind_Interface_Package_Declaration => 850, + Iir_Kind_Identity_Operator => 854, + Iir_Kind_Negation_Operator => 858, + Iir_Kind_Absolute_Operator => 862, + Iir_Kind_Not_Operator => 866, + Iir_Kind_Condition_Operator => 870, + Iir_Kind_Reduction_And_Operator => 874, + Iir_Kind_Reduction_Or_Operator => 878, + Iir_Kind_Reduction_Nand_Operator => 882, + Iir_Kind_Reduction_Nor_Operator => 886, + Iir_Kind_Reduction_Xor_Operator => 890, + Iir_Kind_Reduction_Xnor_Operator => 894, + Iir_Kind_And_Operator => 899, + Iir_Kind_Or_Operator => 904, + Iir_Kind_Nand_Operator => 909, + Iir_Kind_Nor_Operator => 914, + Iir_Kind_Xor_Operator => 919, + Iir_Kind_Xnor_Operator => 924, + Iir_Kind_Equality_Operator => 929, + Iir_Kind_Inequality_Operator => 934, + Iir_Kind_Less_Than_Operator => 939, + Iir_Kind_Less_Than_Or_Equal_Operator => 944, + Iir_Kind_Greater_Than_Operator => 949, + Iir_Kind_Greater_Than_Or_Equal_Operator => 954, + Iir_Kind_Match_Equality_Operator => 959, + Iir_Kind_Match_Inequality_Operator => 964, + Iir_Kind_Match_Less_Than_Operator => 969, + Iir_Kind_Match_Less_Than_Or_Equal_Operator => 974, + Iir_Kind_Match_Greater_Than_Operator => 979, + Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 984, + Iir_Kind_Sll_Operator => 989, + Iir_Kind_Sla_Operator => 994, + Iir_Kind_Srl_Operator => 999, + Iir_Kind_Sra_Operator => 1004, + Iir_Kind_Rol_Operator => 1009, + Iir_Kind_Ror_Operator => 1014, + Iir_Kind_Addition_Operator => 1019, + Iir_Kind_Substraction_Operator => 1024, + Iir_Kind_Concatenation_Operator => 1029, + Iir_Kind_Multiplication_Operator => 1034, + Iir_Kind_Division_Operator => 1039, + Iir_Kind_Modulus_Operator => 1044, + Iir_Kind_Remainder_Operator => 1049, + Iir_Kind_Exponentiation_Operator => 1054, + Iir_Kind_Function_Call => 1062, + Iir_Kind_Aggregate => 1068, + Iir_Kind_Parenthesis_Expression => 1071, + Iir_Kind_Qualified_Expression => 1075, + Iir_Kind_Type_Conversion => 1080, + Iir_Kind_Allocator_By_Expression => 1084, + Iir_Kind_Allocator_By_Subtype => 1088, + Iir_Kind_Selected_Element => 1094, + Iir_Kind_Dereference => 1099, + Iir_Kind_Implicit_Dereference => 1104, + Iir_Kind_Slice_Name => 1111, + Iir_Kind_Indexed_Name => 1117, + Iir_Kind_Psl_Expression => 1119, + Iir_Kind_Sensitized_Process_Statement => 1138, + Iir_Kind_Process_Statement => 1156, + Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1167, + Iir_Kind_Concurrent_Selected_Signal_Assignment => 1179, + Iir_Kind_Concurrent_Assertion_Statement => 1187, + Iir_Kind_Psl_Default_Clock => 1191, + Iir_Kind_Psl_Assert_Statement => 1200, + Iir_Kind_Psl_Cover_Statement => 1209, + Iir_Kind_Concurrent_Procedure_Call_Statement => 1215, + Iir_Kind_Block_Statement => 1228, + Iir_Kind_Generate_Statement => 1240, + Iir_Kind_Component_Instantiation_Statement => 1250, + Iir_Kind_Simple_Simultaneous_Statement => 1257, + Iir_Kind_Signal_Assignment_Statement => 1266, + Iir_Kind_Null_Statement => 1270, + Iir_Kind_Assertion_Statement => 1277, + Iir_Kind_Report_Statement => 1283, + Iir_Kind_Wait_Statement => 1290, + Iir_Kind_Variable_Assignment_Statement => 1296, + Iir_Kind_Return_Statement => 1302, + Iir_Kind_For_Loop_Statement => 1310, + Iir_Kind_While_Loop_Statement => 1317, + Iir_Kind_Next_Statement => 1323, + Iir_Kind_Exit_Statement => 1329, + Iir_Kind_Case_Statement => 1336, + Iir_Kind_Procedure_Call_Statement => 1341, + Iir_Kind_If_Statement => 1349, + Iir_Kind_Elsif => 1354, + Iir_Kind_Character_Literal => 1361, + Iir_Kind_Simple_Name => 1368, + Iir_Kind_Selected_Name => 1376, + Iir_Kind_Operator_Symbol => 1381, + Iir_Kind_Selected_By_All_Name => 1386, + Iir_Kind_Parenthesis_Name => 1390, + Iir_Kind_Base_Attribute => 1392, + Iir_Kind_Left_Type_Attribute => 1397, + Iir_Kind_Right_Type_Attribute => 1402, + Iir_Kind_High_Type_Attribute => 1407, + Iir_Kind_Low_Type_Attribute => 1412, + Iir_Kind_Ascending_Type_Attribute => 1417, + Iir_Kind_Image_Attribute => 1423, + Iir_Kind_Value_Attribute => 1429, + Iir_Kind_Pos_Attribute => 1435, + Iir_Kind_Val_Attribute => 1441, + Iir_Kind_Succ_Attribute => 1447, + Iir_Kind_Pred_Attribute => 1453, + Iir_Kind_Leftof_Attribute => 1459, + Iir_Kind_Rightof_Attribute => 1465, + Iir_Kind_Delayed_Attribute => 1473, + Iir_Kind_Stable_Attribute => 1481, + Iir_Kind_Quiet_Attribute => 1489, + Iir_Kind_Transaction_Attribute => 1497, + Iir_Kind_Event_Attribute => 1501, + Iir_Kind_Active_Attribute => 1505, + Iir_Kind_Last_Event_Attribute => 1509, + Iir_Kind_Last_Active_Attribute => 1513, + Iir_Kind_Last_Value_Attribute => 1517, + Iir_Kind_Driving_Attribute => 1521, + Iir_Kind_Driving_Value_Attribute => 1525, + Iir_Kind_Behavior_Attribute => 1525, + Iir_Kind_Structure_Attribute => 1525, + Iir_Kind_Simple_Name_Attribute => 1532, + Iir_Kind_Instance_Name_Attribute => 1537, + Iir_Kind_Path_Name_Attribute => 1542, + Iir_Kind_Left_Array_Attribute => 1549, + Iir_Kind_Right_Array_Attribute => 1556, + Iir_Kind_High_Array_Attribute => 1563, + Iir_Kind_Low_Array_Attribute => 1570, + Iir_Kind_Length_Array_Attribute => 1577, + Iir_Kind_Ascending_Array_Attribute => 1584, + Iir_Kind_Range_Array_Attribute => 1591, + Iir_Kind_Reverse_Range_Array_Attribute => 1598, + Iir_Kind_Attribute_Name => 1606 ); function Get_Fields (K : Iir_Kind) return Fields_Array @@ -7771,7 +7772,8 @@ package body Nodes_Meta is begin case K is when Iir_Kind_Design_File - | Iir_Kind_Design_Unit => + | Iir_Kind_Design_Unit + | Iir_Kind_Library_Declaration => return True; when others => return False; |