diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-08 19:01:38 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 01:13:23 +0000 |
commit | c9f83ec94ba1d7de0cfc46a9a23af2f9e04450e8 (patch) | |
tree | 4993ca5a6892b108ae1bc040a23366ef326f190b /src/systemc/dt/bit/sc_logic.cc | |
parent | e07f7efb75f0f7322d752608eb1cb1e1145b4a98 (diff) | |
download | gem5-c9f83ec94ba1d7de0cfc46a9a23af2f9e04450e8.tar.xz |
systemc: Switch to using predefined messages for datatypes.
Create and use predefined messages for datatypes which match the ones
Accellera uses.
Change-Id: I92dd52f62462b864264217bb81f3ff1dcec020bf
Reviewed-on: https://gem5-review.googlesource.com/c/13331
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/dt/bit/sc_logic.cc')
-rw-r--r-- | src/systemc/dt/bit/sc_logic.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/systemc/dt/bit/sc_logic.cc b/src/systemc/dt/bit/sc_logic.cc index 4943d3df1..876fd3570 100644 --- a/src/systemc/dt/bit/sc_logic.cc +++ b/src/systemc/dt/bit/sc_logic.cc @@ -48,6 +48,7 @@ #include <sstream> +#include "systemc/ext/dt/bit/messages.hh" #include "systemc/ext/dt/bit/sc_logic.hh" #include "systemc/ext/utils/sc_report_handler.hh" @@ -72,7 +73,7 @@ sc_logic::invalid_value(char c) { std::stringstream msg; msg << "sc_logic('" << c << "')"; - SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str()); + SC_REPORT_ERROR(sc_core::SC_ID_VALUE_NOT_VALID_, msg.str().c_str()); } void @@ -80,20 +81,17 @@ sc_logic::invalid_value(int i) { std::stringstream msg; msg << "sc_logic(" << i << ")"; - SC_REPORT_ERROR("(E204) value is not valid", msg.str().c_str()); + SC_REPORT_ERROR(sc_core::SC_ID_VALUE_NOT_VALID_, msg.str().c_str()); } void sc_logic::invalid_01() const { - if ((int)m_val == Log_Z) { - SC_REPORT_WARNING( - "(W211) sc_logic value 'Z' cannot be converted to bool", 0); - } else { - SC_REPORT_WARNING( - "(W212) sc_logic value 'X' cannot be converted to bool", 0); - } + if ((int)m_val == Log_Z) + SC_REPORT_WARNING(sc_core::SC_ID_LOGIC_Z_TO_BOOL_, 0); + else + SC_REPORT_WARNING(sc_core::SC_ID_LOGIC_X_TO_BOOL_, 0); } |