summaryrefslogtreecommitdiff
path: root/src/systemc/channel/sc_clock.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-10-07 05:23:49 -0700
committerGabe Black <gabeblack@google.com>2018-10-16 01:12:58 +0000
commite07f7efb75f0f7322d752608eb1cb1e1145b4a98 (patch)
treec70d86ba3130636fd8c6ff3c0d159727b81932c8 /src/systemc/channel/sc_clock.cc
parent3420f0e223888bf70cd502efb5a534e651891b5c (diff)
downloadgem5-e07f7efb75f0f7322d752608eb1cb1e1145b4a98.tar.xz
systemc: Switch to using predefined messages for channels.
Create and use predefined messages for channels which match the ones Accellera uses. Change-Id: I179214838bbd83604e50225926cdc6b5b1b16923 Reviewed-on: https://gem5-review.googlesource.com/c/13330 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/channel/sc_clock.cc')
-rw-r--r--src/systemc/channel/sc_clock.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/systemc/channel/sc_clock.cc b/src/systemc/channel/sc_clock.cc
index 898e7b866..7ab86eeb8 100644
--- a/src/systemc/channel/sc_clock.cc
+++ b/src/systemc/channel/sc_clock.cc
@@ -35,6 +35,7 @@
#include "systemc/core/process_types.hh"
#include "systemc/core/sched_event.hh"
#include "systemc/core/scheduler.hh"
+#include "systemc/ext/channel/messages.hh"
#include "systemc/ext/channel/sc_clock.hh"
#include "systemc/ext/core/sc_main.hh"
#include "systemc/ext/core/sc_module.hh" // for sc_gen_unique_name
@@ -113,21 +114,21 @@ sc_clock::sc_clock(const char *name, const sc_time &period,
std::string msg =
"increase the period: clock '" +
std::string(name) + "'";
- SC_REPORT_ERROR("(E101) sc_clock period is zero", msg.c_str());
+ SC_REPORT_ERROR(SC_ID_CLOCK_PERIOD_ZERO_, msg.c_str());
}
if (duty_cycle * period == SC_ZERO_TIME) {
std::string msg =
"increase the period or increase the duty cycle: clock '" +
std::string(name) + "'";
- SC_REPORT_ERROR("(E102) sc_clock high time is zero", msg.c_str());
+ SC_REPORT_ERROR(SC_ID_CLOCK_HIGH_TIME_ZERO_, msg.c_str());
}
if (duty_cycle * period == period) {
std::string msg =
"increase the period or decrease the duty cycle: clock '" +
std::string(name) + "'";
- SC_REPORT_ERROR("(E103) sc_clock low time is zero", msg.c_str());
+ SC_REPORT_ERROR(SC_ID_CLOCK_LOW_TIME_ZERO_, msg.c_str());
}
_gem5UpEdge = new ::sc_gem5::ClockTick(this, true, period);