diff options
author | Ondrej Ille <ondrej.ille@gmail.com> | 2021-04-07 09:55:16 +0200 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2021-04-08 20:22:42 +0200 |
commit | 32bcb07c7d7a809fc94fc438835e5e3109ace30a (patch) | |
tree | fc3d6d111c62a69064a524efc17fcff55f9aba86 /src/grt | |
parent | 3cbf31356ebc38d8c92eaf640455b35164246ef9 (diff) | |
download | ghdl-32bcb07c7d7a809fc94fc438835e5e3109ace30a.tar.gz ghdl-32bcb07c7d7a809fc94fc438835e5e3109ace30a.tar.bz2 ghdl-32bcb07c7d7a809fc94fc438835e5e3109ace30a.zip |
src: Introduce two separate PSL counters (Finish and Start).
Finish counter corresponds to legacy count.
Start counter corresponds to number of times start
state is left (assertion is triggered).
Diffstat (limited to 'src/grt')
-rw-r--r-- | src/grt/grt-psl.adb | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/grt/grt-psl.adb b/src/grt/grt-psl.adb index ff736c951..b6362509c 100644 --- a/src/grt/grt-psl.adb +++ b/src/grt/grt-psl.adb @@ -75,7 +75,8 @@ package body Grt.Psl is F : constant FILEs := Report_Stream; Psl_Dir : Ghdl_Rtin_Psl_Directive_Acc; Addr : System.Address; - Val : Ghdl_Index_Type; + Finished_Count : Ghdl_Index_Type; + Started_Count : Ghdl_Index_Type; begin case Rti.Kind is when Ghdl_Rtiks_Psl => @@ -116,16 +117,22 @@ package body Grt.Psl is Put_U32 (F, Get_Linecol_Line (Psl_Dir.Linecol)); Put_Line (F, ","); - Put (F, " ""count"": "); + Put (F, " ""finished-count"": "); Addr := Loc_To_Addr (Psl_Dir.Common.Depth, Psl_Dir.Loc, Ctxt); - Val := To_Ghdl_Index_Ptr (Addr).all; - Put_U32 (F, Ghdl_U32 (Val)); + Finished_Count := To_Ghdl_Index_Ptr (Addr).all; + Put_U32 (F, Ghdl_U32 (Finished_Count)); + Put_Line (F, ","); + + Put (F, " ""started-count"": "); + Addr := Loc_To_Addr (Psl_Dir.Common.Depth, Psl_Dir.Loc + 4, Ctxt); + Started_Count := To_Ghdl_Index_Ptr (Addr).all; + Put_U32 (F, Ghdl_U32 (Started_Count)); Put_Line (F, ","); Put (F, " ""status"": """); case Rti.Kind is when Ghdl_Rtik_Psl_Assert => - if Val = 0 then + if Finished_Count = 0 then Put (F, "passed"); Inc (Nbr_Assert_Passed); else @@ -133,7 +140,7 @@ package body Grt.Psl is Inc (Nbr_Assert_Failed); end if; when Ghdl_Rtik_Psl_Assume => - if Val = 0 then + if Finished_Count = 0 then Put (F, "passed"); Inc (Nbr_Assume_Passed); else @@ -141,7 +148,7 @@ package body Grt.Psl is Inc (Nbr_Assume_Failed); end if; when Ghdl_Rtik_Psl_Cover => - if Val = 0 then + if Finished_Count = 0 then Put (F, "not covered"); Inc (Nbr_Cover_Failed); else |