diff options
author | Gabe Black <gabeblack@google.com> | 2019-03-07 03:02:35 -0800 |
---|---|---|
committer | Gabe Black <gabeblack@google.com> | 2019-03-19 10:22:50 +0000 |
commit | d3d24835bcc03ecf312ac6ba7df114656770730f (patch) | |
tree | 43bb564a7bc3e22ffd7b1b906f6f96742ecb619a /src/mem/external_slave.hh | |
parent | 378d9ccbeb4053aeeab002159b26625854af54f7 (diff) | |
download | gem5-d3d24835bcc03ecf312ac6ba7df114656770730f.tar.xz |
arch, cpu, dev, gpu, mem, sim, python: start using getPort.
Replace the getMasterPort, getSlavePort, and getEthPort functions
with getPort, and remove extraneous mechanisms that are no longer
necessary.
Change-Id: Iab7e3c02d2f3a0cf33e7e824e18c28646b5bc318
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17040
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/mem/external_slave.hh')
-rw-r--r-- | src/mem/external_slave.hh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mem/external_slave.hh b/src/mem/external_slave.hh index 2bb0be869..7290d6339 100644 --- a/src/mem/external_slave.hh +++ b/src/mem/external_slave.hh @@ -67,18 +67,18 @@ class ExternalSlave : public MemObject { public: /** Derive from this class to create an external port interface */ - class Port : public SlavePort + class ExternalPort : public SlavePort { protected: ExternalSlave &owner; public: - Port(const std::string &name_, + ExternalPort(const std::string &name_, ExternalSlave &owner_) : SlavePort(name_, &owner_), owner(owner_) { } - ~Port() { } + ~ExternalPort() { } /** Any or all of recv... can be overloaded to provide the port's * functionality */ @@ -95,14 +95,14 @@ class ExternalSlave : public MemObject public: /** Create or find an external port which can be bound. Returns * NULL on failure */ - virtual Port *getExternalPort( + virtual ExternalPort *getExternalPort( const std::string &name, ExternalSlave &owner, const std::string &port_data) = 0; }; protected: /** The peer port for the gem5 port "port" */ - Port *externalPort; + ExternalPort *externalPort; /** Name of the bound port. This will be name() + ".port" */ std::string portName; @@ -126,9 +126,9 @@ class ExternalSlave : public MemObject public: ExternalSlave(ExternalSlaveParams *params); - /** SlavePort interface. Responds only to port "port" */ - BaseSlavePort &getSlavePort(const std::string &if_name, - PortID idx = InvalidPortID); + /** Port interface. Responds only to port "port" */ + Port &getPort(const std::string &if_name, + PortID idx=InvalidPortID) override; /** Register a handler which can provide ports with port_type == * handler_name */ |