packet.hh (9018:4fbbd05809d2) | packet.hh (9030:047bd5f02c6e) |
---|---|
1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 281 unchanged lines hidden (view full) --- 290 /// The address of the request. This address could be virtual or 291 /// physical, depending on the system configuration. 292 Addr addr; 293 294 /// The size of the request or transfer. 295 unsigned size; 296 297 /** | 1/* 2 * Copyright (c) 2012 ARM Limited 3 * All rights reserved 4 * 5 * The license below extends only to copyright in the software and shall 6 * not be construed as granting a license to any other intellectual 7 * property including but not limited to intellectual property relating 8 * to a hardware implementation of the functionality of the software --- 281 unchanged lines hidden (view full) --- 290 /// The address of the request. This address could be virtual or 291 /// physical, depending on the system configuration. 292 Addr addr; 293 294 /// The size of the request or transfer. 295 unsigned size; 296 297 /** |
298 * Device address (e.g., bus ID) of the source of the 299 * transaction. The source is not responsible for setting this 300 * field; it is set implicitly by the interconnect when the packet 301 * is first sent. | 298 * Source port identifier set on a request packet to enable 299 * appropriate routing of the responses. The source port 300 * identifier is set by any multiplexing component, e.g. a bus, as 301 * the timing responses need this information to be routed back to 302 * the appropriate port at a later point in time. The field can be 303 * updated (over-written) as the request packet passes through 304 * additional multiplexing components, and it is their 305 * responsibility to remember the original source port identifier, 306 * for example by using an appropriate sender state. The latter is 307 * done in the cache and bridge. |
302 */ 303 NodeID src; 304 305 /** | 308 */ 309 NodeID src; 310 311 /** |
306 * Device address (e.g., bus ID) of the destination of the 307 * transaction. The special value Broadcast indicates that the 308 * packet should be routed based on its address. This field is 309 * initialized in the constructor and is thus always valid (unlike 310 * addr, size, and src). | 312 * Destination port identifier that is present on all response 313 * packets that passed through a multiplexing component as a 314 * request packet. The source port identifier is turned into a 315 * destination port identifier when the packet is turned into a 316 * response, and the destination is used, e.g. by the bus, to 317 * select the appropriate path through the interconnect. |
311 */ 312 NodeID dest; 313 314 /** 315 * The original value of the command field. Only valid when the 316 * current command field is an error condition; in that case, the 317 * previous contents of the command field are copied here. This 318 * field is *not* set on non-error responses. --- 203 unchanged lines hidden (view full) --- 522 assert(isLLSC()); 523 assert(isRead()); 524 cmd = MemCmd::ReadReq; 525 } 526 527 /** 528 * Constructor. Note that a Request object must be constructed 529 * first, but the Requests's physical address and size fields need | 318 */ 319 NodeID dest; 320 321 /** 322 * The original value of the command field. Only valid when the 323 * current command field is an error condition; in that case, the 324 * previous contents of the command field are copied here. This 325 * field is *not* set on non-error responses. --- 203 unchanged lines hidden (view full) --- 529 assert(isLLSC()); 530 assert(isRead()); 531 cmd = MemCmd::ReadReq; 532 } 533 534 /** 535 * Constructor. Note that a Request object must be constructed 536 * first, but the Requests's physical address and size fields need |
530 * not be valid. The command and destination addresses must be 531 * supplied. | 537 * not be valid. The command must be supplied. |
532 */ 533 Packet(Request *_req, MemCmd _cmd) 534 : cmd(_cmd), req(_req), data(NULL), 535 bytesValidStart(0), bytesValidEnd(0), 536 time(curTick()), senderState(NULL) 537 { 538 if (req->hasPaddr()) { 539 addr = req->getPaddr(); --- 75 unchanged lines hidden (view full) --- 615 time = req->time(); 616 617 flags.set(VALID_ADDR|VALID_SIZE); 618 deleteData(); 619 } 620 621 /** 622 * Take a request packet and modify it in place to be suitable for | 538 */ 539 Packet(Request *_req, MemCmd _cmd) 540 : cmd(_cmd), req(_req), data(NULL), 541 bytesValidStart(0), bytesValidEnd(0), 542 time(curTick()), senderState(NULL) 543 { 544 if (req->hasPaddr()) { 545 addr = req->getPaddr(); --- 75 unchanged lines hidden (view full) --- 621 time = req->time(); 622 623 flags.set(VALID_ADDR|VALID_SIZE); 624 deleteData(); 625 } 626 627 /** 628 * Take a request packet and modify it in place to be suitable for |
623 * returning as a response to that request. The source and 624 * destination fields are *not* modified, as is appropriate for 625 * atomic accesses. | 629 * returning as a response to that request. The source field is 630 * turned into the destination, and subsequently cleared. Note 631 * that the latter is not necessary for atomic requests, but 632 * causes no harm as neither field is valid. |
626 */ 627 void 628 makeResponse() 629 { 630 assert(needsResponse()); 631 assert(isRequest()); 632 origCmd = cmd; 633 cmd = cmd.responseCommand(); --- 235 unchanged lines hidden --- | 633 */ 634 void 635 makeResponse() 636 { 637 assert(needsResponse()); 638 assert(isRequest()); 639 origCmd = cmd; 640 cmd = cmd.responseCommand(); --- 235 unchanged lines hidden --- |