summaryrefslogtreecommitdiff
path: root/src/systemc/core/sc_main.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/sc_main.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/sc_main.cc')
-rw-r--r--src/systemc/core/sc_main.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/systemc/core/sc_main.cc b/src/systemc/core/sc_main.cc
index 95e955002..a5e0366b9 100644
--- a/src/systemc/core/sc_main.cc
+++ b/src/systemc/core/sc_main.cc
@@ -39,6 +39,7 @@
#include "systemc/core/kernel.hh"
#include "systemc/core/python.hh"
#include "systemc/core/scheduler.hh"
+#include "systemc/ext/core/messages.hh"
#include "systemc/ext/core/sc_main.hh"
#include "systemc/ext/utils/sc_report_handler.hh"
#include "systemc/utils/report.hh"
@@ -203,10 +204,8 @@ sc_start(const sc_time &time, sc_starvation_policy p)
::sc_gem5::scheduler.oneCycle();
} else {
Tick now = ::sc_gem5::scheduler.getCurTick();
- if (MaxTick - now < time.value()) {
- SC_REPORT_ERROR("(E544) simulation time value overflow, "
- "simulation aborted", "");
- }
+ if (MaxTick - now < time.value())
+ SC_REPORT_ERROR(SC_ID_SIMULATION_TIME_OVERFLOW_, "");
::sc_gem5::scheduler.start(now + time.value(), p == SC_RUN_TO_TIME);
}
}
@@ -215,8 +214,7 @@ void
sc_set_stop_mode(sc_stop_mode mode)
{
if (sc_is_running()) {
- SC_REPORT_ERROR("attempt to set sc_stop mode "
- "after start will be ignored", "");
+ SC_REPORT_ERROR(SC_ID_STOP_MODE_AFTER_START_, "");
return;
}
_stop_mode = mode;
@@ -235,7 +233,7 @@ sc_stop()
if (stop_called) {
static bool stop_warned = false;
if (!stop_warned)
- SC_REPORT_WARNING("(W545) sc_stop has already been called", "");
+ SC_REPORT_WARNING(SC_ID_SIMULATION_STOP_CALLED_TWICE_, "");
stop_warned = true;
return;
}