summaryrefslogtreecommitdiff
path: root/src/mem/port.hh
diff options
context:
space:
mode:
authorGabe Black <gabeblack@google.com>2019-08-17 00:13:09 -0700
committerGabe Black <gabeblack@google.com>2019-08-28 02:14:21 +0000
commitc387a212d98024e42e4267ff364c2976f976d666 (patch)
treede4f67564682bb2d8633dc99f6cb048481c7e370 /src/mem/port.hh
parent4d503eeffee054de0aab10962c345ca4bcb54140 (diff)
downloadgem5-c387a212d98024e42e4267ff364c2976f976d666.tar.xz
mem: Eliminate the Base(Slave|Master)Port classes.
The Port class has assumed all the duties of the less generic Base*Port classes, making them unnecessary. Since they don't add anything but make the code more complex, this change eliminates them. Change-Id: Ibb9c56def04465f353362595c1f1c5ac5083e5e9 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/20236 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Gabe Black <gabeblack@google.com>
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r--src/mem/port.hh45
1 files changed, 2 insertions, 43 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 0b589dafc..014908402 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -60,47 +60,6 @@
class SimObject;
/** Forward declaration */
-class BaseSlavePort;
-
-/**
- * A BaseMasterPort is a protocol-agnostic master port, responsible
- * only for the structural connection to a slave port. The final
- * master port that inherits from the base class must override the
- * bind member function for the specific slave port class.
- */
-class BaseMasterPort : public Port
-{
- protected:
- BaseSlavePort *_baseSlavePort;
-
- BaseMasterPort(const std::string &name, PortID id=InvalidPortID);
- virtual ~BaseMasterPort();
-
- public:
- BaseSlavePort& getSlavePort() const;
- void bind(Port &peer) override;
- void unbind() override;
-};
-
-/**
- * A BaseSlavePort is a protocol-agnostic slave port, responsible
- * only for the structural connection to a master port.
- */
-class BaseSlavePort : public Port
-{
- protected:
- BaseMasterPort *_baseMasterPort;
-
- BaseSlavePort(const std::string &name, PortID id=InvalidPortID);
- virtual ~BaseSlavePort();
-
- public:
- BaseMasterPort& getMasterPort() const;
- void bind(Port &peer) override;
- void unbind() override;
-};
-
-/** Forward declaration */
class SlavePort;
/**
@@ -113,7 +72,7 @@ class SlavePort;
* The three protocols are atomic, timing, and functional, each with its own
* header file.
*/
-class MasterPort : public BaseMasterPort, public AtomicRequestProtocol,
+class MasterPort : public Port, public AtomicRequestProtocol,
public TimingRequestProtocol, public FunctionalRequestProtocol
{
friend class SlavePort;
@@ -296,7 +255,7 @@ class MasterPort : public BaseMasterPort, public AtomicRequestProtocol,
* The three protocols are atomic, timing, and functional, each with its own
* header file.
*/
-class SlavePort : public BaseSlavePort, public AtomicResponseProtocol,
+class SlavePort : public Port, public AtomicResponseProtocol,
public TimingResponseProtocol, public FunctionalResponseProtocol
{
friend class MasterPort;