packet.hh (6227:a17798f2a52c) | packet.hh (6768:c5401cb99aae) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 423 unchanged lines hidden (view full) --- 432 assert(isResponse()); 433 cmd = MemCmd::BadAddressError; 434 } 435 436 bool wasNacked() const { return cmd == MemCmd::NetworkNackError; } 437 bool hadBadAddress() const { return cmd == MemCmd::BadAddressError; } 438 void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; } 439 | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 423 unchanged lines hidden (view full) --- 432 assert(isResponse()); 433 cmd = MemCmd::BadAddressError; 434 } 435 436 bool wasNacked() const { return cmd == MemCmd::NetworkNackError; } 437 bool hadBadAddress() const { return cmd == MemCmd::BadAddressError; } 438 void copyError(Packet *pkt) { assert(pkt->isError()); cmd = pkt->cmd; } 439 |
440 bool isSrcValid() { return flags.isSet(VALID_SRC); } |
|
440 /// Accessor function to get the source index of the packet. 441 NodeID getSrc() const { assert(flags.isSet(VALID_SRC)); return src; } 442 /// Accessor function to set the source index of the packet. 443 void setSrc(NodeID _src) { src = _src; flags.set(VALID_SRC); } 444 /// Reset source field, e.g. to retransmit packet on different bus. 445 void clearSrc() { flags.clear(VALID_SRC); } 446 | 441 /// Accessor function to get the source index of the packet. 442 NodeID getSrc() const { assert(flags.isSet(VALID_SRC)); return src; } 443 /// Accessor function to set the source index of the packet. 444 void setSrc(NodeID _src) { src = _src; flags.set(VALID_SRC); } 445 /// Reset source field, e.g. to retransmit packet on different bus. 446 void clearSrc() { flags.clear(VALID_SRC); } 447 |
448 bool isDestValid() { return flags.isSet(VALID_DST); } |
|
447 /// Accessor function for the destination index of the packet. 448 NodeID getDest() const { assert(flags.isSet(VALID_DST)); return dest; } 449 /// Accessor function to set the destination index of the packet. 450 void setDest(NodeID _dest) { dest = _dest; flags.set(VALID_DST); } 451 452 Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; } 453 unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; } 454 Addr getOffset(int blkSize) const { return getAddr() & (Addr)(blkSize - 1); } --- 314 unchanged lines hidden --- | 449 /// Accessor function for the destination index of the packet. 450 NodeID getDest() const { assert(flags.isSet(VALID_DST)); return dest; } 451 /// Accessor function to set the destination index of the packet. 452 void setDest(NodeID _dest) { dest = _dest; flags.set(VALID_DST); } 453 454 Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; } 455 unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; } 456 Addr getOffset(int blkSize) const { return getAddr() & (Addr)(blkSize - 1); } --- 314 unchanged lines hidden --- |