summaryrefslogtreecommitdiff
path: root/src/mem/port.hh
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-05-30 19:49:28 -0400
committerSteve Reinhardt <stever@eecs.umich.edu>2006-05-30 19:49:28 -0400
commit0e5db091e91d576bd5b05d22103115496084bd19 (patch)
tree3c24e6d07713c62a1595a3e4bebc29da252b0c1b /src/mem/port.hh
parentf0c05de9f98fe3c6e386d3f0346f183ce5abe6c8 (diff)
downloadgem5-0e5db091e91d576bd5b05d22103115496084bd19.tar.xz
Fix Port pointer initialization.
src/mem/port.hh: Initialize peer port pointer to NULL. Move private data members together. --HG-- extra : convert_revision : dab01f81f0934758891a6b6dc2ad5328149d164b
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r--src/mem/port.hh16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 79fbf1fdb..d0fa5ae8d 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -74,6 +74,11 @@ class Port
/** Descriptive name (for DPRINTF output) */
const std::string portName;
+ /** A pointer to the peer port. Ports always come in pairs, that way they
+ can use a standardized interface to communicate between different
+ memory objects. */
+ Port *peer;
+
public:
/**
@@ -83,7 +88,7 @@ class Port
* of memory system object to which the port belongs.
*/
Port(const std::string &_name)
- : portName(_name)
+ : portName(_name), peer(NULL)
{ }
/** Return port name (for DPRINTF). */
@@ -98,15 +103,6 @@ class Port
RangeChange
};
- private:
-
- /** A pointer to the peer port. Ports always come in pairs, that way they
- can use a standardized interface to communicate between different
- memory objects. */
- Port *peer;
-
- public:
-
/** Function to set the pointer for the peer port.
@todo should be called by the configuration stuff (python).
*/