mshr.hh (5337:f81512eb8bdf) mshr.hh (5730:dea5fcd1ead0)
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

113 Addr addr;
114
115 /** Size of the request. */
116 int size;
117
118 /** True if the request has been sent to the bus. */
119 bool inService;
120
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

113 Addr addr;
114
115 /** Size of the request. */
116 int size;
117
118 /** True if the request has been sent to the bus. */
119 bool inService;
120
121 /** True if we will be putting the returned block in the cache */
122 bool isCacheFill;
121 /** True if the request is just a simple forward from an upper level */
122 bool isForward;
123
124 /** True if we need to get an exclusive copy of the block. */
125 bool needsExclusive() const { return targets->needsExclusive; }
126
127 /** True if the request is uncacheable */
128 bool _isUncacheable;
129
130 bool downstreamPending;

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

195 MSHR();
196 /** A simple destructor. */
197 ~MSHR();
198
199 /**
200 * Returns the current number of allocated targets.
201 * @return The current number of allocated targets.
202 */
123
124 /** True if we need to get an exclusive copy of the block. */
125 bool needsExclusive() const { return targets->needsExclusive; }
126
127 /** True if the request is uncacheable */
128 bool _isUncacheable;
129
130 bool downstreamPending;

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

195 MSHR();
196 /** A simple destructor. */
197 ~MSHR();
198
199 /**
200 * Returns the current number of allocated targets.
201 * @return The current number of allocated targets.
202 */
203 int getNumTargets() { return ntargets; }
203 int getNumTargets() const { return ntargets; }
204
205 /**
206 * Returns a pointer to the target list.
207 * @return a pointer to the target list.
208 */
209 TargetList *getTargetList() { return targets; }
210
211 /**
212 * Returns true if there are targets left.
213 * @return true if there are targets
214 */
204
205 /**
206 * Returns a pointer to the target list.
207 * @return a pointer to the target list.
208 */
209 TargetList *getTargetList() { return targets; }
210
211 /**
212 * Returns true if there are targets left.
213 * @return true if there are targets
214 */
215 bool hasTargets() { return !targets->empty(); }
215 bool hasTargets() const { return !targets->empty(); }
216
217 /**
218 * Returns a reference to the first target.
219 * @return A pointer to the first target.
220 */
216
217 /**
218 * Returns a reference to the first target.
219 * @return A pointer to the first target.
220 */
221 Target *getTarget() { assert(hasTargets()); return &targets->front(); }
221 Target *getTarget() const
222 {
223 assert(hasTargets());
224 return &targets->front();
225 }
222
223 /**
224 * Pop first target.
225 */
226 void popTarget()
227 {
228 --ntargets;
229 targets->pop_front();
230 }
231
226
227 /**
228 * Pop first target.
229 */
230 void popTarget()
231 {
232 --ntargets;
233 targets->pop_front();
234 }
235
232 bool isSimpleForward()
236 bool isForwardNoResponse() const
233 {
234 if (getNumTargets() != 1)
235 return false;
236 Target *tgt = getTarget();
237 return tgt->isCpuSide() && !tgt->pkt->needsResponse();
238 }
239
240 bool promoteDeferredTargets();

--- 14 unchanged lines hidden ---
237 {
238 if (getNumTargets() != 1)
239 return false;
240 Target *tgt = getTarget();
241 return tgt->isCpuSide() && !tgt->pkt->needsResponse();
242 }
243
244 bool promoteDeferredTargets();

--- 14 unchanged lines hidden ---