summaryrefslogtreecommitdiff
path: root/src/systemc/core/port.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/core/port.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/core/port.cc')
-rw-r--r--src/systemc/core/port.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/systemc/core/port.cc b/src/systemc/core/port.cc
index e8a783231..109d9df93 100644
--- a/src/systemc/core/port.cc
+++ b/src/systemc/core/port.cc
@@ -32,6 +32,7 @@
#include "base/logging.hh"
#include "systemc/core/process.hh"
#include "systemc/core/sensitivity.hh"
+#include "systemc/ext/channel/messages.hh"
#include "systemc/ext/channel/sc_signal_in_if.hh"
namespace sc_gem5
@@ -129,23 +130,23 @@ Port::finalize()
std::ostringstream ss;
ss << size() << " binds exceeds maximum of " << maxSize() <<
" allowed";
- portBase->report_error(
- "(E109) complete binding failed", ss.str().c_str());
+ portBase->report_error(sc_core::SC_ID_COMPLETE_BINDING_,
+ ss.str().c_str());
}
switch (portBase->_portPolicy()) {
case sc_core::SC_ONE_OR_MORE_BOUND:
if (size() == 0)
- portBase->report_error(
- "(E109) complete binding failed", "port not bound");
+ portBase->report_error(sc_core::SC_ID_COMPLETE_BINDING_,
+ "port not bound");
break;
case sc_core::SC_ALL_BOUND:
if (size() < maxSize() || size() < 1) {
std::stringstream ss;
ss << size() << " actual binds is less than required " <<
maxSize();
- portBase->report_error(
- "(E109) complete binding failed", ss.str().c_str());
+ portBase->report_error(sc_core::SC_ID_COMPLETE_BINDING_,
+ ss.str().c_str());
}
break;
case sc_core::SC_ZERO_OR_MORE_BOUND: