summaryrefslogtreecommitdiff
path: root/src/systemc/ext/channel/sc_in_rv.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2018-09-15 15:24:28 -0700
committerGabe Black <gabeblack@google.com>2018-10-09 21:52:42 +0000
commitdd017903991f51e1fa8df8dbc21cbb4a1501c1c1 (patch)
tree39f7e475414aaeef75dbb2bb2d9f7f7b30ff367f /src/systemc/ext/channel/sc_in_rv.hh
parentfad9488643dbf09e4d99b89b6b775fd6f1b24ba6 (diff)
downloadgem5-dd017903991f51e1fa8df8dbc21cbb4a1501c1c1.tar.xz
systemc: Implement the sc_signal_rv channel and ports.
Change-Id: Id1a3fd2ded224bbe94a4a65e0acf34a3547aedcc Reviewed-on: https://gem5-review.googlesource.com/c/12813 Reviewed-by: Gabe Black <gabeblack@google.com> Maintainer: Gabe Black <gabeblack@google.com>
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"; }