summaryrefslogtreecommitdiff
path: root/src/systemc/channel/sc_in_resolved.cc
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-11 20:14:22 -0700
committerGabe Black <gabeblack@google.com>2018-10-09 21:47:27 +0000
commit5a1ad990a64adccaa6116288771628103e47157c (patch)
tree6991311041e148e1f25a5f9bc5bfa73267991ee9 /src/systemc/channel/sc_in_resolved.cc
parenta41c71b3121b0e31f9c69032aaf91c222b857e8c (diff)
downloadgem5-5a1ad990a64adccaa6116288771628103e47157c.tar.xz
systemc: Implement the sc_*_resolved classes.
Change-Id: Ib595da10e0f900ee4cc1847d41d29251dacb55d7 Reviewed-on: https://gem5-review.googlesource.com/c/12620 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/channel/sc_in_resolved.cc')
-rw-r--r--src/systemc/channel/sc_in_resolved.cc14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/systemc/channel/sc_in_resolved.cc b/src/systemc/channel/sc_in_resolved.cc
index b57f4cd7d..40190c895 100644
--- a/src/systemc/channel/sc_in_resolved.cc
+++ b/src/systemc/channel/sc_in_resolved.cc
@@ -29,6 +29,7 @@
#include "base/logging.hh"
#include "systemc/ext/channel/sc_in_resolved.hh"
+#include "systemc/ext/channel/sc_signal_resolved.hh"
namespace sc_core
{
@@ -41,8 +42,15 @@ sc_in_resolved::sc_in_resolved(const char *name) :
sc_in_resolved::~sc_in_resolved() {}
-void sc_in_resolved::end_of_elaboration() {}
-
-const char *sc_in_resolved::kind() const { return "sc_in_resolved"; }
+void
+sc_in_resolved::end_of_elaboration()
+{
+ sc_in<sc_dt::sc_logic>::end_of_elaboration();
+ if (!dynamic_cast<sc_signal_resolved *>(get_interface())) {
+ std::string msg = csprintf("%s (%s)", name(), kind());
+ SC_REPORT_ERROR("(E117) resolved port not bound to resolved signal",
+ msg.c_str());
+ }
+}
} // namespace sc_core