summaryrefslogtreecommitdiff
path: root/src/systemc/core/module.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-07 00:42:04 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 01:09:20 +0000
commit4e951d414e1ffc8e17aa4935b2a6421f4fbc1e22 (patch)
tree55d5b77cfea540ecbc52f7ff4191619ad45edd49 /src/systemc/core/module.cc
parent208704b23a9f95f80fb49b3bfce4bccffd128060 (diff)
downloadgem5-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/module.cc')
-rw-r--r--src/systemc/core/module.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/systemc/core/module.cc b/src/systemc/core/module.cc
index ec6c7761a..4addb386c 100644
--- a/src/systemc/core/module.cc
+++ b/src/systemc/core/module.cc
@@ -32,6 +32,7 @@
#include <cassert>
#include "base/logging.hh"
+#include "systemc/ext/core/messages.hh"
#include "systemc/ext/core/sc_export.hh"
#include "systemc/ext/core/sc_port.hh"
#include "systemc/ext/utils/sc_report_handler.hh"
@@ -143,9 +144,7 @@ Module::endOfElaboration()
{
if (_deprecatedConstructor && !_ended) {
std::string msg = csprintf("module '%s'", name());
- SC_REPORT_WARNING("(W509) module construction not properly completed: "
- "did you forget to add a sc_module_name parameter to "
- "your module constructor?", msg.c_str());
+ SC_REPORT_WARNING(sc_core::SC_ID_END_MODULE_NOT_CALLED_, msg.c_str());
}
pushParentModule(this);
try {
@@ -200,11 +199,8 @@ currentModule()
Module *
newModuleChecked()
{
- if (!_new_module) {
- SC_REPORT_ERROR("(E533) module name stack is empty: "
- "did you forget to add a sc_module_name parameter to "
- "your module constructor?", nullptr);
- }
+ if (!_new_module)
+ SC_REPORT_ERROR(sc_core::SC_ID_MODULE_NAME_STACK_EMPTY_, "");
return _new_module;
}