summaryrefslogtreecommitdiff
path: root/src/systemc/ext/channel/sc_in_rv.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/ext/channel/sc_in_rv.hh')
-rw-r--r--src/systemc/ext/channel/sc_in_rv.hh16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/systemc/ext/channel/sc_in_rv.hh b/src/systemc/ext/channel/sc_in_rv.hh
index eca2c0c7e..278b95864 100644
--- a/src/systemc/ext/channel/sc_in_rv.hh
+++ b/src/systemc/ext/channel/sc_in_rv.hh
@@ -30,7 +30,10 @@
#ifndef __SYSTEMC_EXT_CHANNEL_SC_IN_RV_HH__
#define __SYSTEMC_EXT_CHANNEL_SC_IN_RV_HH__
+#include <sstream>
+
#include "sc_in.hh"
+#include "sc_signal_rv.hh"
namespace sc_dt
{
@@ -51,7 +54,18 @@ class sc_in_rv : public sc_in<sc_dt::sc_lv<W>>
explicit sc_in_rv(const char *name) : sc_in<sc_dt::sc_lv<W>>(name) {}
virtual ~sc_in_rv() {};
- virtual void end_of_elaboration() {}
+ virtual void
+ end_of_elaboration()
+ {
+ sc_in<sc_dt::sc_lv<W> >::end_of_elaboration();
+ if (!dynamic_cast<sc_signal_rv<W> *>(this->get_interface())) {
+ std::ostringstream ss;
+ ss << "port '" << this->name() << "' (" << this->kind() << ")";
+ SC_REPORT_ERROR(
+ "(E117) resolved port not bound to resolved signal",
+ ss.str().c_str());
+ }
+ }
virtual const char *kind() const { return "sc_in_rv"; }