diff options
author | Nathan Binkert <nate@binkert.org> | 2008-06-15 21:34:32 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2008-06-15 21:34:32 -0700 |
commit | e3c267a3dbe628516777dd74662c786ef4eedceb (patch) | |
tree | 1896fcf08d73fb919ef361e678fddc044cb976a9 /src/mem/port.hh | |
parent | b429b1759defba2f8da1f894f6a3500e3f2c78d2 (diff) | |
download | gem5-e3c267a3dbe628516777dd74662c786ef4eedceb.tar.xz |
port: Clean up default port setup and port switchover code.
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r-- | src/mem/port.hh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh index f66b566ea..15fda2164 100644 --- a/src/mem/port.hh +++ b/src/mem/port.hh @@ -73,8 +73,7 @@ class MemObject; */ class Port { - private: - + protected: /** Descriptive name (for DPRINTF output) */ mutable std::string portName; @@ -103,7 +102,7 @@ class Port /** Return port name (for DPRINTF). */ const std::string &name() const { return portName; } - virtual ~Port() {}; + virtual ~Port(); // mey be better to use subclasses & RTTI? /** Holds the ports status. Currently just that a range recomputation needs @@ -131,7 +130,9 @@ class Port * demise. */ void removeConn(); - virtual bool isDefaultPort() { return false; } + virtual bool isDefaultPort() const { return false; } + + bool isConnected() { return peer && !peer->isDefaultPort(); } protected: |