mshr.cc (5338:e75d02a09806) mshr.cc (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;

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

151MSHR::allocate(Addr _addr, int _size, PacketPtr target,
152 Tick whenReady, Counter _order)
153{
154 addr = _addr;
155 size = _size;
156 readyTime = whenReady;
157 order = _order;
158 assert(target);
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;

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

151MSHR::allocate(Addr _addr, int _size, PacketPtr target,
152 Tick whenReady, Counter _order)
153{
154 addr = _addr;
155 size = _size;
156 readyTime = whenReady;
157 order = _order;
158 assert(target);
159 isCacheFill = false;
159 isForward = false;
160 _isUncacheable = target->req->isUncacheable();
161 inService = false;
162 downstreamPending = false;
163 threadNum = 0;
164 ntargets = 1;
165 // Don't know of a case where we would allocate a new MSHR for a
166 // snoop (mem-side request), so set cpuSide to true here.
167 assert(targets->isReset());

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

182 // responses to
183 targets->clearDownstreamPending();
184}
185
186bool
187MSHR::markInService()
188{
189 assert(!inService);
160 _isUncacheable = target->req->isUncacheable();
161 inService = false;
162 downstreamPending = false;
163 threadNum = 0;
164 ntargets = 1;
165 // Don't know of a case where we would allocate a new MSHR for a
166 // snoop (mem-side request), so set cpuSide to true here.
167 assert(targets->isReset());

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

182 // responses to
183 targets->clearDownstreamPending();
184}
185
186bool
187MSHR::markInService()
188{
189 assert(!inService);
190 if (isSimpleForward()) {
190 if (isForwardNoResponse()) {
191 // we just forwarded the request packet & don't expect a
192 // response, so get rid of it
193 assert(getNumTargets() == 1);
194 popTarget();
195 return true;
196 }
197 inService = true;
198 if (!downstreamPending) {

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

398}
399
400
401void
402MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
403{
404 ccprintf(os, "%s[%x:%x] %s %s %s state: %s %s %s %s\n",
405 prefix, addr, addr+size-1,
191 // we just forwarded the request packet & don't expect a
192 // response, so get rid of it
193 assert(getNumTargets() == 1);
194 popTarget();
195 return true;
196 }
197 inService = true;
198 if (!downstreamPending) {

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

398}
399
400
401void
402MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
403{
404 ccprintf(os, "%s[%x:%x] %s %s %s state: %s %s %s %s\n",
405 prefix, addr, addr+size-1,
406 isCacheFill ? "Fill" : "",
406 isForward ? "Forward" : "",
407 isForwardNoResponse() ? "ForwNoResp" : "",
407 needsExclusive() ? "Excl" : "",
408 _isUncacheable ? "Unc" : "",
409 inService ? "InSvc" : "",
410 downstreamPending ? "DwnPend" : "",
411 pendingInvalidate ? "PendInv" : "",
412 pendingShared ? "PendShared" : "");
413
414 ccprintf(os, "%s Targets:\n", prefix);
415 targets->print(os, verbosity, prefix + " ");
416 if (!deferredTargets->empty()) {
417 ccprintf(os, "%s Deferred Targets:\n", prefix);
418 deferredTargets->print(os, verbosity, prefix + " ");
419 }
420}
421
422MSHR::~MSHR()
423{
424}
408 needsExclusive() ? "Excl" : "",
409 _isUncacheable ? "Unc" : "",
410 inService ? "InSvc" : "",
411 downstreamPending ? "DwnPend" : "",
412 pendingInvalidate ? "PendInv" : "",
413 pendingShared ? "PendShared" : "");
414
415 ccprintf(os, "%s Targets:\n", prefix);
416 targets->print(os, verbosity, prefix + " ");
417 if (!deferredTargets->empty()) {
418 ccprintf(os, "%s Deferred Targets:\n", prefix);
419 deferredTargets->print(os, verbosity, prefix + " ");
420 }
421}
422
423MSHR::~MSHR()
424{
425}