#include <sstream>
-#include "base/logging.hh"
+#include "base/cprintf.hh"
#include "systemc/core/module.hh"
#include "systemc/core/port.hh"
#include "systemc/core/scheduler.hh"
}
void
-sc_port_base::warn_unimpl(const char *func) const
+sc_port_base::warn_port_constructor() const
{
- warn("%s not implemented.\n", func);
+ static bool warned = false;
+ if (!warned) {
+ SC_REPORT_INFO(SC_ID_IEEE_1666_DEPRECATION_,
+ "interface and/or port binding in port constructors "
+ "is deprecated");
+ warned = true;
+ }
}
void
sc_port_base(const char *name, int n, sc_port_policy p);
virtual ~sc_port_base();
- void warn_unimpl(const char *func) const;
+ void warn_port_constructor() const;
int maxSize() const;
int size() const;
// 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.
+ this->warn_port_constructor();
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.
+ this->warn_port_constructor();
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.
+ this->warn_port_constructor();
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.
+ this->warn_port_constructor();
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.
+ this->warn_port_constructor();
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.
+ this->warn_port_constructor();
sc_port_b<IF>::bind(parent);
}