Deleted Added
sdiff udiff text old ( 11278:18411ccc4f3c ) new ( 11284:b3926db25371 )
full compact
1/*
2 * Copyright (c) 2012-2013, 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

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

75 Tick readyTime;
76
77 /** True if the request is uncacheable */
78 bool _isUncacheable;
79
80 /** Flag set by downstream caches */
81 bool downstreamPending;
82
83 /** Will we have a dirty copy after this request? */
84 bool pendingDirty;
85
86 /** Did we snoop an invalidate while waiting for data? */
87 bool postInvalidate;
88
89 /** Did we snoop a read while waiting for data? */
90 bool postDowngrade;
91
92 public:

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

113 : recvTime(curTick()), readyTime(_readyTime), order(_order),
114 pkt(_pkt), source(_source), markedPending(_markedPending)
115 {}
116 };
117
118 class TargetList : public std::list<Target> {
119
120 public:
121 bool needsExclusive;
122 bool hasUpgrade;
123
124 TargetList();
125 void resetFlags() { needsExclusive = hasUpgrade = false; }
126 bool isReset() const { return !needsExclusive && !hasUpgrade; }
127 void add(PacketPtr pkt, Tick readyTime, Counter order,
128 Target::Source source, bool markPending);
129 void replaceUpgrades();
130 void clearDownstreamPending();
131 bool checkFunctional(PacketPtr pkt);
132 void print(std::ostream &os, int verbosity,
133 const std::string &prefix) const;
134 };

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

164 /** Keep track of whether we should allocate on fill or not */
165 bool allocOnFill;
166
167 /** The pending* and post* flags are only valid if inService is
168 * true. Using the accessor functions lets us detect if these
169 * flags are accessed improperly.
170 */
171
172 /** True if we need to get an exclusive copy of the block. */
173 bool needsExclusive() const { return targets.needsExclusive; }
174
175 bool isPendingDirty() const {
176 assert(inService); return pendingDirty;
177 }
178
179 bool hasPostInvalidate() const {
180 assert(inService); return postInvalidate;
181 }
182
183 bool hasPostDowngrade() const {
184 assert(inService); return postDowngrade;

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

218 * @param pkt The original miss.
219 * @param when_ready When should the MSHR be ready to act upon.
220 * @param _order The logical order of this MSHR
221 * @param alloc_on_fill Should the cache allocate a block on fill
222 */
223 void allocate(Addr blk_addr, unsigned blk_size, PacketPtr pkt,
224 Tick when_ready, Counter _order, bool alloc_on_fill);
225
226 bool markInService(bool pending_dirty_resp);
227
228 void clearDownstreamPending();
229
230 /**
231 * Mark this MSHR as free.
232 */
233 void deallocate();
234

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

279 if (getNumTargets() != 1)
280 return false;
281 const Target *tgt = &targets.front();
282 return tgt->source == Target::FromCPU && !tgt->pkt->needsResponse();
283 }
284
285 bool promoteDeferredTargets();
286
287 void promoteExclusive();
288
289 bool checkFunctional(PacketPtr pkt);
290
291 /**
292 * Prints the contents of this MSHR for debugging.
293 */
294 void print(std::ostream &os,
295 int verbosity = 0,
296 const std::string &prefix = "") const;
297 /**
298 * A no-args wrapper of print(std::ostream...) meant to be
299 * invoked from DPRINTFs avoiding string overheads in fast mode
300 *
301 * @return string with mshr fields + [deferred]targets
302 */
303 std::string print() const;
304};
305
306#endif // __MEM_CACHE_MSHR_HH__