aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/vhdl-elocations.adb1
-rw-r--r--src/vhdl/vhdl-elocations.ads2
-rw-r--r--src/vhdl/vhdl-errors.adb3
-rw-r--r--src/vhdl/vhdl-nodes.adb17
-rw-r--r--src/vhdl/vhdl-nodes.ads31
-rw-r--r--src/vhdl/vhdl-nodes_meta.adb683
-rw-r--r--src/vhdl/vhdl-nodes_meta.ads4
-rw-r--r--src/vhdl/vhdl-utils.adb8
-rw-r--r--src/vhdl/vhdl-utils.ads1
9 files changed, 432 insertions, 318 deletions
diff --git a/src/vhdl/vhdl-elocations.adb b/src/vhdl/vhdl-elocations.adb
index c00aa0c13..059e02e8b 100644
--- a/src/vhdl/vhdl-elocations.adb
+++ b/src/vhdl/vhdl-elocations.adb
@@ -207,6 +207,7 @@ package body Vhdl.Elocations is
| Iir_Kind_Error
| Iir_Kind_Design_File
| Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Use_Clause
| Iir_Kind_Context_Reference
| Iir_Kind_Integer_Literal
diff --git a/src/vhdl/vhdl-elocations.ads b/src/vhdl/vhdl-elocations.ads
index 8358645bf..51a9d7038 100644
--- a/src/vhdl/vhdl-elocations.ads
+++ b/src/vhdl/vhdl-elocations.ads
@@ -124,6 +124,8 @@ package Vhdl.Elocations is
-- Declarations --
-------------------
+ -- Iir_Kind_Foreign_Module (None)
+
-- Iir_Kind_Entity_Declaration (L6)
--
-- Get/Set_Start_Location (Field1)
diff --git a/src/vhdl/vhdl-errors.adb b/src/vhdl/vhdl-errors.adb
index a03dfe1ab..69e4a0860 100644
--- a/src/vhdl/vhdl-errors.adb
+++ b/src/vhdl/vhdl-errors.adb
@@ -522,6 +522,9 @@ package body Vhdl.Errors is
| Iir_Kind_Function_Body =>
return "subprogram body";
+ when Iir_Kind_Foreign_Module =>
+ return Disp_Identifier (Node, "foreign module");
+
when Iir_Kind_Package_Declaration =>
return Disp_Identifier (Node, "package");
when Iir_Kind_Package_Body =>
diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb
index d4ed0e97b..8acd7f6ac 100644
--- a/src/vhdl/vhdl-nodes.adb
+++ b/src/vhdl/vhdl-nodes.adb
@@ -1241,6 +1241,7 @@ package body Vhdl.Nodes is
return Format_Short;
when Iir_Kind_Design_File
| Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Block_Header
| Iir_Kind_Binding_Indication
| Iir_Kind_Signature
@@ -7356,4 +7357,20 @@ package body Vhdl.Nodes is
Set_Field3 (N, Clk);
end Set_Default_Clock;
+ function Get_Foreign_Node (N : Iir) return Int32 is
+ begin
+ pragma Assert (N /= Null_Iir);
+ pragma Assert (Has_Foreign_Node (Get_Kind (N)),
+ "no field Foreign_Node");
+ return Iir_To_Int32 (Get_Field1 (N));
+ end Get_Foreign_Node;
+
+ procedure Set_Foreign_Node (N : Iir; En : Int32) is
+ begin
+ pragma Assert (N /= Null_Iir);
+ pragma Assert (Has_Foreign_Node (Get_Kind (N)),
+ "no field Foreign_Node");
+ Set_Field1 (N, Int32_To_Iir (En));
+ end Set_Foreign_Node;
+
end Vhdl.Nodes;
diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads
index d86ebdf86..7d79ca43d 100644
--- a/src/vhdl/vhdl-nodes.ads
+++ b/src/vhdl/vhdl-nodes.ads
@@ -203,6 +203,7 @@ package Vhdl.Nodes is
--
-- Get/Set_Last_Design_Unit (Field6)
--
+ -- Source file entry for this file.
-- Get/Set_Design_File_Source (Field7)
--
-- Identifier for the design file file name and dirname.
@@ -266,6 +267,25 @@ package Vhdl.Nodes is
-- Get/Set_Configuration_Mark_Flag (Flag4)
-- Get/Set_Configuration_Done_Flag (Flag5)
+ -- Iir_Kind_Foreign_Module (Medium)
+ --
+ -- Get/Set_Design_File (Field0)
+ -- Get/Set_Parent (Alias Field0)
+ --
+ -- Get/Set_Identifier (Field3)
+ --
+ -- Get/Set_Foreign_Node (Field1)
+ --
+ -- Get/Set_Date (Field4)
+ --
+ -- Get/Set_Chain (Field2)
+ --
+ -- Get/Set_Hash_Chain (Field7)
+ --
+ -- Get/Set_Date_State (State1)
+ --
+ -- Get/Set_Elab_Flag (Flag3)
+
-- Iir_Kind_Library_Clause (Short)
--
-- LRM08 13.2 Design libraries
@@ -4821,7 +4841,10 @@ package Vhdl.Nodes is
Iir_Kind_Error,
Iir_Kind_Design_File,
+
Iir_Kind_Design_Unit,
+ Iir_Kind_Foreign_Module,
+
Iir_Kind_Library_Clause,
Iir_Kind_Use_Clause,
Iir_Kind_Context_Reference,
@@ -6351,6 +6374,10 @@ package Vhdl.Nodes is
--Iir_Kind_Package_Body
Iir_Kind_Architecture_Body;
+ subtype Iir_Kinds_Design_Unit is Iir_Kind range
+ Iir_Kind_Design_Unit ..
+ Iir_Kind_Foreign_Module;
+
subtype Iir_Kinds_Primary_Unit is Iir_Kind range
Iir_Kind_Entity_Declaration ..
--Iir_Kind_Configuration_Declaration
@@ -9252,4 +9279,8 @@ package Vhdl.Nodes is
-- Field: Field3 Ref
function Get_Default_Clock (N : Iir) return Iir;
procedure Set_Default_Clock (N : Iir; Clk : Iir);
+
+ -- Field: Field1 (uc)
+ function Get_Foreign_Node (N : Iir) return Int32;
+ procedure Set_Foreign_Node (N : Iir; En : Int32);
end Vhdl.Nodes;
diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb
index dddfbb467..bd85e083c 100644
--- a/src/vhdl/vhdl-nodes_meta.adb
+++ b/src/vhdl/vhdl-nodes_meta.adb
@@ -386,7 +386,8 @@ package body Vhdl.Nodes_Meta is
Field_PSL_EOS_Flag => Type_Boolean,
Field_Count_Expression => Type_Iir,
Field_Clock_Expression => Type_Iir,
- Field_Default_Clock => Type_Iir
+ Field_Default_Clock => Type_Iir,
+ Field_Foreign_Node => Type_Int32
);
function Get_Field_Type (F : Fields_Enum) return Types_Enum is
@@ -1137,6 +1138,8 @@ package body Vhdl.Nodes_Meta is
return "clock_expression";
when Field_Default_Clock =>
return "default_clock";
+ when Field_Foreign_Node =>
+ return "foreign_node";
end case;
end Get_Field_Image;
@@ -1151,6 +1154,8 @@ package body Vhdl.Nodes_Meta is
return "design_file";
when Iir_Kind_Design_Unit =>
return "design_unit";
+ when Iir_Kind_Foreign_Module =>
+ return "foreign_module";
when Iir_Kind_Library_Clause =>
return "library_clause";
when Iir_Kind_Use_Clause =>
@@ -2523,6 +2528,8 @@ package body Vhdl.Nodes_Meta is
return Attr_None;
when Field_Default_Clock =>
return Attr_Ref;
+ when Field_Foreign_Node =>
+ return Attr_None;
end case;
end Get_Field_Attribute;
@@ -2566,6 +2573,15 @@ package body Vhdl.Nodes_Meta is
Field_Hash_Chain,
Field_Dependence_List,
Field_Analysis_Checks_List,
+ -- Iir_Kind_Foreign_Module
+ Field_Foreign_Node,
+ Field_Identifier,
+ Field_Date,
+ Field_Elab_Flag,
+ Field_Date_State,
+ Field_Design_File,
+ Field_Chain,
+ Field_Hash_Chain,
-- Iir_Kind_Library_Clause
Field_Identifier,
Field_Has_Identifier_List,
@@ -5232,319 +5248,320 @@ package body Vhdl.Nodes_Meta is
Iir_Kind_Error => 6,
Iir_Kind_Design_File => 17,
Iir_Kind_Design_Unit => 33,
- Iir_Kind_Library_Clause => 38,
- Iir_Kind_Use_Clause => 42,
- Iir_Kind_Context_Reference => 46,
- Iir_Kind_Integer_Literal => 51,
- Iir_Kind_Floating_Point_Literal => 56,
- Iir_Kind_Null_Literal => 58,
- Iir_Kind_String_Literal8 => 69,
- Iir_Kind_Physical_Int_Literal => 75,
- Iir_Kind_Physical_Fp_Literal => 81,
- Iir_Kind_Simple_Aggregate => 86,
- Iir_Kind_Overflow_Literal => 89,
- Iir_Kind_Unaffected_Waveform => 90,
- Iir_Kind_Waveform_Element => 93,
- Iir_Kind_Conditional_Waveform => 97,
- Iir_Kind_Conditional_Expression => 101,
- Iir_Kind_Association_Element_By_Expression => 109,
- Iir_Kind_Association_Element_By_Individual => 118,
- Iir_Kind_Association_Element_Open => 124,
- Iir_Kind_Association_Element_Package => 130,
- Iir_Kind_Association_Element_Type => 138,
- Iir_Kind_Association_Element_Subprogram => 144,
- Iir_Kind_Association_Element_Terminal => 150,
- Iir_Kind_Choice_By_Range => 158,
- Iir_Kind_Choice_By_Expression => 166,
- Iir_Kind_Choice_By_Others => 172,
- Iir_Kind_Choice_By_None => 178,
- Iir_Kind_Choice_By_Name => 185,
- Iir_Kind_Entity_Aspect_Entity => 187,
- Iir_Kind_Entity_Aspect_Configuration => 188,
- Iir_Kind_Entity_Aspect_Open => 188,
- Iir_Kind_Psl_Hierarchical_Name => 190,
- Iir_Kind_Block_Configuration => 196,
- Iir_Kind_Block_Header => 200,
- Iir_Kind_Component_Configuration => 207,
- Iir_Kind_Binding_Indication => 211,
- Iir_Kind_Entity_Class => 213,
- Iir_Kind_Attribute_Value => 221,
- Iir_Kind_Signature => 224,
- Iir_Kind_Aggregate_Info => 231,
- Iir_Kind_Procedure_Call => 235,
- Iir_Kind_Record_Element_Constraint => 243,
- Iir_Kind_Array_Element_Resolution => 245,
- Iir_Kind_Record_Resolution => 246,
- Iir_Kind_Record_Element_Resolution => 249,
- Iir_Kind_Break_Element => 253,
- Iir_Kind_Attribute_Specification => 262,
- Iir_Kind_Disconnection_Specification => 268,
- Iir_Kind_Step_Limit_Specification => 274,
- Iir_Kind_Configuration_Specification => 280,
- Iir_Kind_Access_Type_Definition => 287,
- Iir_Kind_Incomplete_Type_Definition => 294,
- Iir_Kind_Interface_Type_Definition => 300,
- Iir_Kind_File_Type_Definition => 306,
- Iir_Kind_Protected_Type_Declaration => 315,
- Iir_Kind_Record_Type_Definition => 325,
- Iir_Kind_Array_Type_Definition => 336,
- Iir_Kind_Array_Subtype_Definition => 353,
- Iir_Kind_Record_Subtype_Definition => 366,
- Iir_Kind_Access_Subtype_Definition => 374,
- Iir_Kind_Physical_Subtype_Definition => 384,
- Iir_Kind_Floating_Subtype_Definition => 395,
- Iir_Kind_Integer_Subtype_Definition => 405,
- Iir_Kind_Enumeration_Subtype_Definition => 415,
- Iir_Kind_Enumeration_Type_Definition => 426,
- Iir_Kind_Integer_Type_Definition => 434,
- Iir_Kind_Floating_Type_Definition => 442,
- Iir_Kind_Physical_Type_Definition => 453,
- Iir_Kind_Range_Expression => 461,
- Iir_Kind_Protected_Type_Body => 469,
- Iir_Kind_Wildcard_Type_Definition => 473,
- Iir_Kind_Subtype_Definition => 480,
- Iir_Kind_Scalar_Nature_Definition => 488,
- Iir_Kind_Record_Nature_Definition => 501,
- Iir_Kind_Array_Nature_Definition => 515,
- Iir_Kind_Array_Subnature_Definition => 530,
- Iir_Kind_Overload_List => 531,
- Iir_Kind_Entity_Declaration => 544,
- Iir_Kind_Configuration_Declaration => 554,
- Iir_Kind_Context_Declaration => 560,
- Iir_Kind_Package_Declaration => 575,
- Iir_Kind_Package_Instantiation_Declaration => 589,
- Iir_Kind_Vmode_Declaration => 601,
- Iir_Kind_Vprop_Declaration => 613,
- Iir_Kind_Vunit_Declaration => 626,
- Iir_Kind_Package_Body => 634,
- Iir_Kind_Architecture_Body => 647,
- Iir_Kind_Type_Declaration => 654,
- Iir_Kind_Anonymous_Type_Declaration => 660,
- Iir_Kind_Subtype_Declaration => 668,
- Iir_Kind_Nature_Declaration => 674,
- Iir_Kind_Subnature_Declaration => 681,
- Iir_Kind_Package_Header => 683,
- Iir_Kind_Unit_Declaration => 692,
- Iir_Kind_Library_Declaration => 700,
- Iir_Kind_Component_Declaration => 710,
- Iir_Kind_Attribute_Declaration => 717,
- Iir_Kind_Group_Template_Declaration => 723,
- Iir_Kind_Group_Declaration => 730,
- Iir_Kind_Element_Declaration => 738,
- Iir_Kind_Nature_Element_Declaration => 745,
- Iir_Kind_Non_Object_Alias_Declaration => 753,
- Iir_Kind_Psl_Declaration => 761,
- Iir_Kind_Psl_Endpoint_Declaration => 775,
- Iir_Kind_Enumeration_Literal => 786,
- Iir_Kind_Function_Declaration => 811,
- Iir_Kind_Procedure_Declaration => 835,
- Iir_Kind_Function_Body => 845,
- Iir_Kind_Procedure_Body => 856,
- Iir_Kind_Function_Instantiation_Declaration => 867,
- Iir_Kind_Procedure_Instantiation_Declaration => 877,
- Iir_Kind_Terminal_Declaration => 886,
- Iir_Kind_Object_Alias_Declaration => 898,
- Iir_Kind_Free_Quantity_Declaration => 910,
- Iir_Kind_Spectrum_Quantity_Declaration => 923,
- Iir_Kind_Noise_Quantity_Declaration => 935,
- Iir_Kind_Across_Quantity_Declaration => 951,
- Iir_Kind_Through_Quantity_Declaration => 967,
- Iir_Kind_File_Declaration => 982,
- Iir_Kind_Guard_Signal_Declaration => 996,
- Iir_Kind_Signal_Declaration => 1013,
- Iir_Kind_Variable_Declaration => 1026,
- Iir_Kind_Constant_Declaration => 1040,
- Iir_Kind_Iterator_Declaration => 1052,
- Iir_Kind_Interface_Constant_Declaration => 1069,
- Iir_Kind_Interface_Variable_Declaration => 1085,
- Iir_Kind_Interface_Signal_Declaration => 1106,
- Iir_Kind_Interface_File_Declaration => 1122,
- Iir_Kind_Interface_Quantity_Declaration => 1138,
- Iir_Kind_Interface_Terminal_Declaration => 1150,
- Iir_Kind_Interface_Type_Declaration => 1161,
- Iir_Kind_Interface_Package_Declaration => 1174,
- Iir_Kind_Interface_Function_Declaration => 1192,
- Iir_Kind_Interface_Procedure_Declaration => 1206,
- Iir_Kind_Anonymous_Signal_Declaration => 1215,
- Iir_Kind_Signal_Attribute_Declaration => 1218,
- Iir_Kind_Identity_Operator => 1222,
- Iir_Kind_Negation_Operator => 1226,
- Iir_Kind_Absolute_Operator => 1230,
- Iir_Kind_Not_Operator => 1234,
- Iir_Kind_Implicit_Condition_Operator => 1238,
- Iir_Kind_Condition_Operator => 1242,
- Iir_Kind_Reduction_And_Operator => 1246,
- Iir_Kind_Reduction_Or_Operator => 1250,
- Iir_Kind_Reduction_Nand_Operator => 1254,
- Iir_Kind_Reduction_Nor_Operator => 1258,
- Iir_Kind_Reduction_Xor_Operator => 1262,
- Iir_Kind_Reduction_Xnor_Operator => 1266,
- Iir_Kind_And_Operator => 1271,
- Iir_Kind_Or_Operator => 1276,
- Iir_Kind_Nand_Operator => 1281,
- Iir_Kind_Nor_Operator => 1286,
- Iir_Kind_Xor_Operator => 1291,
- Iir_Kind_Xnor_Operator => 1296,
- Iir_Kind_Equality_Operator => 1301,
- Iir_Kind_Inequality_Operator => 1306,
- Iir_Kind_Less_Than_Operator => 1311,
- Iir_Kind_Less_Than_Or_Equal_Operator => 1316,
- Iir_Kind_Greater_Than_Operator => 1321,
- Iir_Kind_Greater_Than_Or_Equal_Operator => 1326,
- Iir_Kind_Match_Equality_Operator => 1331,
- Iir_Kind_Match_Inequality_Operator => 1336,
- Iir_Kind_Match_Less_Than_Operator => 1341,
- Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1346,
- Iir_Kind_Match_Greater_Than_Operator => 1351,
- Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1356,
- Iir_Kind_Sll_Operator => 1361,
- Iir_Kind_Sla_Operator => 1366,
- Iir_Kind_Srl_Operator => 1371,
- Iir_Kind_Sra_Operator => 1376,
- Iir_Kind_Rol_Operator => 1381,
- Iir_Kind_Ror_Operator => 1386,
- Iir_Kind_Addition_Operator => 1391,
- Iir_Kind_Substraction_Operator => 1396,
- Iir_Kind_Concatenation_Operator => 1401,
- Iir_Kind_Multiplication_Operator => 1406,
- Iir_Kind_Division_Operator => 1411,
- Iir_Kind_Modulus_Operator => 1416,
- Iir_Kind_Remainder_Operator => 1421,
- Iir_Kind_Exponentiation_Operator => 1426,
- Iir_Kind_Function_Call => 1434,
- Iir_Kind_Aggregate => 1441,
- Iir_Kind_Parenthesis_Expression => 1444,
- Iir_Kind_Qualified_Expression => 1448,
- Iir_Kind_Type_Conversion => 1453,
- Iir_Kind_Allocator_By_Expression => 1458,
- Iir_Kind_Allocator_By_Subtype => 1464,
- Iir_Kind_Selected_Element => 1472,
- Iir_Kind_Dereference => 1477,
- Iir_Kind_Implicit_Dereference => 1482,
- Iir_Kind_Slice_Name => 1489,
- Iir_Kind_Indexed_Name => 1495,
- Iir_Kind_Psl_Prev => 1501,
- Iir_Kind_Psl_Stable => 1506,
- Iir_Kind_Psl_Rose => 1511,
- Iir_Kind_Psl_Fell => 1516,
- Iir_Kind_Psl_Onehot => 1519,
- Iir_Kind_Psl_Onehot0 => 1522,
- Iir_Kind_Psl_Expression => 1524,
- Iir_Kind_Sensitized_Process_Statement => 1545,
- Iir_Kind_Process_Statement => 1565,
- Iir_Kind_Concurrent_Simple_Signal_Assignment => 1578,
- Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1591,
- Iir_Kind_Concurrent_Selected_Signal_Assignment => 1605,
- Iir_Kind_Concurrent_Assertion_Statement => 1613,
- Iir_Kind_Concurrent_Procedure_Call_Statement => 1620,
- Iir_Kind_Concurrent_Break_Statement => 1628,
- Iir_Kind_Psl_Assert_Directive => 1641,
- Iir_Kind_Psl_Assume_Directive => 1652,
- Iir_Kind_Psl_Cover_Directive => 1664,
- Iir_Kind_Psl_Restrict_Directive => 1675,
- Iir_Kind_Block_Statement => 1689,
- Iir_Kind_If_Generate_Statement => 1700,
- Iir_Kind_Case_Generate_Statement => 1709,
- Iir_Kind_For_Generate_Statement => 1718,
- Iir_Kind_Component_Instantiation_Statement => 1729,
- Iir_Kind_Psl_Default_Clock => 1733,
- Iir_Kind_Generate_Statement_Body => 1744,
- Iir_Kind_If_Generate_Else_Clause => 1750,
- Iir_Kind_Simple_Simultaneous_Statement => 1757,
- Iir_Kind_Simultaneous_Null_Statement => 1761,
- Iir_Kind_Simultaneous_Procedural_Statement => 1772,
- Iir_Kind_Simultaneous_Case_Statement => 1781,
- Iir_Kind_Simultaneous_If_Statement => 1790,
- Iir_Kind_Simultaneous_Elsif => 1796,
- Iir_Kind_Simple_Signal_Assignment_Statement => 1807,
- Iir_Kind_Conditional_Signal_Assignment_Statement => 1818,
- Iir_Kind_Selected_Waveform_Assignment_Statement => 1830,
- Iir_Kind_Signal_Force_Assignment_Statement => 1840,
- Iir_Kind_Signal_Release_Assignment_Statement => 1849,
- Iir_Kind_Null_Statement => 1853,
- Iir_Kind_Assertion_Statement => 1860,
- Iir_Kind_Report_Statement => 1866,
- Iir_Kind_Wait_Statement => 1874,
- Iir_Kind_Variable_Assignment_Statement => 1881,
- Iir_Kind_Conditional_Variable_Assignment_Statement => 1888,
- Iir_Kind_Return_Statement => 1894,
- Iir_Kind_For_Loop_Statement => 1905,
- Iir_Kind_While_Loop_Statement => 1916,
- Iir_Kind_Next_Statement => 1923,
- Iir_Kind_Exit_Statement => 1930,
- Iir_Kind_Case_Statement => 1938,
- Iir_Kind_Procedure_Call_Statement => 1944,
- Iir_Kind_Break_Statement => 1951,
- Iir_Kind_If_Statement => 1961,
- Iir_Kind_Elsif => 1967,
- Iir_Kind_Character_Literal => 1975,
- Iir_Kind_Simple_Name => 1983,
- Iir_Kind_Selected_Name => 1992,
- Iir_Kind_Operator_Symbol => 1998,
- Iir_Kind_Reference_Name => 2003,
- Iir_Kind_External_Constant_Name => 2012,
- Iir_Kind_External_Signal_Name => 2021,
- Iir_Kind_External_Variable_Name => 2031,
- Iir_Kind_Selected_By_All_Name => 2037,
- Iir_Kind_Parenthesis_Name => 2042,
- Iir_Kind_Package_Pathname => 2046,
- Iir_Kind_Absolute_Pathname => 2047,
- Iir_Kind_Relative_Pathname => 2048,
- Iir_Kind_Pathname_Element => 2053,
- Iir_Kind_Base_Attribute => 2055,
- Iir_Kind_Subtype_Attribute => 2060,
- Iir_Kind_Element_Attribute => 2065,
- Iir_Kind_Across_Attribute => 2070,
- Iir_Kind_Through_Attribute => 2075,
- Iir_Kind_Nature_Reference_Attribute => 2079,
- Iir_Kind_Left_Type_Attribute => 2084,
- Iir_Kind_Right_Type_Attribute => 2089,
- Iir_Kind_High_Type_Attribute => 2094,
- Iir_Kind_Low_Type_Attribute => 2099,
- Iir_Kind_Ascending_Type_Attribute => 2104,
- Iir_Kind_Image_Attribute => 2110,
- Iir_Kind_Value_Attribute => 2116,
- Iir_Kind_Pos_Attribute => 2122,
- Iir_Kind_Val_Attribute => 2128,
- Iir_Kind_Succ_Attribute => 2134,
- Iir_Kind_Pred_Attribute => 2140,
- Iir_Kind_Leftof_Attribute => 2146,
- Iir_Kind_Rightof_Attribute => 2152,
- Iir_Kind_Signal_Slew_Attribute => 2160,
- Iir_Kind_Quantity_Slew_Attribute => 2168,
- Iir_Kind_Ramp_Attribute => 2176,
- Iir_Kind_Zoh_Attribute => 2184,
- Iir_Kind_Ltf_Attribute => 2192,
- Iir_Kind_Ztf_Attribute => 2202,
- Iir_Kind_Dot_Attribute => 2209,
- Iir_Kind_Integ_Attribute => 2216,
- Iir_Kind_Above_Attribute => 2224,
- Iir_Kind_Quantity_Delayed_Attribute => 2232,
- Iir_Kind_Delayed_Attribute => 2241,
- Iir_Kind_Stable_Attribute => 2250,
- Iir_Kind_Quiet_Attribute => 2259,
- Iir_Kind_Transaction_Attribute => 2268,
- Iir_Kind_Event_Attribute => 2272,
- Iir_Kind_Active_Attribute => 2276,
- Iir_Kind_Last_Event_Attribute => 2280,
- Iir_Kind_Last_Active_Attribute => 2284,
- Iir_Kind_Last_Value_Attribute => 2288,
- Iir_Kind_Driving_Attribute => 2292,
- Iir_Kind_Driving_Value_Attribute => 2296,
- Iir_Kind_Behavior_Attribute => 2296,
- Iir_Kind_Structure_Attribute => 2296,
- Iir_Kind_Simple_Name_Attribute => 2303,
- Iir_Kind_Instance_Name_Attribute => 2308,
- Iir_Kind_Path_Name_Attribute => 2313,
- Iir_Kind_Left_Array_Attribute => 2320,
- Iir_Kind_Right_Array_Attribute => 2327,
- Iir_Kind_High_Array_Attribute => 2334,
- Iir_Kind_Low_Array_Attribute => 2341,
- Iir_Kind_Length_Array_Attribute => 2348,
- Iir_Kind_Ascending_Array_Attribute => 2355,
- Iir_Kind_Range_Array_Attribute => 2362,
- Iir_Kind_Reverse_Range_Array_Attribute => 2369,
- Iir_Kind_Attribute_Name => 2378
+ Iir_Kind_Foreign_Module => 41,
+ Iir_Kind_Library_Clause => 46,
+ Iir_Kind_Use_Clause => 50,
+ Iir_Kind_Context_Reference => 54,
+ Iir_Kind_Integer_Literal => 59,
+ Iir_Kind_Floating_Point_Literal => 64,
+ Iir_Kind_Null_Literal => 66,
+ Iir_Kind_String_Literal8 => 77,
+ Iir_Kind_Physical_Int_Literal => 83,
+ Iir_Kind_Physical_Fp_Literal => 89,
+ Iir_Kind_Simple_Aggregate => 94,
+ Iir_Kind_Overflow_Literal => 97,
+ Iir_Kind_Unaffected_Waveform => 98,
+ Iir_Kind_Waveform_Element => 101,
+ Iir_Kind_Conditional_Waveform => 105,
+ Iir_Kind_Conditional_Expression => 109,
+ Iir_Kind_Association_Element_By_Expression => 117,
+ Iir_Kind_Association_Element_By_Individual => 126,
+ Iir_Kind_Association_Element_Open => 132,
+ Iir_Kind_Association_Element_Package => 138,
+ Iir_Kind_Association_Element_Type => 146,
+ Iir_Kind_Association_Element_Subprogram => 152,
+ Iir_Kind_Association_Element_Terminal => 158,
+ Iir_Kind_Choice_By_Range => 166,
+ Iir_Kind_Choice_By_Expression => 174,
+ Iir_Kind_Choice_By_Others => 180,
+ Iir_Kind_Choice_By_None => 186,
+ Iir_Kind_Choice_By_Name => 193,
+ Iir_Kind_Entity_Aspect_Entity => 195,
+ Iir_Kind_Entity_Aspect_Configuration => 196,
+ Iir_Kind_Entity_Aspect_Open => 196,
+ Iir_Kind_Psl_Hierarchical_Name => 198,
+ Iir_Kind_Block_Configuration => 204,
+ Iir_Kind_Block_Header => 208,
+ Iir_Kind_Component_Configuration => 215,
+ Iir_Kind_Binding_Indication => 219,
+ Iir_Kind_Entity_Class => 221,
+ Iir_Kind_Attribute_Value => 229,
+ Iir_Kind_Signature => 232,
+ Iir_Kind_Aggregate_Info => 239,
+ Iir_Kind_Procedure_Call => 243,
+ Iir_Kind_Record_Element_Constraint => 251,
+ Iir_Kind_Array_Element_Resolution => 253,
+ Iir_Kind_Record_Resolution => 254,
+ Iir_Kind_Record_Element_Resolution => 257,
+ Iir_Kind_Break_Element => 261,
+ Iir_Kind_Attribute_Specification => 270,
+ Iir_Kind_Disconnection_Specification => 276,
+ Iir_Kind_Step_Limit_Specification => 282,
+ Iir_Kind_Configuration_Specification => 288,
+ Iir_Kind_Access_Type_Definition => 295,
+ Iir_Kind_Incomplete_Type_Definition => 302,
+ Iir_Kind_Interface_Type_Definition => 308,
+ Iir_Kind_File_Type_Definition => 314,
+ Iir_Kind_Protected_Type_Declaration => 323,
+ Iir_Kind_Record_Type_Definition => 333,
+ Iir_Kind_Array_Type_Definition => 344,
+ Iir_Kind_Array_Subtype_Definition => 361,
+ Iir_Kind_Record_Subtype_Definition => 374,
+ Iir_Kind_Access_Subtype_Definition => 382,
+ Iir_Kind_Physical_Subtype_Definition => 392,
+ Iir_Kind_Floating_Subtype_Definition => 403,
+ Iir_Kind_Integer_Subtype_Definition => 413,
+ Iir_Kind_Enumeration_Subtype_Definition => 423,
+ Iir_Kind_Enumeration_Type_Definition => 434,
+ Iir_Kind_Integer_Type_Definition => 442,
+ Iir_Kind_Floating_Type_Definition => 450,
+ Iir_Kind_Physical_Type_Definition => 461,
+ Iir_Kind_Range_Expression => 469,
+ Iir_Kind_Protected_Type_Body => 477,
+ Iir_Kind_Wildcard_Type_Definition => 481,
+ Iir_Kind_Subtype_Definition => 488,
+ Iir_Kind_Scalar_Nature_Definition => 496,
+ Iir_Kind_Record_Nature_Definition => 509,
+ Iir_Kind_Array_Nature_Definition => 523,
+ Iir_Kind_Array_Subnature_Definition => 538,
+ Iir_Kind_Overload_List => 539,
+ Iir_Kind_Entity_Declaration => 552,
+ Iir_Kind_Configuration_Declaration => 562,
+ Iir_Kind_Context_Declaration => 568,
+ Iir_Kind_Package_Declaration => 583,
+ Iir_Kind_Package_Instantiation_Declaration => 597,
+ Iir_Kind_Vmode_Declaration => 609,
+ Iir_Kind_Vprop_Declaration => 621,
+ Iir_Kind_Vunit_Declaration => 634,
+ Iir_Kind_Package_Body => 642,
+ Iir_Kind_Architecture_Body => 655,
+ Iir_Kind_Type_Declaration => 662,
+ Iir_Kind_Anonymous_Type_Declaration => 668,
+ Iir_Kind_Subtype_Declaration => 676,
+ Iir_Kind_Nature_Declaration => 682,
+ Iir_Kind_Subnature_Declaration => 689,
+ Iir_Kind_Package_Header => 691,
+ Iir_Kind_Unit_Declaration => 700,
+ Iir_Kind_Library_Declaration => 708,
+ Iir_Kind_Component_Declaration => 718,
+ Iir_Kind_Attribute_Declaration => 725,
+ Iir_Kind_Group_Template_Declaration => 731,
+ Iir_Kind_Group_Declaration => 738,
+ Iir_Kind_Element_Declaration => 746,
+ Iir_Kind_Nature_Element_Declaration => 753,
+ Iir_Kind_Non_Object_Alias_Declaration => 761,
+ Iir_Kind_Psl_Declaration => 769,
+ Iir_Kind_Psl_Endpoint_Declaration => 783,
+ Iir_Kind_Enumeration_Literal => 794,
+ Iir_Kind_Function_Declaration => 819,
+ Iir_Kind_Procedure_Declaration => 843,
+ Iir_Kind_Function_Body => 853,
+ Iir_Kind_Procedure_Body => 864,
+ Iir_Kind_Function_Instantiation_Declaration => 875,
+ Iir_Kind_Procedure_Instantiation_Declaration => 885,
+ Iir_Kind_Terminal_Declaration => 894,
+ Iir_Kind_Object_Alias_Declaration => 906,
+ Iir_Kind_Free_Quantity_Declaration => 918,
+ Iir_Kind_Spectrum_Quantity_Declaration => 931,
+ Iir_Kind_Noise_Quantity_Declaration => 943,
+ Iir_Kind_Across_Quantity_Declaration => 959,
+ Iir_Kind_Through_Quantity_Declaration => 975,
+ Iir_Kind_File_Declaration => 990,
+ Iir_Kind_Guard_Signal_Declaration => 1004,
+ Iir_Kind_Signal_Declaration => 1021,
+ Iir_Kind_Variable_Declaration => 1034,
+ Iir_Kind_Constant_Declaration => 1048,
+ Iir_Kind_Iterator_Declaration => 1060,
+ Iir_Kind_Interface_Constant_Declaration => 1077,
+ Iir_Kind_Interface_Variable_Declaration => 1093,
+ Iir_Kind_Interface_Signal_Declaration => 1114,
+ Iir_Kind_Interface_File_Declaration => 1130,
+ Iir_Kind_Interface_Quantity_Declaration => 1146,
+ Iir_Kind_Interface_Terminal_Declaration => 1158,
+ Iir_Kind_Interface_Type_Declaration => 1169,
+ Iir_Kind_Interface_Package_Declaration => 1182,
+ Iir_Kind_Interface_Function_Declaration => 1200,
+ Iir_Kind_Interface_Procedure_Declaration => 1214,
+ Iir_Kind_Anonymous_Signal_Declaration => 1223,
+ Iir_Kind_Signal_Attribute_Declaration => 1226,
+ Iir_Kind_Identity_Operator => 1230,
+ Iir_Kind_Negation_Operator => 1234,
+ Iir_Kind_Absolute_Operator => 1238,
+ Iir_Kind_Not_Operator => 1242,
+ Iir_Kind_Implicit_Condition_Operator => 1246,
+ Iir_Kind_Condition_Operator => 1250,
+ Iir_Kind_Reduction_And_Operator => 1254,
+ Iir_Kind_Reduction_Or_Operator => 1258,
+ Iir_Kind_Reduction_Nand_Operator => 1262,
+ Iir_Kind_Reduction_Nor_Operator => 1266,
+ Iir_Kind_Reduction_Xor_Operator => 1270,
+ Iir_Kind_Reduction_Xnor_Operator => 1274,
+ Iir_Kind_And_Operator => 1279,
+ Iir_Kind_Or_Operator => 1284,
+ Iir_Kind_Nand_Operator => 1289,
+ Iir_Kind_Nor_Operator => 1294,
+ Iir_Kind_Xor_Operator => 1299,
+ Iir_Kind_Xnor_Operator => 1304,
+ Iir_Kind_Equality_Operator => 1309,
+ Iir_Kind_Inequality_Operator => 1314,
+ Iir_Kind_Less_Than_Operator => 1319,
+ Iir_Kind_Less_Than_Or_Equal_Operator => 1324,
+ Iir_Kind_Greater_Than_Operator => 1329,
+ Iir_Kind_Greater_Than_Or_Equal_Operator => 1334,
+ Iir_Kind_Match_Equality_Operator => 1339,
+ Iir_Kind_Match_Inequality_Operator => 1344,
+ Iir_Kind_Match_Less_Than_Operator => 1349,
+ Iir_Kind_Match_Less_Than_Or_Equal_Operator => 1354,
+ Iir_Kind_Match_Greater_Than_Operator => 1359,
+ Iir_Kind_Match_Greater_Than_Or_Equal_Operator => 1364,
+ Iir_Kind_Sll_Operator => 1369,
+ Iir_Kind_Sla_Operator => 1374,
+ Iir_Kind_Srl_Operator => 1379,
+ Iir_Kind_Sra_Operator => 1384,
+ Iir_Kind_Rol_Operator => 1389,
+ Iir_Kind_Ror_Operator => 1394,
+ Iir_Kind_Addition_Operator => 1399,
+ Iir_Kind_Substraction_Operator => 1404,
+ Iir_Kind_Concatenation_Operator => 1409,
+ Iir_Kind_Multiplication_Operator => 1414,
+ Iir_Kind_Division_Operator => 1419,
+ Iir_Kind_Modulus_Operator => 1424,
+ Iir_Kind_Remainder_Operator => 1429,
+ Iir_Kind_Exponentiation_Operator => 1434,
+ Iir_Kind_Function_Call => 1442,
+ Iir_Kind_Aggregate => 1449,
+ Iir_Kind_Parenthesis_Expression => 1452,
+ Iir_Kind_Qualified_Expression => 1456,
+ Iir_Kind_Type_Conversion => 1461,
+ Iir_Kind_Allocator_By_Expression => 1466,
+ Iir_Kind_Allocator_By_Subtype => 1472,
+ Iir_Kind_Selected_Element => 1480,
+ Iir_Kind_Dereference => 1485,
+ Iir_Kind_Implicit_Dereference => 1490,
+ Iir_Kind_Slice_Name => 1497,
+ Iir_Kind_Indexed_Name => 1503,
+ Iir_Kind_Psl_Prev => 1509,
+ Iir_Kind_Psl_Stable => 1514,
+ Iir_Kind_Psl_Rose => 1519,
+ Iir_Kind_Psl_Fell => 1524,
+ Iir_Kind_Psl_Onehot => 1527,
+ Iir_Kind_Psl_Onehot0 => 1530,
+ Iir_Kind_Psl_Expression => 1532,
+ Iir_Kind_Sensitized_Process_Statement => 1553,
+ Iir_Kind_Process_Statement => 1573,
+ Iir_Kind_Concurrent_Simple_Signal_Assignment => 1586,
+ Iir_Kind_Concurrent_Conditional_Signal_Assignment => 1599,
+ Iir_Kind_Concurrent_Selected_Signal_Assignment => 1613,
+ Iir_Kind_Concurrent_Assertion_Statement => 1621,
+ Iir_Kind_Concurrent_Procedure_Call_Statement => 1628,
+ Iir_Kind_Concurrent_Break_Statement => 1636,
+ Iir_Kind_Psl_Assert_Directive => 1649,
+ Iir_Kind_Psl_Assume_Directive => 1660,
+ Iir_Kind_Psl_Cover_Directive => 1672,
+ Iir_Kind_Psl_Restrict_Directive => 1683,
+ Iir_Kind_Block_Statement => 1697,
+ Iir_Kind_If_Generate_Statement => 1708,
+ Iir_Kind_Case_Generate_Statement => 1717,
+ Iir_Kind_For_Generate_Statement => 1726,
+ Iir_Kind_Component_Instantiation_Statement => 1737,
+ Iir_Kind_Psl_Default_Clock => 1741,
+ Iir_Kind_Generate_Statement_Body => 1752,
+ Iir_Kind_If_Generate_Else_Clause => 1758,
+ Iir_Kind_Simple_Simultaneous_Statement => 1765,
+ Iir_Kind_Simultaneous_Null_Statement => 1769,
+ Iir_Kind_Simultaneous_Procedural_Statement => 1780,
+ Iir_Kind_Simultaneous_Case_Statement => 1789,
+ Iir_Kind_Simultaneous_If_Statement => 1798,
+ Iir_Kind_Simultaneous_Elsif => 1804,
+ Iir_Kind_Simple_Signal_Assignment_Statement => 1815,
+ Iir_Kind_Conditional_Signal_Assignment_Statement => 1826,
+ Iir_Kind_Selected_Waveform_Assignment_Statement => 1838,
+ Iir_Kind_Signal_Force_Assignment_Statement => 1848,
+ Iir_Kind_Signal_Release_Assignment_Statement => 1857,
+ Iir_Kind_Null_Statement => 1861,
+ Iir_Kind_Assertion_Statement => 1868,
+ Iir_Kind_Report_Statement => 1874,
+ Iir_Kind_Wait_Statement => 1882,
+ Iir_Kind_Variable_Assignment_Statement => 1889,
+ Iir_Kind_Conditional_Variable_Assignment_Statement => 1896,
+ Iir_Kind_Return_Statement => 1902,
+ Iir_Kind_For_Loop_Statement => 1913,
+ Iir_Kind_While_Loop_Statement => 1924,
+ Iir_Kind_Next_Statement => 1931,
+ Iir_Kind_Exit_Statement => 1938,
+ Iir_Kind_Case_Statement => 1946,
+ Iir_Kind_Procedure_Call_Statement => 1952,
+ Iir_Kind_Break_Statement => 1959,
+ Iir_Kind_If_Statement => 1969,
+ Iir_Kind_Elsif => 1975,
+ Iir_Kind_Character_Literal => 1983,
+ Iir_Kind_Simple_Name => 1991,
+ Iir_Kind_Selected_Name => 2000,
+ Iir_Kind_Operator_Symbol => 2006,
+ Iir_Kind_Reference_Name => 2011,
+ Iir_Kind_External_Constant_Name => 2020,
+ Iir_Kind_External_Signal_Name => 2029,
+ Iir_Kind_External_Variable_Name => 2039,
+ Iir_Kind_Selected_By_All_Name => 2045,
+ Iir_Kind_Parenthesis_Name => 2050,
+ Iir_Kind_Package_Pathname => 2054,
+ Iir_Kind_Absolute_Pathname => 2055,
+ Iir_Kind_Relative_Pathname => 2056,
+ Iir_Kind_Pathname_Element => 2061,
+ Iir_Kind_Base_Attribute => 2063,
+ Iir_Kind_Subtype_Attribute => 2068,
+ Iir_Kind_Element_Attribute => 2073,
+ Iir_Kind_Across_Attribute => 2078,
+ Iir_Kind_Through_Attribute => 2083,
+ Iir_Kind_Nature_Reference_Attribute => 2087,
+ Iir_Kind_Left_Type_Attribute => 2092,
+ Iir_Kind_Right_Type_Attribute => 2097,
+ Iir_Kind_High_Type_Attribute => 2102,
+ Iir_Kind_Low_Type_Attribute => 2107,
+ Iir_Kind_Ascending_Type_Attribute => 2112,
+ Iir_Kind_Image_Attribute => 2118,
+ Iir_Kind_Value_Attribute => 2124,
+ Iir_Kind_Pos_Attribute => 2130,
+ Iir_Kind_Val_Attribute => 2136,
+ Iir_Kind_Succ_Attribute => 2142,
+ Iir_Kind_Pred_Attribute => 2148,
+ Iir_Kind_Leftof_Attribute => 2154,
+ Iir_Kind_Rightof_Attribute => 2160,
+ Iir_Kind_Signal_Slew_Attribute => 2168,
+ Iir_Kind_Quantity_Slew_Attribute => 2176,
+ Iir_Kind_Ramp_Attribute => 2184,
+ Iir_Kind_Zoh_Attribute => 2192,
+ Iir_Kind_Ltf_Attribute => 2200,
+ Iir_Kind_Ztf_Attribute => 2210,
+ Iir_Kind_Dot_Attribute => 2217,
+ Iir_Kind_Integ_Attribute => 2224,
+ Iir_Kind_Above_Attribute => 2232,
+ Iir_Kind_Quantity_Delayed_Attribute => 2240,
+ Iir_Kind_Delayed_Attribute => 2249,
+ Iir_Kind_Stable_Attribute => 2258,
+ Iir_Kind_Quiet_Attribute => 2267,
+ Iir_Kind_Transaction_Attribute => 2276,
+ Iir_Kind_Event_Attribute => 2280,
+ Iir_Kind_Active_Attribute => 2284,
+ Iir_Kind_Last_Event_Attribute => 2288,
+ Iir_Kind_Last_Active_Attribute => 2292,
+ Iir_Kind_Last_Value_Attribute => 2296,
+ Iir_Kind_Driving_Attribute => 2300,
+ Iir_Kind_Driving_Value_Attribute => 2304,
+ Iir_Kind_Behavior_Attribute => 2304,
+ Iir_Kind_Structure_Attribute => 2304,
+ Iir_Kind_Simple_Name_Attribute => 2311,
+ Iir_Kind_Instance_Name_Attribute => 2316,
+ Iir_Kind_Path_Name_Attribute => 2321,
+ Iir_Kind_Left_Array_Attribute => 2328,
+ Iir_Kind_Right_Array_Attribute => 2335,
+ Iir_Kind_High_Array_Attribute => 2342,
+ Iir_Kind_Low_Array_Attribute => 2349,
+ Iir_Kind_Length_Array_Attribute => 2356,
+ Iir_Kind_Ascending_Array_Attribute => 2363,
+ Iir_Kind_Range_Array_Attribute => 2370,
+ Iir_Kind_Reverse_Range_Array_Attribute => 2377,
+ Iir_Kind_Attribute_Name => 2386
);
function Get_Fields_First (K : Iir_Kind) return Fields_Index is
@@ -7349,6 +7366,8 @@ package body Vhdl.Nodes_Meta is
return Get_Literal_Length (N);
when Field_PSL_Nbr_States =>
return Get_PSL_Nbr_States (N);
+ when Field_Foreign_Node =>
+ return Get_Foreign_Node (N);
when others =>
raise Internal_Error;
end case;
@@ -7369,6 +7388,8 @@ package body Vhdl.Nodes_Meta is
Set_Literal_Length (N, V);
when Field_PSL_Nbr_States =>
Set_PSL_Nbr_States (N, V);
+ when Field_Foreign_Node =>
+ Set_Foreign_Node (N, V);
when others =>
raise Internal_Error;
end case;
@@ -7766,7 +7787,13 @@ package body Vhdl.Nodes_Meta is
function Has_Design_File (K : Iir_Kind) return Boolean is
begin
- return K = Iir_Kind_Design_Unit;
+ case K is
+ when Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module =>
+ return True;
+ when others =>
+ return False;
+ end case;
end Has_Design_File;
function Has_Design_File_Chain (K : Iir_Kind) return Boolean is
@@ -7783,6 +7810,7 @@ package body Vhdl.Nodes_Meta is
begin
case K is
when Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Library_Declaration =>
return True;
when others =>
@@ -7813,7 +7841,13 @@ package body Vhdl.Nodes_Meta is
function Has_Date_State (K : Iir_Kind) return Boolean is
begin
- return K = Iir_Kind_Design_Unit;
+ case K is
+ when Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module =>
+ return True;
+ when others =>
+ return False;
+ end case;
end Has_Date_State;
function Has_Guarded_Target_State (K : Iir_Kind) return Boolean is
@@ -7840,7 +7874,13 @@ package body Vhdl.Nodes_Meta is
function Has_Hash_Chain (K : Iir_Kind) return Boolean is
begin
- return K = Iir_Kind_Design_Unit;
+ case K is
+ when Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module =>
+ return True;
+ when others =>
+ return False;
+ end case;
end Has_Hash_Chain;
function Has_Design_Unit_Source_Pos (K : Iir_Kind) return Boolean is
@@ -8437,6 +8477,7 @@ package body Vhdl.Nodes_Meta is
case K is
when Iir_Kind_Design_File
| Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Library_Clause
| Iir_Kind_Use_Clause
| Iir_Kind_Context_Reference
@@ -9351,6 +9392,7 @@ package body Vhdl.Nodes_Meta is
begin
case K is
when Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Library_Clause
| Iir_Kind_Record_Element_Constraint
| Iir_Kind_Record_Element_Resolution
@@ -10483,6 +10525,7 @@ package body Vhdl.Nodes_Meta is
case K is
when Iir_Kind_Design_File
| Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Library_Declaration =>
return True;
when others =>
@@ -10852,6 +10895,7 @@ package body Vhdl.Nodes_Meta is
case K is
when Iir_Kind_Design_File
| Iir_Kind_Design_Unit
+ | Iir_Kind_Foreign_Module
| Iir_Kind_Library_Clause
| Iir_Kind_Use_Clause
| Iir_Kind_Context_Reference
@@ -12675,4 +12719,9 @@ package body Vhdl.Nodes_Meta is
end case;
end Has_Default_Clock;
+ function Has_Foreign_Node (K : Iir_Kind) return Boolean is
+ begin
+ return K = Iir_Kind_Foreign_Module;
+ end Has_Foreign_Node;
+
end Vhdl.Nodes_Meta;
diff --git a/src/vhdl/vhdl-nodes_meta.ads b/src/vhdl/vhdl-nodes_meta.ads
index 54a02b61e..65ace54bb 100644
--- a/src/vhdl/vhdl-nodes_meta.ads
+++ b/src/vhdl/vhdl-nodes_meta.ads
@@ -430,7 +430,8 @@ package Vhdl.Nodes_Meta is
Field_PSL_EOS_Flag,
Field_Count_Expression,
Field_Clock_Expression,
- Field_Default_Clock
+ Field_Default_Clock,
+ Field_Foreign_Node
);
pragma Discard_Names (Fields_Enum);
@@ -1020,4 +1021,5 @@ package Vhdl.Nodes_Meta is
function Has_Count_Expression (K : Iir_Kind) return Boolean;
function Has_Clock_Expression (K : Iir_Kind) return Boolean;
function Has_Default_Clock (K : Iir_Kind) return Boolean;
+ function Has_Foreign_Node (K : Iir_Kind) return Boolean;
end Vhdl.Nodes_Meta;
diff --git a/src/vhdl/vhdl-utils.adb b/src/vhdl/vhdl-utils.adb
index 35cf51ed8..70596c929 100644
--- a/src/vhdl/vhdl-utils.adb
+++ b/src/vhdl/vhdl-utils.adb
@@ -302,6 +302,7 @@ package body Vhdl.Utils is
| Iir_Kind_Use_Clause
| Iir_Kind_Context_Reference
| Iir_Kind_Library_Declaration
+ | Iir_Kind_Foreign_Module
| Iir_Kinds_Library_Unit
| Iir_Kind_Component_Declaration
| Iir_Kind_Function_Declaration
@@ -1841,6 +1842,13 @@ package body Vhdl.Utils is
return K = K1 or K = K2;
end Kind_In;
+ function Kind_In (N : Iir; K1, K2, K3 : Iir_Kind) return Boolean
+ is
+ K : constant Iir_Kind := Get_Kind (N);
+ begin
+ return K = K1 or K = K2 or K = K3;
+ end Kind_In;
+
procedure Set_Attribute_Parameter
(Attr : Iir; N : Parameter_Index; Param : Iir) is
begin
diff --git a/src/vhdl/vhdl-utils.ads b/src/vhdl/vhdl-utils.ads
index 4d78640eb..fbea75776 100644
--- a/src/vhdl/vhdl-utils.ads
+++ b/src/vhdl/vhdl-utils.ads
@@ -398,6 +398,7 @@ package Vhdl.Utils is
-- Return True IFF kind of N is K1 or K2.
function Kind_In (N : Iir; K1, K2 : Iir_Kind) return Boolean;
+ function Kind_In (N : Iir; K1, K2, K3 : Iir_Kind) return Boolean;
pragma Inline (Kind_In);
subtype Parameter_Index is Natural range 1 .. 4;