packet.hh (7465:f97b62be544f) | packet.hh (7550:7d97cec15818) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * Copyright (c) 2010 Advancec Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 449 unchanged lines hidden (view full) --- 458 /// Accessor function to set the destination index of the packet. 459 void setDest(NodeID _dest) { dest = _dest; flags.set(VALID_DST); } 460 461 Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; } 462 unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; } 463 Addr getOffset(int blkSize) const { return getAddr() & (Addr)(blkSize - 1); } 464 465 /** | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan 3 * Copyright (c) 2010 Advancec Micro Devices, Inc. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright --- 449 unchanged lines hidden (view full) --- 458 /// Accessor function to set the destination index of the packet. 459 void setDest(NodeID _dest) { dest = _dest; flags.set(VALID_DST); } 460 461 Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; } 462 unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; } 463 Addr getOffset(int blkSize) const { return getAddr() & (Addr)(blkSize - 1); } 464 465 /** |
466 * It has been determined that the SC packet should successfully update 467 * memory. Therefore, convert this SC packet to a normal write. 468 */ 469 void 470 convertScToWrite() 471 { 472 assert(isLLSC()); 473 assert(isWrite()); 474 cmd = MemCmd::WriteReq; 475 } 476 477 /** 478 * When ruby is in use, Ruby will monitor the cache line and thus M5 479 * phys memory should treat LL ops as normal reads. 480 */ 481 void 482 convertLlToRead() 483 { 484 assert(isLLSC()); 485 assert(isRead()); 486 cmd = MemCmd::ReadReq; 487 } 488 489 /** |
|
466 * Constructor. Note that a Request object must be constructed 467 * first, but the Requests's physical address and size fields need 468 * not be valid. The command and destination addresses must be 469 * supplied. 470 */ 471 Packet(Request *_req, MemCmd _cmd, NodeID _dest) 472 : flags(VALID_DST), cmd(_cmd), req(_req), data(NULL), 473 dest(_dest), time(curTick), senderState(NULL) --- 317 unchanged lines hidden --- | 490 * Constructor. Note that a Request object must be constructed 491 * first, but the Requests's physical address and size fields need 492 * not be valid. The command and destination addresses must be 493 * supplied. 494 */ 495 Packet(Request *_req, MemCmd _cmd, NodeID _dest) 496 : flags(VALID_DST), cmd(_cmd), req(_req), data(NULL), 497 dest(_dest), time(curTick), senderState(NULL) --- 317 unchanged lines hidden --- |