diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdlprint.adb | 2 | ||||
-rw-r--r-- | src/psl/psl-nodes.adb | 4 | ||||
-rw-r--r-- | src/psl/psl-nodes.adb.in | 2 | ||||
-rw-r--r-- | src/psl/psl-nodes.ads | 4 | ||||
-rw-r--r-- | src/psl/psl-nodes_meta.adb | 80 | ||||
-rw-r--r-- | src/psl/psl-prints.adb | 22 | ||||
-rw-r--r-- | src/psl/psl-rewrites.adb | 4 | ||||
-rw-r--r-- | src/psl/psl-subsets.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-canon.adb | 11 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.adb | 16 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes.ads | 7 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.adb | 240 | ||||
-rw-r--r-- | src/vhdl/vhdl-nodes_meta.ads | 2 | ||||
-rw-r--r-- | src/vhdl/vhdl-parse_psl.adb | 31 | ||||
-rw-r--r-- | src/vhdl/vhdl-prints.adb | 18 | ||||
-rw-r--r-- | src/vhdl/vhdl-scanner.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-sem_psl.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-tokens.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-tokens.ads | 2 |
19 files changed, 306 insertions, 155 deletions
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb index dc8e649be..8f59bbf65 100644 --- a/src/ghdldrv/ghdlprint.adb +++ b/src/ghdldrv/ghdlprint.adb @@ -423,6 +423,8 @@ package body Ghdlprint is | Tok_Inf | Tok_Within | Tok_Abort + | Tok_Async_Abort + | Tok_Sync_Abort | Tok_Before | Tok_Before_Em | Tok_Before_Un diff --git a/src/psl/psl-nodes.adb b/src/psl/psl-nodes.adb index 108dfe7b2..5eb9cd5f2 100644 --- a/src/psl/psl-nodes.adb +++ b/src/psl/psl-nodes.adb @@ -353,6 +353,8 @@ package body PSL.Nodes is | N_Before | N_Until | N_Abort + | N_Async_Abort + | N_Sync_Abort | N_Strong | N_Property_Parameter | N_Property_Instance => @@ -453,6 +455,8 @@ package body PSL.Nodes is | N_Next_Event_A | N_Next_Event_E | N_Abort + | N_Async_Abort + | N_Sync_Abort | N_Until | N_Before | N_Or_Prop diff --git a/src/psl/psl-nodes.adb.in b/src/psl/psl-nodes.adb.in index a644ebb71..8bbc8290f 100644 --- a/src/psl/psl-nodes.adb.in +++ b/src/psl/psl-nodes.adb.in @@ -353,6 +353,8 @@ package body PSL.Nodes is | N_Before | N_Until | N_Abort + | N_Async_Abort + | N_Sync_Abort | N_Strong | N_Property_Parameter | N_Property_Instance => diff --git a/src/psl/psl-nodes.ads b/src/psl/psl-nodes.ads index c92af81dc..378212349 100644 --- a/src/psl/psl-nodes.ads +++ b/src/psl/psl-nodes.ads @@ -62,6 +62,8 @@ package PSL.Nodes is N_Next_Event_A, N_Next_Event_E, N_Abort, + N_Async_Abort, + N_Sync_Abort, N_Until, N_Before, N_Or_Prop, @@ -380,6 +382,8 @@ package PSL.Nodes is -- Get/Set_Boolean (Field3) -- N_Abort (Short) + -- N_Async_Abort (Short) + -- N_Sync_Abort (Short) -- -- Get/Set_Property (Field4) -- diff --git a/src/psl/psl-nodes_meta.adb b/src/psl/psl-nodes_meta.adb index 92d18b735..b67498780 100644 --- a/src/psl/psl-nodes_meta.adb +++ b/src/psl/psl-nodes_meta.adb @@ -198,6 +198,10 @@ package body PSL.Nodes_Meta is return "next_event_e"; when N_Abort => return "abort"; + when N_Async_Abort => + return "async_abort"; + when N_Sync_Abort => + return "sync_abort"; when N_Until => return "until"; when N_Before => @@ -466,6 +470,12 @@ package body PSL.Nodes_Meta is -- N_Abort Field_Property, Field_Boolean, + -- N_Async_Abort + Field_Property, + Field_Boolean, + -- N_Sync_Abort + Field_Property, + Field_Boolean, -- N_Until Field_Strong_Flag, Field_Inclusive_Flag, @@ -616,38 +626,40 @@ package body PSL.Nodes_Meta is N_Next_Event_A => 86, N_Next_Event_E => 91, N_Abort => 93, - N_Until => 97, - N_Before => 101, - N_Or_Prop => 103, - N_And_Prop => 105, - N_Paren_Prop => 106, - N_Braced_SERE => 107, - N_Concat_SERE => 109, - N_Fusion_SERE => 111, - N_Within_SERE => 113, - N_Clocked_SERE => 115, - N_Match_And_Seq => 117, - N_And_Seq => 119, - N_Or_Seq => 121, - N_Star_Repeat_Seq => 124, - N_Goto_Repeat_Seq => 127, - N_Plus_Repeat_Seq => 128, - N_Equal_Repeat_Seq => 131, - N_Paren_Bool => 135, - N_Not_Bool => 139, - N_And_Bool => 144, - N_Or_Bool => 149, - N_Imp_Bool => 154, - N_Equiv_Bool => 159, - N_HDL_Expr => 161, - N_HDL_Bool => 166, - N_False => 166, - N_True => 166, - N_EOS => 169, - N_Name => 171, - N_Name_Decl => 173, - N_Inf => 173, - N_Number => 174 + N_Async_Abort => 95, + N_Sync_Abort => 97, + N_Until => 101, + N_Before => 105, + N_Or_Prop => 107, + N_And_Prop => 109, + N_Paren_Prop => 110, + N_Braced_SERE => 111, + N_Concat_SERE => 113, + N_Fusion_SERE => 115, + N_Within_SERE => 117, + N_Clocked_SERE => 119, + N_Match_And_Seq => 121, + N_And_Seq => 123, + N_Or_Seq => 125, + N_Star_Repeat_Seq => 128, + N_Goto_Repeat_Seq => 131, + N_Plus_Repeat_Seq => 132, + N_Equal_Repeat_Seq => 135, + N_Paren_Bool => 139, + N_Not_Bool => 143, + N_And_Bool => 148, + N_Or_Bool => 153, + N_Imp_Bool => 158, + N_Equiv_Bool => 163, + N_HDL_Expr => 165, + N_HDL_Bool => 170, + N_False => 170, + N_True => 170, + N_EOS => 173, + N_Name => 175, + N_Name_Decl => 177, + N_Inf => 177, + N_Number => 178 ); function Get_Fields (K : Nkind) return Fields_Array @@ -1053,6 +1065,8 @@ package body PSL.Nodes_Meta is | N_Next_Event_A | N_Next_Event_E | N_Abort + | N_Async_Abort + | N_Sync_Abort | N_Paren_Prop => return True; when others => @@ -1225,6 +1239,8 @@ package body PSL.Nodes_Meta is | N_Next_Event_A | N_Next_Event_E | N_Abort + | N_Async_Abort + | N_Sync_Abort | N_Clocked_SERE | N_Goto_Repeat_Seq | N_Equal_Repeat_Seq diff --git a/src/psl/psl-prints.adb b/src/psl/psl-prints.adb index e1beb27c2..6c2cffa48 100644 --- a/src/psl/psl-prints.adb +++ b/src/psl/psl-prints.adb @@ -51,7 +51,9 @@ package body PSL.Prints is when N_Until | N_Before => return Prio_FL_Bounding; - when N_Abort => + when N_Abort + | N_Sync_Abort + | N_Async_Abort => return Prio_FL_Abort; when N_Or_Prop => return Prio_Seq_Or; @@ -323,6 +325,16 @@ package body PSL.Prints is Put (")"); end Print_Boolean_Range_Property; + procedure Print_Abort_Property + (Tok : String; Prop : Node; Prio : Priority) is + begin + Print_Property (Get_Property (Prop), Prio); + Put (' '); + Put (Tok); + Put (' '); + Print_Expr (Get_Boolean (Prop)); + end Print_Abort_Property; + procedure Print_Property (Prop : Node; Parent_Prio : Priority := Prio_Lowest) is @@ -372,9 +384,11 @@ package body PSL.Prints is when N_Until => Print_Binary_Property_SI (" until", Prop, Prio); when N_Abort => - Print_Property (Get_Property (Prop), Prio); - Put (" abort "); - Print_Expr (Get_Boolean (Prop)); + Print_Abort_Property ("abort", Prop, Prio); + when N_Sync_Abort => + Print_Abort_Property ("sync_abort", Prop, Prio); + when N_Async_Abort => + Print_Abort_Property ("async_abort", Prop, Prio); when N_Before => Print_Binary_Property_SI (" before", Prop, Prio); when N_Or_Prop => diff --git a/src/psl/psl-rewrites.adb b/src/psl/psl-rewrites.adb index d8d9d5ecb..34404adec 100644 --- a/src/psl/psl-rewrites.adb +++ b/src/psl/psl-rewrites.adb @@ -589,7 +589,9 @@ package body PSL.Rewrites is when N_Or_Prop => return Rewrite_Or (Rewrite_Property (Get_Left (N)), Rewrite_Property (Get_Right (N))); - when N_Abort => + when N_Abort + | N_Async_Abort + | N_Sync_Abort => Set_Boolean (N, Rewrite_Boolean (Get_Boolean (N))); Set_Property (N, Rewrite_Property (Get_Property (N))); return N; diff --git a/src/psl/psl-subsets.adb b/src/psl/psl-subsets.adb index 303d01c1e..9ff16a6ff 100644 --- a/src/psl/psl-subsets.adb +++ b/src/psl/psl-subsets.adb @@ -168,7 +168,9 @@ package body PSL.Subsets is when N_Next_Event | N_Next_Event_A | N_Next_Event_E - | N_Abort => + | N_Abort + | N_Async_Abort + | N_Sync_Abort => Check_Simple (Get_Boolean (N)); Check_Simple (Get_Property (N)); when N_Not_Bool diff --git a/src/vhdl/vhdl-canon.adb b/src/vhdl/vhdl-canon.adb index f93d66d52..a9efeb457 100644 --- a/src/vhdl/vhdl-canon.adb +++ b/src/vhdl/vhdl-canon.adb @@ -1730,6 +1730,7 @@ package body Vhdl.Canon is procedure Canon_Psl_Property_Directive (Stmt : Iir) is + use PSL.Nodes; use PSL.NFAs; Prop : PSL_Node; Fa : PSL_NFA; @@ -1741,6 +1742,16 @@ package body Vhdl.Canon is Set_Psl_Property (Stmt, Prop); -- Generate the NFA. + case Get_Kind (Prop) is + when N_Async_Abort + | N_Sync_Abort => + Prop := Get_Property (Prop); + Set_PSL_Abort_Flag (Stmt, True); + when N_Abort => + null; + when others => + null; + end case; Fa := PSL.Build.Build_FA (Prop); Set_PSL_NFA (Stmt, Fa); diff --git a/src/vhdl/vhdl-nodes.adb b/src/vhdl/vhdl-nodes.adb index 2ee78985c..1912fcb12 100644 --- a/src/vhdl/vhdl-nodes.adb +++ b/src/vhdl/vhdl-nodes.adb @@ -7294,6 +7294,22 @@ package body Vhdl.Nodes is Set_Flag1 (N, Flag); end Set_PSL_EOS_Flag; + function Get_PSL_Abort_Flag (N : Iir) return Boolean is + begin + pragma Assert (N /= Null_Iir); + pragma Assert (Has_PSL_Abort_Flag (Get_Kind (N)), + "no field PSL_Abort_Flag"); + return Get_Flag2 (N); + end Get_PSL_Abort_Flag; + + procedure Set_PSL_Abort_Flag (N : Iir; Flag : Boolean) is + begin + pragma Assert (N /= Null_Iir); + pragma Assert (Has_PSL_Abort_Flag (Get_Kind (N)), + "no field PSL_Abort_Flag"); + Set_Flag2 (N, Flag); + end Set_PSL_Abort_Flag; + function Get_Count_Expression (N : Iir) return Iir is begin pragma Assert (N /= Null_Iir); diff --git a/src/vhdl/vhdl-nodes.ads b/src/vhdl/vhdl-nodes.ads index 2445ab33e..90f74cdc1 100644 --- a/src/vhdl/vhdl-nodes.ads +++ b/src/vhdl/vhdl-nodes.ads @@ -3356,6 +3356,9 @@ package Vhdl.Nodes is -- True if at least one of the NFA edge has the EOS flag. -- Get/Set_PSL_EOS_Flag (Flag1) -- + -- True if there is an outer abort is present (but not in the NFA) + -- Get/Set_PSL_Abort_Flag (Flag2) + -- -- Get/Set_Postponed_Flag (Flag3) -- -- Get/Set_Visible_Flag (Flag4) @@ -9245,6 +9248,10 @@ package Vhdl.Nodes is function Get_PSL_EOS_Flag (N : Iir) return Boolean; procedure Set_PSL_EOS_Flag (N : Iir; Flag : Boolean); + -- Field: Flag2 + function Get_PSL_Abort_Flag (N : Iir) return Boolean; + procedure Set_PSL_Abort_Flag (N : Iir; Flag : Boolean); + -- Field: Field2 function Get_Count_Expression (N : Iir) return Iir; procedure Set_Count_Expression (N : Iir; Count : Iir); diff --git a/src/vhdl/vhdl-nodes_meta.adb b/src/vhdl/vhdl-nodes_meta.adb index ee6b81c31..d470935e4 100644 --- a/src/vhdl/vhdl-nodes_meta.adb +++ b/src/vhdl/vhdl-nodes_meta.adb @@ -383,6 +383,7 @@ package body Vhdl.Nodes_Meta is Field_PSL_Nbr_States => Type_Int32, Field_PSL_Clock_Sensitivity => Type_Iir_List, Field_PSL_EOS_Flag => Type_Boolean, + Field_PSL_Abort_Flag => Type_Boolean, Field_Count_Expression => Type_Iir, Field_Clock_Expression => Type_Iir, Field_Default_Clock => Type_Iir, @@ -1129,6 +1130,8 @@ package body Vhdl.Nodes_Meta is return "psl_clock_sensitivity"; when Field_PSL_EOS_Flag => return "psl_eos_flag"; + when Field_PSL_Abort_Flag => + return "psl_abort_flag"; when Field_Count_Expression => return "count_expression"; when Field_Clock_Expression => @@ -2517,6 +2520,8 @@ package body Vhdl.Nodes_Meta is return Attr_None; when Field_PSL_EOS_Flag => return Attr_None; + when Field_PSL_Abort_Flag => + return Attr_None; when Field_Count_Expression => return Attr_None; when Field_Clock_Expression => @@ -4384,6 +4389,7 @@ package body Vhdl.Nodes_Meta is Field_PSL_NFA, Field_PSL_Nbr_States, Field_PSL_EOS_Flag, + Field_PSL_Abort_Flag, Field_Postponed_Flag, Field_Visible_Flag, Field_Parent, @@ -4398,6 +4404,7 @@ package body Vhdl.Nodes_Meta is Field_PSL_NFA, Field_PSL_Nbr_States, Field_PSL_EOS_Flag, + Field_PSL_Abort_Flag, Field_Postponed_Flag, Field_Visible_Flag, Field_Parent, @@ -4410,6 +4417,7 @@ package body Vhdl.Nodes_Meta is Field_PSL_NFA, Field_PSL_Nbr_States, Field_PSL_EOS_Flag, + Field_PSL_Abort_Flag, Field_Postponed_Flag, Field_Visible_Flag, Field_Parent, @@ -4423,6 +4431,7 @@ package body Vhdl.Nodes_Meta is Field_PSL_NFA, Field_PSL_Nbr_States, Field_PSL_EOS_Flag, + Field_PSL_Abort_Flag, Field_Postponed_Flag, Field_Visible_Flag, Field_Parent, @@ -5444,113 +5453,113 @@ package body Vhdl.Nodes_Meta is Iir_Kind_Concurrent_Assertion_Statement => 1620, Iir_Kind_Concurrent_Procedure_Call_Statement => 1627, Iir_Kind_Concurrent_Break_Statement => 1635, - Iir_Kind_Psl_Assert_Directive => 1648, - Iir_Kind_Psl_Assume_Directive => 1659, - Iir_Kind_Psl_Cover_Directive => 1671, - Iir_Kind_Psl_Restrict_Directive => 1682, - Iir_Kind_Block_Statement => 1696, - Iir_Kind_If_Generate_Statement => 1707, - Iir_Kind_Case_Generate_Statement => 1716, - Iir_Kind_For_Generate_Statement => 1725, - Iir_Kind_Component_Instantiation_Statement => 1736, - Iir_Kind_Psl_Default_Clock => 1739, - Iir_Kind_Generate_Statement_Body => 1750, - Iir_Kind_If_Generate_Else_Clause => 1756, - Iir_Kind_Simple_Simultaneous_Statement => 1763, - Iir_Kind_Simultaneous_Null_Statement => 1767, - Iir_Kind_Simultaneous_Procedural_Statement => 1778, - Iir_Kind_Simultaneous_Case_Statement => 1787, - Iir_Kind_Simultaneous_If_Statement => 1796, - Iir_Kind_Simultaneous_Elsif => 1802, - Iir_Kind_Simple_Signal_Assignment_Statement => 1813, - Iir_Kind_Conditional_Signal_Assignment_Statement => 1824, - Iir_Kind_Selected_Waveform_Assignment_Statement => 1836, - Iir_Kind_Signal_Force_Assignment_Statement => 1846, - Iir_Kind_Signal_Release_Assignment_Statement => 1855, - Iir_Kind_Null_Statement => 1859, - Iir_Kind_Assertion_Statement => 1866, - Iir_Kind_Report_Statement => 1872, - Iir_Kind_Wait_Statement => 1880, - Iir_Kind_Variable_Assignment_Statement => 1887, - Iir_Kind_Conditional_Variable_Assignment_Statement => 1894, - Iir_Kind_Return_Statement => 1900, - Iir_Kind_For_Loop_Statement => 1911, - Iir_Kind_While_Loop_Statement => 1922, - Iir_Kind_Next_Statement => 1929, - Iir_Kind_Exit_Statement => 1936, - Iir_Kind_Case_Statement => 1944, - Iir_Kind_Procedure_Call_Statement => 1950, - Iir_Kind_Break_Statement => 1957, - Iir_Kind_If_Statement => 1967, - Iir_Kind_Elsif => 1973, - Iir_Kind_Character_Literal => 1980, - Iir_Kind_Simple_Name => 1987, - Iir_Kind_Selected_Name => 1995, - Iir_Kind_Operator_Symbol => 2000, - Iir_Kind_Reference_Name => 2005, - Iir_Kind_External_Constant_Name => 2014, - Iir_Kind_External_Signal_Name => 2023, - Iir_Kind_External_Variable_Name => 2033, - Iir_Kind_Selected_By_All_Name => 2039, - Iir_Kind_Parenthesis_Name => 2044, - Iir_Kind_Package_Pathname => 2048, - Iir_Kind_Absolute_Pathname => 2049, - Iir_Kind_Relative_Pathname => 2050, - Iir_Kind_Pathname_Element => 2055, - Iir_Kind_Base_Attribute => 2057, - Iir_Kind_Subtype_Attribute => 2062, - Iir_Kind_Element_Attribute => 2067, - Iir_Kind_Across_Attribute => 2072, - Iir_Kind_Through_Attribute => 2077, - Iir_Kind_Nature_Reference_Attribute => 2081, - Iir_Kind_Left_Type_Attribute => 2086, - Iir_Kind_Right_Type_Attribute => 2091, - Iir_Kind_High_Type_Attribute => 2096, - Iir_Kind_Low_Type_Attribute => 2101, - Iir_Kind_Ascending_Type_Attribute => 2106, - Iir_Kind_Image_Attribute => 2112, - Iir_Kind_Value_Attribute => 2118, - Iir_Kind_Pos_Attribute => 2124, - Iir_Kind_Val_Attribute => 2130, - Iir_Kind_Succ_Attribute => 2136, - Iir_Kind_Pred_Attribute => 2142, - Iir_Kind_Leftof_Attribute => 2148, - Iir_Kind_Rightof_Attribute => 2154, - Iir_Kind_Signal_Slew_Attribute => 2162, - Iir_Kind_Quantity_Slew_Attribute => 2170, - Iir_Kind_Ramp_Attribute => 2178, - Iir_Kind_Zoh_Attribute => 2186, - Iir_Kind_Ltf_Attribute => 2194, - Iir_Kind_Ztf_Attribute => 2204, - Iir_Kind_Dot_Attribute => 2211, - Iir_Kind_Integ_Attribute => 2218, - Iir_Kind_Above_Attribute => 2226, - Iir_Kind_Quantity_Delayed_Attribute => 2234, - Iir_Kind_Delayed_Attribute => 2243, - Iir_Kind_Stable_Attribute => 2252, - Iir_Kind_Quiet_Attribute => 2261, - Iir_Kind_Transaction_Attribute => 2270, - Iir_Kind_Event_Attribute => 2274, - Iir_Kind_Active_Attribute => 2278, - Iir_Kind_Last_Event_Attribute => 2282, - Iir_Kind_Last_Active_Attribute => 2286, - Iir_Kind_Last_Value_Attribute => 2290, - Iir_Kind_Driving_Attribute => 2294, - Iir_Kind_Driving_Value_Attribute => 2298, - Iir_Kind_Behavior_Attribute => 2298, - Iir_Kind_Structure_Attribute => 2298, - Iir_Kind_Simple_Name_Attribute => 2305, - Iir_Kind_Instance_Name_Attribute => 2310, - Iir_Kind_Path_Name_Attribute => 2315, - Iir_Kind_Left_Array_Attribute => 2322, - Iir_Kind_Right_Array_Attribute => 2329, - Iir_Kind_High_Array_Attribute => 2336, - Iir_Kind_Low_Array_Attribute => 2343, - Iir_Kind_Length_Array_Attribute => 2350, - Iir_Kind_Ascending_Array_Attribute => 2357, - Iir_Kind_Range_Array_Attribute => 2364, - Iir_Kind_Reverse_Range_Array_Attribute => 2371, - Iir_Kind_Attribute_Name => 2380 + Iir_Kind_Psl_Assert_Directive => 1649, + Iir_Kind_Psl_Assume_Directive => 1661, + Iir_Kind_Psl_Cover_Directive => 1674, + Iir_Kind_Psl_Restrict_Directive => 1686, + Iir_Kind_Block_Statement => 1700, + Iir_Kind_If_Generate_Statement => 1711, + Iir_Kind_Case_Generate_Statement => 1720, + Iir_Kind_For_Generate_Statement => 1729, + Iir_Kind_Component_Instantiation_Statement => 1740, + Iir_Kind_Psl_Default_Clock => 1743, + Iir_Kind_Generate_Statement_Body => 1754, + Iir_Kind_If_Generate_Else_Clause => 1760, + Iir_Kind_Simple_Simultaneous_Statement => 1767, + Iir_Kind_Simultaneous_Null_Statement => 1771, + Iir_Kind_Simultaneous_Procedural_Statement => 1782, + Iir_Kind_Simultaneous_Case_Statement => 1791, + Iir_Kind_Simultaneous_If_Statement => 1800, + Iir_Kind_Simultaneous_Elsif => 1806, + Iir_Kind_Simple_Signal_Assignment_Statement => 1817, + Iir_Kind_Conditional_Signal_Assignment_Statement => 1828, + Iir_Kind_Selected_Waveform_Assignment_Statement => 1840, + Iir_Kind_Signal_Force_Assignment_Statement => 1850, + Iir_Kind_Signal_Release_Assignment_Statement => 1859, + Iir_Kind_Null_Statement => 1863, + Iir_Kind_Assertion_Statement => 1870, + Iir_Kind_Report_Statement => 1876, + Iir_Kind_Wait_Statement => 1884, + Iir_Kind_Variable_Assignment_Statement => 1891, + Iir_Kind_Conditional_Variable_Assignment_Statement => 1898, + Iir_Kind_Return_Statement => 1904, + Iir_Kind_For_Loop_Statement => 1915, + Iir_Kind_While_Loop_Statement => 1926, + Iir_Kind_Next_Statement => 1933, + Iir_Kind_Exit_Statement => 1940, + Iir_Kind_Case_Statement => 1948, + Iir_Kind_Procedure_Call_Statement => 1954, + Iir_Kind_Break_Statement => 1961, + Iir_Kind_If_Statement => 1971, + Iir_Kind_Elsif => 1977, + Iir_Kind_Character_Literal => 1984, + Iir_Kind_Simple_Name => 1991, + Iir_Kind_Selected_Name => 1999, + Iir_Kind_Operator_Symbol => 2004, + Iir_Kind_Reference_Name => 2009, + Iir_Kind_External_Constant_Name => 2018, + Iir_Kind_External_Signal_Name => 2027, + Iir_Kind_External_Variable_Name => 2037, + Iir_Kind_Selected_By_All_Name => 2043, + Iir_Kind_Parenthesis_Name => 2048, + Iir_Kind_Package_Pathname => 2052, + Iir_Kind_Absolute_Pathname => 2053, + Iir_Kind_Relative_Pathname => 2054, + Iir_Kind_Pathname_Element => 2059, + Iir_Kind_Base_Attribute => 2061, + Iir_Kind_Subtype_Attribute => 2066, + Iir_Kind_Element_Attribute => 2071, + Iir_Kind_Across_Attribute => 2076, + Iir_Kind_Through_Attribute => 2081, + Iir_Kind_Nature_Reference_Attribute => 2085, + Iir_Kind_Left_Type_Attribute => 2090, + Iir_Kind_Right_Type_Attribute => 2095, + Iir_Kind_High_Type_Attribute => 2100, + Iir_Kind_Low_Type_Attribute => 2105, + Iir_Kind_Ascending_Type_Attribute => 2110, + Iir_Kind_Image_Attribute => 2116, + Iir_Kind_Value_Attribute => 2122, + Iir_Kind_Pos_Attribute => 2128, + Iir_Kind_Val_Attribute => 2134, + Iir_Kind_Succ_Attribute => 2140, + Iir_Kind_Pred_Attribute => 2146, + Iir_Kind_Leftof_Attribute => 2152, + Iir_Kind_Rightof_Attribute => 2158, + Iir_Kind_Signal_Slew_Attribute => 2166, + Iir_Kind_Quantity_Slew_Attribute => 2174, + Iir_Kind_Ramp_Attribute => 2182, + Iir_Kind_Zoh_Attribute => 2190, + Iir_Kind_Ltf_Attribute => 2198, + Iir_Kind_Ztf_Attribute => 2208, + Iir_Kind_Dot_Attribute => 2215, + Iir_Kind_Integ_Attribute => 2222, + Iir_Kind_Above_Attribute => 2230, + Iir_Kind_Quantity_Delayed_Attribute => 2238, + Iir_Kind_Delayed_Attribute => 2247, + Iir_Kind_Stable_Attribute => 2256, + Iir_Kind_Quiet_Attribute => 2265, + Iir_Kind_Transaction_Attribute => 2274, + Iir_Kind_Event_Attribute => 2278, + Iir_Kind_Active_Attribute => 2282, + Iir_Kind_Last_Event_Attribute => 2286, + Iir_Kind_Last_Active_Attribute => 2290, + Iir_Kind_Last_Value_Attribute => 2294, + Iir_Kind_Driving_Attribute => 2298, + Iir_Kind_Driving_Value_Attribute => 2302, + Iir_Kind_Behavior_Attribute => 2302, + Iir_Kind_Structure_Attribute => 2302, + Iir_Kind_Simple_Name_Attribute => 2309, + Iir_Kind_Instance_Name_Attribute => 2314, + Iir_Kind_Path_Name_Attribute => 2319, + Iir_Kind_Left_Array_Attribute => 2326, + Iir_Kind_Right_Array_Attribute => 2333, + Iir_Kind_High_Array_Attribute => 2340, + Iir_Kind_Low_Array_Attribute => 2347, + Iir_Kind_Length_Array_Attribute => 2354, + Iir_Kind_Ascending_Array_Attribute => 2361, + Iir_Kind_Range_Array_Attribute => 2368, + Iir_Kind_Reverse_Range_Array_Attribute => 2375, + Iir_Kind_Attribute_Name => 2384 ); function Get_Fields_First (K : Iir_Kind) return Fields_Index is @@ -5725,6 +5734,8 @@ package body Vhdl.Nodes_Meta is return Get_Is_Forward_Ref (N); when Field_PSL_EOS_Flag => return Get_PSL_EOS_Flag (N); + when Field_PSL_Abort_Flag => + return Get_PSL_Abort_Flag (N); when others => raise Internal_Error; end case; @@ -5875,6 +5886,8 @@ package body Vhdl.Nodes_Meta is Set_Is_Forward_Ref (N, V); when Field_PSL_EOS_Flag => Set_PSL_EOS_Flag (N, V); + when Field_PSL_Abort_Flag => + Set_PSL_Abort_Flag (N, V); when others => raise Internal_Error; end case; @@ -12667,6 +12680,19 @@ package body Vhdl.Nodes_Meta is end case; end Has_PSL_EOS_Flag; + function Has_PSL_Abort_Flag (K : Iir_Kind) return Boolean is + begin + case K is + when Iir_Kind_Psl_Assert_Directive + | Iir_Kind_Psl_Assume_Directive + | Iir_Kind_Psl_Cover_Directive + | Iir_Kind_Psl_Restrict_Directive => + return True; + when others => + return False; + end case; + end Has_PSL_Abort_Flag; + function Has_Count_Expression (K : Iir_Kind) return Boolean is begin return K = Iir_Kind_Psl_Prev; diff --git a/src/vhdl/vhdl-nodes_meta.ads b/src/vhdl/vhdl-nodes_meta.ads index 0585fbe93..540807d1b 100644 --- a/src/vhdl/vhdl-nodes_meta.ads +++ b/src/vhdl/vhdl-nodes_meta.ads @@ -427,6 +427,7 @@ package Vhdl.Nodes_Meta is Field_PSL_Nbr_States, Field_PSL_Clock_Sensitivity, Field_PSL_EOS_Flag, + Field_PSL_Abort_Flag, Field_Count_Expression, Field_Clock_Expression, Field_Default_Clock, @@ -1016,6 +1017,7 @@ package Vhdl.Nodes_Meta is function Has_PSL_Nbr_States (K : Iir_Kind) return Boolean; function Has_PSL_Clock_Sensitivity (K : Iir_Kind) return Boolean; function Has_PSL_EOS_Flag (K : Iir_Kind) return Boolean; + function Has_PSL_Abort_Flag (K : Iir_Kind) return Boolean; 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; diff --git a/src/vhdl/vhdl-parse_psl.adb b/src/vhdl/vhdl-parse_psl.adb index 808c2dae7..e456514bf 100644 --- a/src/vhdl/vhdl-parse_psl.adb +++ b/src/vhdl/vhdl-parse_psl.adb @@ -812,6 +812,8 @@ package body Vhdl.Parse_Psl is | N_Endpoint_Instance | N_Strong | N_Abort + | N_Async_Abort + | N_Sync_Abort | N_Next_Event_E | N_Next_Event_A | N_Next_Event @@ -864,6 +866,18 @@ package body Vhdl.Parse_Psl is end case; end Property_To_Sequence; + function Parse_Abort (Kind : Nkind; Left : Node) return Node + is + N : Node; + begin + N := Create_Node_Loc (Kind); + Set_Property (N, Left); + Scan; + Set_Boolean (N, Parse_Boolean (Prio_Lowest)); + -- Left associative. + return N; + end Parse_Abort; + -- A.4.4 PSL properties -- FL_Property::= -- Boolean @@ -959,12 +973,17 @@ package body Vhdl.Parse_Psl is if Prio > Prio_FL_Abort then return Res; end if; - N := Create_Node_Loc (N_Abort); - Set_Property (N, Res); - Scan; - Set_Boolean (N, Parse_Boolean (Prio_Lowest)); - -- Left associative. - return N; + return Parse_Abort (N_Abort, Res); + when Tok_Sync_Abort => + if Prio > Prio_FL_Abort then + return Res; + end if; + return Parse_Abort (N_Sync_Abort, Res); + when Tok_Async_Abort => + if Prio > Prio_FL_Abort then + return Res; + end if; + return Parse_Abort (N_Async_Abort, Res); when Tok_Exclam_Mark => N := Create_Node_Loc (N_Strong); Set_Property (N, Res); diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb index ec4d870e5..e14488db0 100644 --- a/src/vhdl/vhdl-prints.adb +++ b/src/vhdl/vhdl-prints.adb @@ -2163,6 +2163,16 @@ package body Vhdl.Prints is Disp_Token (Ctxt, Tok_Right_Paren); end Print_Boolean_Range_Property; + procedure Print_Abort_Property (Ctxt : in out Ctxt_Class; + Tok : Token_Type; + N : PSL_Node; + Prio : Priority) is + begin + Print_Property (Ctxt, Get_Property (N), Prio); + Disp_Token (Ctxt, Tok); + Print_Expr (Ctxt, Get_Boolean (N)); + end Print_Abort_Property; + procedure Print_Property (Ctxt : in out Ctxt_Class; Prop : PSL_Node; Parent_Prio : Priority := Prio_Lowest) @@ -2215,9 +2225,11 @@ package body Vhdl.Prints is Tok_Until, Tok_Until_Em, Tok_Until_Un, Tok_Until_Em_Un, Prop, Prio); when N_Abort => - Print_Property (Ctxt, Get_Property (Prop), Prio); - Disp_Token (Ctxt, Tok_Abort); - Print_Expr (Ctxt, Get_Boolean (Prop)); + Print_Abort_Property (Ctxt, Tok_Abort, Prop, Prio); + when N_Sync_Abort => + Print_Abort_Property (Ctxt, Tok_Sync_Abort, Prop, Prio); + when N_Async_Abort => + Print_Abort_Property (Ctxt, Tok_Async_Abort, Prop, Prio); when N_Before => Print_Binary_Property_SI (Ctxt, diff --git a/src/vhdl/vhdl-scanner.adb b/src/vhdl/vhdl-scanner.adb index 40176e9d1..603e4652b 100644 --- a/src/vhdl/vhdl-scanner.adb +++ b/src/vhdl/vhdl-scanner.adb @@ -1417,6 +1417,10 @@ package body Vhdl.Scanner is Current_Token := Tok_Within; when Name_Abort => Current_Token := Tok_Abort; + when Name_Async_Abort => + Current_Token := Tok_Async_Abort; + when Name_Sync_Abort => + Current_Token := Tok_Sync_Abort; when Name_Before => Scan_Psl_Keyword_Em_Un (Tok_Before, Tok_Before_Em, Tok_Before_Un, Tok_Before_Em_Un); diff --git a/src/vhdl/vhdl-sem_psl.adb b/src/vhdl/vhdl-sem_psl.adb index 2a5b91aa4..51fcc8766 100644 --- a/src/vhdl/vhdl-sem_psl.adb +++ b/src/vhdl/vhdl-sem_psl.adb @@ -543,7 +543,9 @@ package body Vhdl.Sem_Psl is Error_Msg_Sem (+Prop, "inner clock event not supported"); end if; return Prop; - when N_Abort => + when N_Abort + | N_Async_Abort + | N_Sync_Abort => Sem_Property (Prop); Sem_Boolean (Prop); return Prop; diff --git a/src/vhdl/vhdl-tokens.adb b/src/vhdl/vhdl-tokens.adb index e85ccc2a4..815f0aba2 100644 --- a/src/vhdl/vhdl-tokens.adb +++ b/src/vhdl/vhdl-tokens.adb @@ -469,6 +469,10 @@ package body Vhdl.Tokens is return "within"; when Tok_Abort => return "abort"; + when Tok_Async_Abort => + return "async_abort"; + when Tok_Sync_Abort => + return "sync_abort"; when Tok_Before => return "before"; when Tok_Before_Em => diff --git a/src/vhdl/vhdl-tokens.ads b/src/vhdl/vhdl-tokens.ads index 9947f2b8a..4e6d3a2e2 100644 --- a/src/vhdl/vhdl-tokens.ads +++ b/src/vhdl/vhdl-tokens.ads @@ -281,6 +281,8 @@ package Vhdl.Tokens is Tok_Within, Tok_Abort, + Tok_Async_Abort, + Tok_Sync_Abort, Tok_Before, Tok_Before_Em, Tok_Before_Un, |