summaryrefslogtreecommitdiff
path: root/src/mem/port.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r--src/mem/port.hh20
1 files changed, 6 insertions, 14 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 840952354..c70733bf6 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -78,14 +78,6 @@ class MemObject;
class Port
{
- public:
-
- /** A type name for the port identifier. */
- typedef int PortId;
-
- /** A symbolic name for the absence of a port id. */
- static const PortId INVALID_PORT_ID = -1;
-
private:
/** Descriptive name (for DPRINTF output) */
@@ -95,9 +87,9 @@ class Port
/**
* A numeric identifier to distinguish ports in a vector, and set
- * to INVALID_PORT_ID in case this port is not part of a vector.
+ * to InvalidPortID in case this port is not part of a vector.
*/
- const PortId id;
+ const PortID id;
/** A pointer to the peer port. */
Port* peer;
@@ -112,7 +104,7 @@ class Port
* @param _owner The MemObject that is the structural owner of this port
* @param _id A port identifier for vector ports
*/
- Port(const std::string& _name, MemObject& _owner, PortId _id);
+ Port(const std::string& _name, MemObject& _owner, PortID _id);
/**
* Virtual destructor due to inheritance.
@@ -125,7 +117,7 @@ class Port
const std::string name() const { return portName; }
/** Get the port id. */
- PortId getId() const { return id; }
+ PortID getId() const { return id; }
protected:
@@ -167,7 +159,7 @@ class MasterPort : public Port
public:
MasterPort(const std::string& name, MemObject* owner,
- PortId id = INVALID_PORT_ID);
+ PortID id = InvalidPortID);
virtual ~MasterPort();
void bind(SlavePort& slave_port);
@@ -305,7 +297,7 @@ class SlavePort : public Port
public:
SlavePort(const std::string& name, MemObject* owner,
- PortId id = INVALID_PORT_ID);
+ PortID id = InvalidPortID);
virtual ~SlavePort();
void bind(MasterPort& master_port);