diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2012-05-30 05:29:07 -0400 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2012-05-30 05:29:07 -0400 |
commit | 6a54f7fc5ff1c33bc9f222014dc08c33248b0299 (patch) | |
tree | 64eac06f922b1a88596960d633981a67feaa271f /src | |
parent | 3b367db42c5eedac8a60cbbd58bb4e39012bb5cf (diff) | |
download | gem5-6a54f7fc5ff1c33bc9f222014dc08c33248b0299.tar.xz |
Packet: Updated comments for src and dest fields
This patch updates the comments for the src and dest fields to reflect
their actual use. Due to a number of patches (e.g. removing the
Broadcast flag), the old comments are no longer indicative of the
current usage.
Diffstat (limited to 'src')
-rw-r--r-- | src/mem/packet.hh | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index fc48b08ce..50a6f3d5a 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -295,19 +295,26 @@ class Packet : public FastAlloc, public Printable unsigned size; /** - * Device address (e.g., bus ID) of the source of the - * transaction. The source is not responsible for setting this - * field; it is set implicitly by the interconnect when the packet - * is first sent. + * Source port identifier set on a request packet to enable + * appropriate routing of the responses. The source port + * identifier is set by any multiplexing component, e.g. a bus, as + * the timing responses need this information to be routed back to + * the appropriate port at a later point in time. The field can be + * updated (over-written) as the request packet passes through + * additional multiplexing components, and it is their + * responsibility to remember the original source port identifier, + * for example by using an appropriate sender state. The latter is + * done in the cache and bridge. */ NodeID src; /** - * Device address (e.g., bus ID) of the destination of the - * transaction. The special value Broadcast indicates that the - * packet should be routed based on its address. This field is - * initialized in the constructor and is thus always valid (unlike - * addr, size, and src). + * Destination port identifier that is present on all response + * packets that passed through a multiplexing component as a + * request packet. The source port identifier is turned into a + * destination port identifier when the packet is turned into a + * response, and the destination is used, e.g. by the bus, to + * select the appropriate path through the interconnect. */ NodeID dest; @@ -527,8 +534,7 @@ class Packet : public FastAlloc, public Printable /** * Constructor. Note that a Request object must be constructed * first, but the Requests's physical address and size fields need - * not be valid. The command and destination addresses must be - * supplied. + * not be valid. The command must be supplied. */ Packet(Request *_req, MemCmd _cmd) : cmd(_cmd), req(_req), data(NULL), @@ -620,9 +626,10 @@ class Packet : public FastAlloc, public Printable /** * Take a request packet and modify it in place to be suitable for - * returning as a response to that request. The source and - * destination fields are *not* modified, as is appropriate for - * atomic accesses. + * returning as a response to that request. The source field is + * turned into the destination, and subsequently cleared. Note + * that the latter is not necessary for atomic requests, but + * causes no harm as neither field is valid. */ void makeResponse() |