packet.hh (12344:57364c030de3) packet.hh (12346:9b1144d046ca)
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

--- 239 unchanged lines hidden (view full) ---

248 public:
249 typedef uint32_t FlagsType;
250 typedef ::Flags<FlagsType> Flags;
251
252 private:
253
254 enum : FlagsType {
255 // Flags to transfer across when copying a packet
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

--- 239 unchanged lines hidden (view full) ---

248 public:
249 typedef uint32_t FlagsType;
250 typedef ::Flags<FlagsType> Flags;
251
252 private:
253
254 enum : FlagsType {
255 // Flags to transfer across when copying a packet
256 COPY_FLAGS = 0x0000000F,
256 COPY_FLAGS = 0x0000001F,
257
258 // Does this packet have sharers (which means it should not be
259 // considered writable) or not. See setHasSharers below.
260 HAS_SHARERS = 0x00000001,
261
262 // Special control flags
263 /// Special timing-mode atomic snoop for multi-level coherence.
264 EXPRESS_SNOOP = 0x00000002,
265
266 /// Allow a responding cache to inform the cache hierarchy
267 /// that it had a writable copy before responding. See
268 /// setResponderHadWritable below.
269 RESPONDER_HAD_WRITABLE = 0x00000004,
270
271 // Snoop co-ordination flag to indicate that a cache is
272 // responding to a snoop. See setCacheResponding below.
273 CACHE_RESPONDING = 0x00000008,
274
257
258 // Does this packet have sharers (which means it should not be
259 // considered writable) or not. See setHasSharers below.
260 HAS_SHARERS = 0x00000001,
261
262 // Special control flags
263 /// Special timing-mode atomic snoop for multi-level coherence.
264 EXPRESS_SNOOP = 0x00000002,
265
266 /// Allow a responding cache to inform the cache hierarchy
267 /// that it had a writable copy before responding. See
268 /// setResponderHadWritable below.
269 RESPONDER_HAD_WRITABLE = 0x00000004,
270
271 // Snoop co-ordination flag to indicate that a cache is
272 // responding to a snoop. See setCacheResponding below.
273 CACHE_RESPONDING = 0x00000008,
274
275 // The writeback/writeclean should be propagated further
276 // downstream by the receiver
277 WRITE_THROUGH = 0x00000010,
278
275 /// Are the 'addr' and 'size' fields valid?
276 VALID_ADDR = 0x00000100,
277 VALID_SIZE = 0x00000200,
278
279 /// Is the data pointer set to a value that shouldn't be freed
280 /// when the packet is destroyed?
281 STATIC_DATA = 0x00001000,
282 /// The data pointer points to a value that should be freed when

--- 331 unchanged lines hidden (view full) ---

614 {
615 assert(cacheResponding());
616 assert(!responderHadWritable());
617 flags.set(RESPONDER_HAD_WRITABLE);
618 }
619 bool responderHadWritable() const
620 { return flags.isSet(RESPONDER_HAD_WRITABLE); }
621
279 /// Are the 'addr' and 'size' fields valid?
280 VALID_ADDR = 0x00000100,
281 VALID_SIZE = 0x00000200,
282
283 /// Is the data pointer set to a value that shouldn't be freed
284 /// when the packet is destroyed?
285 STATIC_DATA = 0x00001000,
286 /// The data pointer points to a value that should be freed when

--- 331 unchanged lines hidden (view full) ---

618 {
619 assert(cacheResponding());
620 assert(!responderHadWritable());
621 flags.set(RESPONDER_HAD_WRITABLE);
622 }
623 bool responderHadWritable() const
624 { return flags.isSet(RESPONDER_HAD_WRITABLE); }
625
626 /**
627 * A writeback/writeclean cmd gets propagated further downstream
628 * by the receiver when the flag is set.
629 */
630 void setWriteThrough()
631 {
632 assert(cmd.isWrite() &&
633 (cmd.isEviction() || cmd == MemCmd::WriteClean));
634 flags.set(WRITE_THROUGH);
635 }
636 void clearWriteThrough() { flags.clear(WRITE_THROUGH); }
637 bool writeThrough() const { return flags.isSet(WRITE_THROUGH); }
638
622 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
623 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
624 void setBlockCached() { flags.set(BLOCK_CACHED); }
625 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
626 void clearBlockCached() { flags.clear(BLOCK_CACHED); }
627
628 // Network error conditions... encapsulate them as methods since
629 // their encoding keeps changing (from result field to command

--- 560 unchanged lines hidden ---
639 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
640 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
641 void setBlockCached() { flags.set(BLOCK_CACHED); }
642 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
643 void clearBlockCached() { flags.clear(BLOCK_CACHED); }
644
645 // Network error conditions... encapsulate them as methods since
646 // their encoding keeps changing (from result field to command

--- 560 unchanged lines hidden ---