diff options
author | Gabe Black <gabeblack@google.com> | 2018-10-07 00:42:04 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-10-16 01:09:20 +0000 |
commit | 4e951d414e1ffc8e17aa4935b2a6421f4fbc1e22 (patch) | |
tree | 55d5b77cfea540ecbc52f7ff4191619ad45edd49 /src/systemc/core/event.cc | |
parent | 208704b23a9f95f80fb49b3bfce4bccffd128060 (diff) | |
download | gem5-4e951d414e1ffc8e17aa4935b2a6421f4fbc1e22.tar.xz |
systemc: Switch to using predefined messages for core.
Create and use predefined messages for core which match the ones
Accellera uses.
Change-Id: I05b1398933f753946d5917f39d0f39c7cb45ed9f
Reviewed-on: https://gem5-review.googlesource.com/c/13323
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/core/event.cc')
-rw-r--r-- | src/systemc/core/event.cc | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/systemc/core/event.cc b/src/systemc/core/event.cc index de5bc8c32..1c966d815 100644 --- a/src/systemc/core/event.cc +++ b/src/systemc/core/event.cc @@ -37,6 +37,7 @@ #include "sim/core.hh" #include "systemc/core/module.hh" #include "systemc/core/scheduler.hh" +#include "systemc/ext/core/messages.hh" #include "systemc/ext/core/sc_main.hh" #include "systemc/ext/core/sc_module.hh" @@ -78,7 +79,8 @@ Event::Event(sc_core::sc_event *_sc_event, const char *_basename_cstr, std::string message = path + original_name + ". Latter declaration will be renamed to " + path + _basename; - SC_REPORT_WARNING("(W505) object already exists", message.c_str()); + SC_REPORT_WARNING(sc_core::SC_ID_INSTANCE_EXISTS_, + message.c_str()); } _name = path + _basename; @@ -159,10 +161,8 @@ Event::notify(DynamicSensitivities &senses) void Event::notify() { - if (scheduler.inUpdate()) { - SC_REPORT_ERROR("(E521) immediate notification is not allowed " - "during update phase or elaboration", ""); - } + if (scheduler.inUpdate()) + SC_REPORT_ERROR(sc_core::SC_ID_IMMEDIATE_NOTIFICATION_, ""); // An immediate notification overrides any pending delayed notification. if (delayedNotify.scheduled()) @@ -190,10 +190,8 @@ Event::notify(const sc_core::sc_time &t) void Event::notifyDelayed(const sc_core::sc_time &t) { - if (delayedNotify.scheduled()) { - SC_REPORT_ERROR("(E531) notify_delayed() cannot be called on events " - "that have pending notifications", ""); - } + if (delayedNotify.scheduled()) + SC_REPORT_ERROR(sc_core::SC_ID_NOTIFY_DELAYED_, ""); notify(t); } |