summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-06-25 00:24:50 -0400
committerKevin Lim <ktlim@umich.edu>2006-06-25 00:24:50 -0400
commitf1a24337a82b04b4bb58499a46dc80f00bdc47d7 (patch)
tree394ad02635428567f30f2f6d4c0e781b61bc66d0 /src
parent4787d357d51811bf5f4c73583e038de3f60e6a72 (diff)
downloadgem5-f1a24337a82b04b4bb58499a46dc80f00bdc47d7.tar.xz
Allow ports to be created without a name.
--HG-- extra : convert_revision : 26dad6853feaf4f68907aab902c54259281cac1c
Diffstat (limited to 'src')
-rw-r--r--src/mem/port.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 2edad095e..17b1f4a00 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -74,7 +74,7 @@ class Port
private:
/** Descriptive name (for DPRINTF output) */
- const std::string portName;
+ mutable 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
@@ -83,6 +83,10 @@ class Port
public:
+ Port()
+ : peer(NULL)
+ { }
+
/**
* Constructor.
*
@@ -105,6 +109,9 @@ class Port
RangeChange
};
+ void setName(const std::string &name)
+ { portName = name; }
+
/** Function to set the pointer for the peer port.
@todo should be called by the configuration stuff (python).
*/