systemc: Make sc_out delegate to its base class sc_inout.
authorGabe Black <gabeblack@google.com>
Tue, 21 Aug 2018 00:45:42 +0000 (17:45 -0700)
committerGabe Black <gabeblack@google.com>
Tue, 25 Sep 2018 23:52:21 +0000 (23:52 +0000)
The spec says these are essentially identical classes, they just have
both so that users can show their intent.

Change-Id: I51908edca89acea25891a52bfa7fca0681ccfc5c
Reviewed-on: https://gem5-review.googlesource.com/12220
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>

src/systemc/ext/channel/sc_out.hh

index 53bd2556017d2d266c8db7b71a5a2c01904bf03d..37e9a598295fa03dc6610bad2a00613d000dcb94 100644 (file)
@@ -62,34 +62,34 @@ class sc_out : public sc_inout<T>
     sc_out(const char *name, sc_out<T> &parent) : sc_inout<T>(name, parent) {}
 
     sc_out<T> &
-    operator = (const T &)
+    operator = (const T &t)
     {
-        sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
-        return *(sc_out<T> *)nullptr;
+        sc_inout<T>::operator = (t);
+        return *this;
     }
     sc_out<T> &
-    operator = (const sc_signal_in_if<T> &)
+    operator = (const sc_signal_in_if<T> &c)
     {
-        sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
-        return *(sc_out<T> *)nullptr;
+        sc_inout<T>::operator = (c);
+        return *this;
     }
     sc_out<T> &
-    operator = (const sc_port<sc_signal_in_if<T>, 1> &)
+    operator = (const sc_port<sc_signal_in_if<T>, 1> &c)
     {
-        sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
-        return *(sc_out<T> *)nullptr;
+        sc_inout<T>::operator = (c);
+        return *this;
     }
     sc_out<T> &
-    operator = (const sc_port<sc_signal_inout_if<T>, 1> &)
+    operator = (const sc_port<sc_signal_inout_if<T>, 1> &c)
     {
-        sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
-        return *(sc_out<T> *)nullptr;
+        sc_inout<T>::operator = (c);
+        return *this;
     }
     sc_out<T> &
-    operator = (const sc_out<T> &)
+    operator = (const sc_out<T> &c)
     {
-        sc_channel_warn_unimpl(__PRETTY_FUNCTION__);
-        return *(sc_out<T> *)nullptr;
+        sc_inout<T>::operator = (c);
+        return *this;
     }
 
     virtual const char *kind() const { return "sc_out"; }