Deleted Added
sdiff udiff text old ( 11256:65db40192591 ) new ( 11284:b3926db25371 )
full compact
1/*
2 * Copyright (c) 2012-2015 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

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

134 * List of command attributes.
135 */
136 enum Attribute
137 {
138 IsRead, //!< Data flows from responder to requester
139 IsWrite, //!< Data flows from requester to responder
140 IsUpgrade,
141 IsInvalidate,
142 NeedsExclusive, //!< Requires exclusive copy to complete in-cache
143 IsRequest, //!< Issued by requester
144 IsResponse, //!< Issue by responder
145 NeedsResponse, //!< Requester needs response from target
146 IsEviction,
147 IsSWPrefetch,
148 IsHWPrefetch,
149 IsLlsc, //!< Alpha/MIPS LL or SC access
150 HasData, //!< There is an associated payload

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

184
185 public:
186
187 bool isRead() const { return testCmdAttrib(IsRead); }
188 bool isWrite() const { return testCmdAttrib(IsWrite); }
189 bool isUpgrade() const { return testCmdAttrib(IsUpgrade); }
190 bool isRequest() const { return testCmdAttrib(IsRequest); }
191 bool isResponse() const { return testCmdAttrib(IsResponse); }
192 bool needsExclusive() const { return testCmdAttrib(NeedsExclusive); }
193 bool needsResponse() const { return testCmdAttrib(NeedsResponse); }
194 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); }
195 bool isEviction() const { return testCmdAttrib(IsEviction); }
196
197 /**
198 * A writeback is an eviction that carries data.
199 */
200 bool isWriteback() const { return testCmdAttrib(IsEviction) &&

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

247 typedef ::Flags<FlagsType> Flags;
248
249 private:
250
251 enum : FlagsType {
252 // Flags to transfer across when copying a packet
253 COPY_FLAGS = 0x0000000F,
254
255 SHARED = 0x00000001,
256 // Special control flags
257 /// Special timing-mode atomic snoop for multi-level coherence.
258 EXPRESS_SNOOP = 0x00000002,
259 /// Does supplier have exclusive copy?
260 /// Useful for multi-level coherence.
261 SUPPLY_EXCLUSIVE = 0x00000004,
262 // Snoop response flags
263 MEM_INHIBIT = 0x00000008,
264
265 /// Are the 'addr' and 'size' fields valid?
266 VALID_ADDR = 0x00000100,
267 VALID_SIZE = 0x00000200,
268
269 /// Is the data pointer set to a value that shouldn't be freed
270 /// when the packet is destroyed?
271 STATIC_DATA = 0x00001000,
272 /// The data pointer points to a value that should be freed when

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

490 /// Return the index of this command.
491 inline int cmdToIndex() const { return cmd.toInt(); }
492
493 bool isRead() const { return cmd.isRead(); }
494 bool isWrite() const { return cmd.isWrite(); }
495 bool isUpgrade() const { return cmd.isUpgrade(); }
496 bool isRequest() const { return cmd.isRequest(); }
497 bool isResponse() const { return cmd.isResponse(); }
498 bool needsExclusive() const { return cmd.needsExclusive(); }
499 bool needsResponse() const { return cmd.needsResponse(); }
500 bool isInvalidate() const { return cmd.isInvalidate(); }
501 bool isEviction() const { return cmd.isEviction(); }
502 bool isWriteback() const { return cmd.isWriteback(); }
503 bool hasData() const { return cmd.hasData(); }
504 bool isLLSC() const { return cmd.isLLSC(); }
505 bool isError() const { return cmd.isError(); }
506 bool isPrint() const { return cmd.isPrint(); }
507 bool isFlush() const { return cmd.isFlush(); }
508
509 // Snoop flags
510 void assertMemInhibit()
511 {
512 assert(isRequest());
513 assert(!flags.isSet(MEM_INHIBIT));
514 flags.set(MEM_INHIBIT);
515 }
516 bool memInhibitAsserted() const { return flags.isSet(MEM_INHIBIT); }
517 void assertShared() { flags.set(SHARED); }
518 bool sharedAsserted() const { return flags.isSet(SHARED); }
519
520 // Special control flags
521 void setExpressSnoop() { flags.set(EXPRESS_SNOOP); }
522 bool isExpressSnoop() const { return flags.isSet(EXPRESS_SNOOP); }
523 void setSupplyExclusive() { flags.set(SUPPLY_EXCLUSIVE); }
524 bool isSupplyExclusive() const { return flags.isSet(SUPPLY_EXCLUSIVE); }
525 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
526 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
527 void setBlockCached() { flags.set(BLOCK_CACHED); }
528 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
529 void clearBlockCached() { flags.clear(BLOCK_CACHED); }
530
531 // Network error conditions... encapsulate them as methods since
532 // their encoding keeps changing (from result field to command

--- 550 unchanged lines hidden ---