summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-12-10 23:37:24 -0800
committerGabe Black <gabeblack@google.com>2019-01-09 01:36:28 +0000
commit96ce18b82815b7996d2d9f39cf4ba567b153aba5 (patch)
tree0c34c1ada41bf7a6f806b985ceb8c36f90fc7fb5
parentde51d7c4e784416f993cc192c96b2a6ca98d838a (diff)
downloadgem5-96ce18b82815b7996d2d9f39cf4ba567b153aba5.tar.xz
systemc: Remove the TLM dependence on a non-standard method.
The sc_event_finder class in Accellera's implementation has a non-standard report_error function that it uses internally. The TLM headers were calling that function in their own event finder subclass. This change replaces that call with what should be an equivalent bit of code which is based on the report_error implementation. Change-Id: Id57d26791df01403a77e70d5f4a00f650dc33599 Reviewed-on: https://gem5-review.googlesource.com/c/15063 Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com> Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
-rw-r--r--src/systemc/ext/tlm_core/1/req_rsp/ports/event_finder.hh9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/systemc/ext/tlm_core/1/req_rsp/ports/event_finder.hh b/src/systemc/ext/tlm_core/1/req_rsp/ports/event_finder.hh
index cdf2d8b58..a56118b3f 100644
--- a/src/systemc/ext/tlm_core/1/req_rsp/ports/event_finder.hh
+++ b/src/systemc/ext/tlm_core/1/req_rsp/ports/event_finder.hh
@@ -20,6 +20,8 @@
#ifndef __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__
#define __SYSTEMC_EXT_TLM_CORE_1_REQ_RSP_PORTS_EVENT_FINDER_HH__
+#include <sstream>
+
#include "tlm_core/1/req_rsp/interfaces/tag.hh"
namespace tlm
@@ -56,9 +58,12 @@ tlm_event_finder_t<IF, T>::find_event(sc_core::sc_interface *if_p) const
{
const IF *iface = if_p ? dynamic_cast<const IF *>(if_p) :
dynamic_cast<const IF *>(port()->_gem5Interface(0));
- static sc_core::sc_event none;
if (iface == nullptr) {
- report_error(sc_core::SC_ID_FIND_EVENT_, "port is not bound");
+ std::ostringstream out;
+ out << "port is not bound: port '" << port()->name() <<
+ "' (" << port()->kind() << ")";
+ SC_REPORT_ERROR(sc_core::SC_ID_FIND_EVENT_, out.str().c_str());
+ static sc_core::sc_event none;
return none;
}
return (const_cast<IF *>(iface)->*m_event_method)(nullptr);