From 411f9077dc914c76b37104acd209a7944cbf037a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Thu, 7 Jun 2018 18:23:41 -0700 Subject: 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 Maintainer: Gabe Black --- src/systemc/ext/core/sc_port.hh | 64 +++++++++++++++++++++++++++++++++-------- 1 file changed, 52 insertions(+), 12 deletions(-) (limited to 'src/systemc/ext/core/sc_port.hh') 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 &) { - 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 &) { - 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 sc_port : public sc_port_b { public: - sc_port() : sc_port_b(sc_gen_unique_name("sc_port"), N, P) {} + sc_port() : sc_port_b(N, P) {} explicit sc_port(const char *name) : sc_port_b(name, N, P) {} virtual ~sc_port() {} + // Deprecated binding constructors. + explicit sc_port(const IF &interface) : sc_port_b(N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b::bind(const_cast(interface)); + } + sc_port(const char *name, const IF &interface) : sc_port_b(name, N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b::bind(const_cast(interface)); + } + explicit sc_port(sc_port_b &parent) : sc_port_b(N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b::bind(parent); + } + sc_port(const char *name, sc_port_b &parent) : + sc_port_b(name, N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b::bind(parent); + } + explicit sc_port(sc_port &parent) : sc_port_b(N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b::bind(parent); + } + sc_port(const char *name, sc_port &parent) : + sc_port_b(name, N, P) + { + this->warn_unimpl(__PRETTY_FUNCTION__); + // Should warn that these are deprecated. See Accellera sc_port.h. + sc_port_b::bind(parent); + } + virtual const char *kind() const { return "sc_port"; } private: -- cgit v1.2.3