31d30
< #include "systemc/core/bindinfo.hh"
32a32
> #include "systemc/core/port.hh"
59c59
< sc_object(name), _maxSize(n), _size(0), finalized(false)
---
> sc_object(name), _gem5Port(new ::sc_gem5::Port(this, n))
79,80c79
< void
< sc_port_base::warn_unimpl(const char *func) const
---
> sc_port_base::~sc_port_base()
82c81
< warn("%s not implemented.\n", func);
---
> delete _gem5Port;
85,87d83
< int sc_port_base::maxSize() const { return _maxSize; }
< int sc_port_base::size() const { return _size; }
<
89c85
< sc_port_base::bind(sc_interface &i)
---
> sc_port_base::warn_unimpl(const char *func) const
91c87
< _gem5BindInfo.push_back(new ::sc_gem5::BindInfo(&i));
---
> warn("%s not implemented.\n", func);
94,98c90,91
< void
< sc_port_base::bind(sc_port_base &p)
< {
< _gem5BindInfo.push_back(new ::sc_gem5::BindInfo(&p));
< }
---
> int sc_port_base::maxSize() const { return _gem5Port->maxSize(); }
> int sc_port_base::size() const { return _gem5Port->size(); }
100,105c93,94
< void
< sc_port_base::_gem5Finalize()
< {
< if (finalized)
< return;
< finalized = true;
---
> void sc_port_base::bind(sc_interface &i) { _gem5Port->bind(&i); }
> void sc_port_base::bind(sc_port_base &p) { _gem5Port->bind(&p); }
107,125d95
< for (auto &bi: _gem5BindInfo) {
< if (bi->interface) {
< _size++;
< _gem5AddInterface(bi->interface);
< } else {
< sc_port_base *port = bi->port;
< port->_gem5Finalize();
< int size = port->size();
< for (int i = 0; i < size; i++) {
< _size++;
< _gem5AddInterface(port->_gem5Interface(i));
< }
< }
< delete bi;
< }
<
< _gem5BindInfo.clear();
< }
<