diff options
author | Gabe Black <gabeblack@google.com> | 2019-03-07 00:45:09 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-03-15 18:38:35 +0000 |
commit | 993c26938cb73239838893e3f5e46635392ea488 (patch) | |
tree | 9fdc5b947df798923263c7c8d30327cd5ef73383 /src/mem | |
parent | 6e8be00dff5717ba6bd066749d1847ea48680878 (diff) | |
download | gem5-993c26938cb73239838893e3f5e46635392ea488.tar.xz |
mem: Move the Port base class into sim.
The Port class is going to be officially used for more than just memory
system connections.
Change-Id: I493e721f99051865c5f0c06946a2303ff723c2af
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17036
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/mem')
-rw-r--r-- | src/mem/port.cc | 9 | ||||
-rw-r--r-- | src/mem/port.hh | 45 |
2 files changed, 1 insertions, 53 deletions
diff --git a/src/mem/port.cc b/src/mem/port.cc index ab62ccf1d..6f72bbd38 100644 --- a/src/mem/port.cc +++ b/src/mem/port.cc @@ -51,15 +51,6 @@ #include "base/trace.hh" #include "mem/mem_object.hh" -Port::Port(const std::string &_name, PortID _id) - : portName(_name), id(_id) -{ -} - -Port::~Port() -{ -} - BaseMasterPort::BaseMasterPort(const std::string &name, PortID _id) : Port(name, _id), _baseSlavePort(NULL) { diff --git a/src/mem/port.hh b/src/mem/port.hh index 2c30e31d1..77081db4d 100644 --- a/src/mem/port.hh +++ b/src/mem/port.hh @@ -52,53 +52,10 @@ #include "base/addr_range.hh" #include "mem/packet.hh" +#include "sim/port.hh" class MemObject; -/** - * Ports are used to interface memory objects to each other. A port is - * either a master or a slave and the connected peer is always of the - * opposite role. Each port has a name, an owner, and an identifier. - */ -class Port -{ - - private: - - /** Descriptive name (for DPRINTF output) */ - std::string portName; - - protected: - - /** - * A numeric identifier to distinguish ports in a vector, and set - * to InvalidPortID in case this port is not part of a vector. - */ - const PortID id; - - /** - * Abstract base class for ports - * - * @param _name Port name including the owners name - * @param _id A port identifier for vector ports - */ - Port(const std::string& _name, PortID _id); - - /** - * Virtual destructor due to inheritance. - */ - virtual ~Port(); - - public: - - /** Return port name (for DPRINTF). */ - const std::string name() const { return portName; } - - /** Get the port id. */ - PortID getId() const { return id; } - -}; - /** Forward declaration */ class BaseSlavePort; |