packet.hh (12347:c4bb52d1aba4) | packet.hh (12349:47f454120200) |
---|---|
1/* 2 * Copyright (c) 2012-2017 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 --- 28 unchanged lines hidden (view full) --- 37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 * 41 * Authors: Ron Dreslinski 42 * Steve Reinhardt 43 * Ali Saidi 44 * Andreas Hansson | 1/* 2 * Copyright (c) 2012-2017 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 --- 28 unchanged lines hidden (view full) --- 37 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 38 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 39 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 40 * 41 * Authors: Ron Dreslinski 42 * Steve Reinhardt 43 * Ali Saidi 44 * Andreas Hansson |
45 * Nikos Nikoleris |
|
45 */ 46 47/** 48 * @file 49 * Declaration of the Packet class. 50 */ 51 52#ifndef __MEM_PACKET_HH__ --- 201 unchanged lines hidden (view full) --- 254 public: 255 typedef uint32_t FlagsType; 256 typedef ::Flags<FlagsType> Flags; 257 258 private: 259 260 enum : FlagsType { 261 // Flags to transfer across when copying a packet | 46 */ 47 48/** 49 * @file 50 * Declaration of the Packet class. 51 */ 52 53#ifndef __MEM_PACKET_HH__ --- 201 unchanged lines hidden (view full) --- 255 public: 256 typedef uint32_t FlagsType; 257 typedef ::Flags<FlagsType> Flags; 258 259 private: 260 261 enum : FlagsType { 262 // Flags to transfer across when copying a packet |
262 COPY_FLAGS = 0x0000001F, | 263 COPY_FLAGS = 0x0000003F, |
263 264 // Does this packet have sharers (which means it should not be 265 // considered writable) or not. See setHasSharers below. 266 HAS_SHARERS = 0x00000001, 267 268 // Special control flags 269 /// Special timing-mode atomic snoop for multi-level coherence. 270 EXPRESS_SNOOP = 0x00000002, --- 6 unchanged lines hidden (view full) --- 277 // Snoop co-ordination flag to indicate that a cache is 278 // responding to a snoop. See setCacheResponding below. 279 CACHE_RESPONDING = 0x00000008, 280 281 // The writeback/writeclean should be propagated further 282 // downstream by the receiver 283 WRITE_THROUGH = 0x00000010, 284 | 264 265 // Does this packet have sharers (which means it should not be 266 // considered writable) or not. See setHasSharers below. 267 HAS_SHARERS = 0x00000001, 268 269 // Special control flags 270 /// Special timing-mode atomic snoop for multi-level coherence. 271 EXPRESS_SNOOP = 0x00000002, --- 6 unchanged lines hidden (view full) --- 278 // Snoop co-ordination flag to indicate that a cache is 279 // responding to a snoop. See setCacheResponding below. 280 CACHE_RESPONDING = 0x00000008, 281 282 // The writeback/writeclean should be propagated further 283 // downstream by the receiver 284 WRITE_THROUGH = 0x00000010, 285 |
286 // Response co-ordination flag for cache maintenance 287 // operations 288 SATISFIED = 0x00000020, 289 |
|
285 /// Are the 'addr' and 'size' fields valid? 286 VALID_ADDR = 0x00000100, 287 VALID_SIZE = 0x00000200, 288 289 /// Is the data pointer set to a value that shouldn't be freed 290 /// when the packet is destroyed? 291 STATIC_DATA = 0x00001000, 292 /// The data pointer points to a value that should be freed when --- 345 unchanged lines hidden (view full) --- 638 { 639 assert(cmd.isWrite() && 640 (cmd.isEviction() || cmd == MemCmd::WriteClean)); 641 flags.set(WRITE_THROUGH); 642 } 643 void clearWriteThrough() { flags.clear(WRITE_THROUGH); } 644 bool writeThrough() const { return flags.isSet(WRITE_THROUGH); } 645 | 290 /// Are the 'addr' and 'size' fields valid? 291 VALID_ADDR = 0x00000100, 292 VALID_SIZE = 0x00000200, 293 294 /// Is the data pointer set to a value that shouldn't be freed 295 /// when the packet is destroyed? 296 STATIC_DATA = 0x00001000, 297 /// The data pointer points to a value that should be freed when --- 345 unchanged lines hidden (view full) --- 643 { 644 assert(cmd.isWrite() && 645 (cmd.isEviction() || cmd == MemCmd::WriteClean)); 646 flags.set(WRITE_THROUGH); 647 } 648 void clearWriteThrough() { flags.clear(WRITE_THROUGH); } 649 bool writeThrough() const { return flags.isSet(WRITE_THROUGH); } 650 |
651 /** 652 * Set when a request hits in a cache and the cache is not going 653 * to respond. This is used by the crossbar to coordinate 654 * responses for cache maintenance operations. 655 */ 656 void setSatisfied() 657 { 658 assert(cmd.isClean()); 659 assert(!flags.isSet(SATISFIED)); 660 flags.set(SATISFIED); 661 } 662 bool satisfied() const { return flags.isSet(SATISFIED); } 663 |
|
646 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); } 647 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); } 648 void setBlockCached() { flags.set(BLOCK_CACHED); } 649 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); } 650 void clearBlockCached() { flags.clear(BLOCK_CACHED); } 651 652 // Network error conditions... encapsulate them as methods since 653 // their encoding keeps changing (from result field to command --- 565 unchanged lines hidden --- | 664 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); } 665 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); } 666 void setBlockCached() { flags.set(BLOCK_CACHED); } 667 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); } 668 void clearBlockCached() { flags.clear(BLOCK_CACHED); } 669 670 // Network error conditions... encapsulate them as methods since 671 // their encoding keeps changing (from result field to command --- 565 unchanged lines hidden --- |