summaryrefslogtreecommitdiff
path: root/src/mem/bridge.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-05-30 05:29:42 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-05-30 05:29:42 -0400
commitcad802761a876c6dcd00d58e09c8984886c987f6 (patch)
treefcb327a8923631de61133c6ad14aeaffcc44761c /src/mem/bridge.hh
parent6a54f7fc5ff1c33bc9f222014dc08c33248b0299 (diff)
downloadgem5-cad802761a876c6dcd00d58e09c8984886c987f6.tar.xz
Packet: Unify the use of PortID in packet and port
This patch removes the Packet::NodeID typedef and unifies it with the Port::PortId. The src and dest fields in the packet are used to hold a port id (e.g. in the bus), and thus the two should actually be the same. The typedef PortID is now global (in base/types.hh) and aligned with the ThreadID in terms of capitalisation and naming of the InvalidPortID constant. Before this patch, two flags were used for valid destination and source, rather than relying on a named value (InvalidPortID), and this is now redundant, as the src and dest field themselves are sufficient to tell whether the current value is a valid port identifier or not. Consequently, the VALID_SRC and VALID_DST are removed. As part of the cleaning up, a number of int parameters and local variables are updated to use PortID. Note that Ruby still has its own NodeID typedef. Furthermore, the MemObject getMaster/SlavePort still has an int idx parameter with a default value of -1 which should eventually change to PortID idx = InvalidPortID.
Diffstat (limited to 'src/mem/bridge.hh')
-rw-r--r--src/mem/bridge.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/bridge.hh b/src/mem/bridge.hh
index 0160b8b9e..7342f4a9f 100644
--- a/src/mem/bridge.hh
+++ b/src/mem/bridge.hh
@@ -91,7 +91,7 @@ class Bridge : public MemObject
public:
Packet::SenderState *origSenderState;
- Packet::NodeID origSrc;
+ PortID origSrc;
RequestState(PacketPtr _pkt)
: origSenderState(_pkt->senderState),