From c9f83ec94ba1d7de0cfc46a9a23af2f9e04450e8 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Mon, 8 Oct 2018 19:01:38 -0700 Subject: 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 Maintainer: Gabe Black --- src/systemc/dt/misc/sc_value_base.cc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/systemc/dt/misc') 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 #include +#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 -- cgit v1.2.3