packet.hh (10571:c848de089432) | packet.hh (10572:fc4c90a7d2f5) |
---|---|
1/* 2 * Copyright (c) 2012-2014 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 --- 530 unchanged lines hidden (view full) --- 539 { 540 assert(isResponse()); 541 cmd = MemCmd::BadAddressError; 542 } 543 544 bool hadBadAddress() const { return cmd == MemCmd::BadAddressError; } 545 void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; } 546 | 1/* 2 * Copyright (c) 2012-2014 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 --- 530 unchanged lines hidden (view full) --- 539 { 540 assert(isResponse()); 541 cmd = MemCmd::BadAddressError; 542 } 543 544 bool hadBadAddress() const { return cmd == MemCmd::BadAddressError; } 545 void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; } 546 |
547 bool isSrcValid() const { return src != InvalidPortID; } | |
548 /// Accessor function to get the source index of the packet. | 547 /// Accessor function to get the source index of the packet. |
549 PortID getSrc() const { assert(isSrcValid()); return src; } | 548 PortID getSrc() const { return src; } |
550 /// Accessor function to set the source index of the packet. 551 void setSrc(PortID _src) { src = _src; } 552 | 549 /// Accessor function to set the source index of the packet. 550 void setSrc(PortID _src) { src = _src; } 551 |
553 bool isDestValid() const { return dest != InvalidPortID; } | |
554 /// Accessor function for the destination index of the packet. | 552 /// Accessor function for the destination index of the packet. |
555 PortID getDest() const { assert(isDestValid()); return dest; } | 553 PortID getDest() const { return dest; } |
556 /// Accessor function to set the destination index of the packet. 557 void setDest(PortID _dest) { dest = _dest; } 558 /// Reset destination field, e.g. to turn a response into a request again. 559 void clearDest() { dest = InvalidPortID; } 560 561 Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; } 562 /** 563 * Update the address of this packet mid-transaction. This is used --- 458 unchanged lines hidden --- | 554 /// Accessor function to set the destination index of the packet. 555 void setDest(PortID _dest) { dest = _dest; } 556 /// Reset destination field, e.g. to turn a response into a request again. 557 void clearDest() { dest = InvalidPortID; } 558 559 Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; } 560 /** 561 * Update the address of this packet mid-transaction. This is used --- 458 unchanged lines hidden --- |