summaryrefslogtreecommitdiff
path: root/src/systemc/ext/channel/sc_inout_rv.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemc/ext/channel/sc_inout_rv.hh')
-rw-r--r--src/systemc/ext/channel/sc_inout_rv.hh36
1 files changed, 25 insertions, 11 deletions
diff --git a/src/systemc/ext/channel/sc_inout_rv.hh b/src/systemc/ext/channel/sc_inout_rv.hh
index f231d9311..5ff9d105e 100644
--- a/src/systemc/ext/channel/sc_inout_rv.hh
+++ b/src/systemc/ext/channel/sc_inout_rv.hh
@@ -30,9 +30,12 @@
#ifndef __SYSTEMC_EXT_CHANNEL_SC_INOUT_RV_HH__
#define __SYSTEMC_EXT_CHANNEL_SC_INOUT_RV_HH__
+#include <sstream>
+
#include "../core/sc_port.hh"
#include "sc_signal_in_if.hh"
#include "sc_signal_inout_if.hh"
+#include "sc_signal_rv.hh"
#include "warn_unimpl.hh"
namespace sc_dt
@@ -55,37 +58,48 @@ class sc_inout_rv : public sc_inout<sc_dt::sc_lv<W>>
virtual ~sc_inout_rv() {}
sc_inout_rv<W> &
- operator = (const sc_dt::sc_lv<W> &)
+ operator = (const sc_dt::sc_lv<W> &l)
{
- sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ (*this)->write(l);
return *this;
}
sc_inout_rv<W> &
- operator = (const sc_signal_in_if<sc_dt::sc_lv<W>> &)
+ operator = (const sc_signal_in_if<sc_dt::sc_lv<W>> &i)
{
- sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ (*this)->write(i.read());
return *this;
}
sc_inout_rv<W> &
- operator = (const sc_port<sc_signal_in_if<sc_dt::sc_lv<W>>, 1> &)
+ operator = (const sc_port<sc_signal_in_if<sc_dt::sc_lv<W>>, 1> &p)
{
- sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ (*this)->write(p->read());
return *this;
}
sc_inout_rv<W> &
- operator = (const sc_port<sc_signal_inout_if<sc_dt::sc_lv<W>>, 1> &)
+ operator = (const sc_port<sc_signal_inout_if<sc_dt::sc_lv<W>>, 1> &p)
{
- sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ (*this)->write(p->read());
return *this;
}
sc_inout_rv<W> &
- operator = (const sc_inout_rv<W> &)
+ operator = (const sc_inout_rv<W> &p)
{
- sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
+ (*this)->write(p->read());
return *this;
}
- virtual void end_of_elaboration() {};
+ virtual void
+ end_of_elaboration()
+ {
+ sc_inout<sc_dt::sc_lv<W> >::end_of_elaboration();
+ if (!dynamic_cast<sc_signal_rv<W> *>(this->get_interface())) {
+ std::ostringstream ss;
+ ss << 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_inout_rv"; }
};