diff options
author | Gabe Black <gabeblack@google.com> | 2018-06-07 18:23:41 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2018-08-15 01:30:50 +0000 |
commit | 411f9077dc914c76b37104acd209a7944cbf037a (patch) | |
tree | 8890441a8498dde3a11e77d379cda0032035dc4b /src/systemc/ext/core | |
parent | 9a457d97b543c5e1c03cf40b78ca4c53bf902642 (diff) | |
download | gem5-411f9077dc914c76b37104acd209a7944cbf037a.tar.xz |
systemc: Add in the deprecated binding port constructors.
These are needed by... you guessed it, the regression tests.
Change-Id: Id30e71944cc7f3faca7dcb197f37938368364fcd
Reviewed-on: https://gem5-review.googlesource.com/10958
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/systemc/ext/core')
-rw-r--r-- | src/systemc/ext/core/sc_port.hh | 64 |
1 files changed, 52 insertions, 12 deletions
diff --git a/src/systemc/ext/core/sc_port.hh b/src/systemc/ext/core/sc_port.hh index b2f9bd8bb..dfcae95da 100644 --- a/src/systemc/ext/core/sc_port.hh +++ b/src/systemc/ext/core/sc_port.hh @@ -61,73 +61,73 @@ class sc_port_b : public sc_port_base void operator () (IF &) { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); } void operator () (sc_port_b<IF> &) { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); } virtual void bind(IF &) { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); } virtual void bind(sc_port_b<IF> &) { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); } int size() const { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return 0; } IF * operator -> () { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return (IF *)nullptr; } const IF * operator -> () const { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return (IF *)nullptr; } IF * operator [] (int) { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return (IF *)nullptr; } const IF * operator [] (int) const { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return (IF *)nullptr; } virtual sc_interface * get_interface() { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return (sc_interface *)nullptr; } virtual const sc_interface * get_interface() const { - warn_unimpl(__PRETTY_FUNCTION__); + this->warn_unimpl(__PRETTY_FUNCTION__); return (sc_interface *)nullptr; } @@ -156,10 +156,50 @@ template <class IF, int N=1, sc_port_policy P=SC_ONE_OR_MORE_BOUND> class sc_port : public sc_port_b<IF> { public: - sc_port() : sc_port_b<IF>(sc_gen_unique_name("sc_port"), N, P) {} + sc_port() : sc_port_b<IF>(N, P) {} explicit sc_port(const char *name) : sc_port_b<IF>(name, N, P) {} virtual ~sc_port() {} + // Deprecated binding constructors. + explicit sc_port(const IF &interface) : sc_port_b<IF>(N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b<IF>::bind(const_cast<IF &>(interface)); + } + sc_port(const char *name, const IF &interface) : sc_port_b<IF>(name, N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b<IF>::bind(const_cast<IF &>(interface)); + } + explicit sc_port(sc_port_b<IF> &parent) : sc_port_b<IF>(N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b<IF>::bind(parent); + } + sc_port(const char *name, sc_port_b<IF> &parent) : + sc_port_b<IF>(name, N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b<IF>::bind(parent); + } + explicit sc_port(sc_port<IF, N, P> &parent) : sc_port_b<IF>(N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b<IF>::bind(parent); + } + sc_port(const char *name, sc_port<IF, N, P> &parent) : + sc_port_b<IF>(name, N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b<IF>::bind(parent); + } + virtual const char *kind() const { return "sc_port"; } private: |