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/misc | |
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/misc')
-rw-r--r-- | src/systemc/dt/misc/sc_value_base.cc | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/systemc/dt/misc/sc_value_base.cc b/src/systemc/dt/misc/sc_value_base.cc index 774f58391..ecd822e4d 100644 --- a/src/systemc/dt/misc/sc_value_base.cc +++ b/src/systemc/dt/misc/sc_value_base.cc @@ -52,6 +52,7 @@ #include <cstdio> #include <cstdlib> +#include "systemc/ext/dt/int/messages.hh" #include "systemc/ext/dt/misc/sc_value_base.hh" #include "systemc/ext/utils/sc_report_handler.hh" @@ -63,7 +64,7 @@ sc_value_base::concat_clear_data(bool /* to_ones */) { static const char error_message[] = "concat_clear_data method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); } bool @@ -71,7 +72,7 @@ sc_value_base::concat_get_ctrl(sc_digit * /*dst_p*/, int /*low_i*/) const { static const char error_message[] = "concat_get_ctrl method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); return false; } @@ -80,7 +81,7 @@ sc_value_base::concat_get_data(sc_digit * /*dst_p*/, int /*low_i*/) const { static const char error_message[] = "concat_get_data method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); return false; } @@ -89,7 +90,7 @@ sc_value_base::concat_get_uint64() const { static const char error_message[] = "concat_get_uint64 method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); return 0; } @@ -98,7 +99,7 @@ sc_value_base::concat_length(bool * /*xz_present_p*/) const { static const char error_message[] = "concat_length method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); return 0; } @@ -107,7 +108,7 @@ sc_value_base::concat_set(int64 /*src*/, int /*low_i*/) { static const char error_message[] = "concat_set(int64) method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); } void @@ -115,7 +116,7 @@ sc_value_base::concat_set(const sc_signed &/*src*/, int /*low_i*/) { static const char error_message[] = "concat_set(sc_signed) method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); } void @@ -123,7 +124,7 @@ sc_value_base::concat_set(const sc_unsigned &/*src*/, int /*low_i*/) { static const char error_message[] = "concat_set(sc_unsigned) method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); } void @@ -131,7 +132,7 @@ sc_value_base::concat_set(uint64 /*src*/, int /*low_i*/) { static const char error_message[] = "concat_set(uint64) method not supported by this type"; - SC_REPORT_ERROR("operation failed", error_message); + SC_REPORT_ERROR(sc_core::SC_ID_OPERATION_FAILED_, error_message); } } // namespace sc_dt |