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/int/sc_signed.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/int/sc_signed.cc')
-rw-r--r-- | src/systemc/dt/int/sc_signed.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/systemc/dt/int/sc_signed.cc b/src/systemc/dt/int/sc_signed.cc index cbb688523..97dd8eb8f 100644 --- a/src/systemc/dt/int/sc_signed.cc +++ b/src/systemc/dt/int/sc_signed.cc @@ -82,6 +82,7 @@ #include "systemc/ext/dt/bit/sc_lv_base.hh" #include "systemc/ext/dt/fx/sc_fix.hh" #include "systemc/ext/dt/fx/scfx_other_defs.hh" +#include "systemc/ext/dt/int/messages.hh" #include "systemc/ext/dt/int/sc_int_base.hh" #include "systemc/ext/dt/int/sc_signed.hh" #include "systemc/ext/dt/int/sc_uint_base.hh" @@ -110,7 +111,7 @@ sc_signed::invalid_init(const char *type_name, int nb) const { std::stringstream msg; msg << "sc_signed("<< type_name << ") : nb = " << nb << " is not valid"; - SC_REPORT_ERROR("initialization failed", msg.str().c_str()); + SC_REPORT_ERROR(sc_core::SC_ID_INIT_FAILED_, msg.str().c_str()); } // ---------------------------------------------------------------------------- @@ -440,10 +441,10 @@ const sc_signed & sc_signed::operator = (const char *a) { if (a == 0) { - SC_REPORT_ERROR("conversion failed", + SC_REPORT_ERROR(sc_core::SC_ID_CONVERSION_FAILED_, "character string is zero"); } else if (*a == 0) { - SC_REPORT_ERROR("conversion failed", + SC_REPORT_ERROR(sc_core::SC_ID_CONVERSION_FAILED_, "character string is empty"); } else try { int len = length(); @@ -452,7 +453,7 @@ sc_signed::operator = (const char *a) } catch(const sc_core::sc_report &) { std::stringstream msg; msg << "character string '" << a << "' is not valid"; - SC_REPORT_ERROR("conversion failed", msg.str().c_str()); + SC_REPORT_ERROR(sc_core::SC_ID_CONVERSION_FAILED_, msg.str().c_str()); } return *this; } |