diff options
-rw-r--r-- | src/grt/grt-errors.ads | 5 | ||||
-rw-r--r-- | src/grt/grt-lib.adb | 4 | ||||
-rw-r--r-- | src/grt/grt-options.adb | 1 | ||||
-rw-r--r-- | src/grt/grt-options.ads | 4 | ||||
-rw-r--r-- | src/grt/grt-severity.ads | 33 | ||||
-rw-r--r-- | src/grt/grt-std_logic_1164.adb | 1 |
6 files changed, 40 insertions, 8 deletions
diff --git a/src/grt/grt-errors.ads b/src/grt/grt-errors.ads index 175609cf9..8b53db830 100644 --- a/src/grt/grt-errors.ads +++ b/src/grt/grt-errors.ads @@ -123,11 +123,6 @@ package Grt.Errors is -- If true, an error is expected and the exit status is inverted. Expect_Failure : Boolean := False; - Note_Severity : constant Integer := 0; - Warning_Severity : constant Integer := 1; - Error_Severity : constant Integer := 2; - Failure_Severity : constant Integer := 3; - -- Internal subprograms, to be called only by the symbolizer. procedure Put_Err (C : Character) renames Diag_C; procedure Put_Err (Str : String) renames Diag_C; diff --git a/src/grt/grt-lib.adb b/src/grt/grt-lib.adb index 5391ad3b9..66d1ccccf 100644 --- a/src/grt/grt-lib.adb +++ b/src/grt/grt-lib.adb @@ -26,6 +26,7 @@ with Interfaces; with Grt.Errors; use Grt.Errors; with Grt.Errors_Exec; use Grt.Errors_Exec; +with Grt.Severity; with Grt.Options; with Grt.Fcvt; @@ -49,6 +50,7 @@ package body Grt.Lib is Severity : Integer; Loc : Ghdl_Location_Ptr) is + use Grt.Severity; Level : constant Integer := Severity mod 256; Bt : Backtrace_Addrs; begin @@ -120,7 +122,7 @@ package body Grt.Lib is procedure Ghdl_Psl_Assume_Failed (Loc : Ghdl_Location_Ptr) is begin Do_Report ("psl assumption", null, "Assumption violation", - Error_Severity, Loc); + Grt.Severity.Error_Severity, Loc); end Ghdl_Psl_Assume_Failed; procedure Ghdl_Psl_Cover diff --git a/src/grt/grt-options.adb b/src/grt/grt-options.adb index 58505b381..379d1978e 100644 --- a/src/grt/grt-options.adb +++ b/src/grt/grt-options.adb @@ -25,6 +25,7 @@ with Interfaces; use Interfaces; with Grt.Strings; use Grt.Strings; with Grt.Errors; use Grt.Errors; +with Grt.Severity; use Grt.Severity; with Grt.Stdio; use Grt.Stdio; with Grt.Astdio; with Grt.Hooks; diff --git a/src/grt/grt-options.ads b/src/grt/grt-options.ads index fd0daad07..3d5a8bf15 100644 --- a/src/grt/grt-options.ads +++ b/src/grt/grt-options.ads @@ -23,7 +23,7 @@ -- however invalidate any other reasons why the executable file might be -- covered by the GNU Public License. with Grt.Types; use Grt.Types; -with Grt.Errors; +with Grt.Severity; package Grt.Options is pragma Preelaborate (Grt.Options); @@ -120,7 +120,7 @@ package Grt.Options is Checks : Boolean := False; -- Level at which an assert stop the simulation. - Severity_Level : Integer := Grt.Errors.Failure_Severity; + Severity_Level : Integer := Grt.Severity.Failure_Severity; -- How assertions are handled. type Assert_Handling is diff --git a/src/grt/grt-severity.ads b/src/grt/grt-severity.ads new file mode 100644 index 000000000..75d8d90d9 --- /dev/null +++ b/src/grt/grt-severity.ads @@ -0,0 +1,33 @@ +-- GHDL Run Time (GRT) - Constants definition +-- Copyright (C) 2020 Tristan Gingold +-- +-- GHDL is free software; you can redistribute it and/or modify it under +-- the terms of the GNU General Public License as published by the Free +-- Software Foundation; either version 2, or (at your option) any later +-- version. +-- +-- GHDL is distributed in the hope that it will be useful, but WITHOUT ANY +-- WARRANTY; without even the implied warranty of MERCHANTABILITY or +-- FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +-- for more details. +-- +-- You should have received a copy of the GNU General Public License +-- 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. +-- +-- As a special exception, if other files instantiate generics from this +-- unit, or you link this unit with other files to produce an executable, +-- this unit does not by itself cause the resulting executable to be +-- covered by the GNU General Public License. This exception does not +-- however invalidate any other reasons why the executable file might be +-- covered by the GNU Public License. + +package Grt.Severity is + pragma Pure (Grt.Severity); + + Note_Severity : constant Integer := 0; + Warning_Severity : constant Integer := 1; + Error_Severity : constant Integer := 2; + Failure_Severity : constant Integer := 3; +end Grt.Severity; diff --git a/src/grt/grt-std_logic_1164.adb b/src/grt/grt-std_logic_1164.adb index 472febc97..9d4866590 100644 --- a/src/grt/grt-std_logic_1164.adb +++ b/src/grt/grt-std_logic_1164.adb @@ -25,6 +25,7 @@ with Grt.Lib; with Grt.Errors; use Grt.Errors; +with Grt.Severity; use Grt.Severity; package body Grt.Std_Logic_1164 is Assert_DC_Msg : constant String := |