mshr.cc (9725:0d4ee33078bb) mshr.cc (10028:fb8c44de891a)
1/*
1/*
2 * Copyright (c) 2012 ARM Limited
2 * Copyright (c) 2012-2013 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

59#include "mem/cache/mshr.hh"
60#include "sim/core.hh"
61
62using namespace std;
63
64MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false),
65 pendingDirty(false), postInvalidate(false),
66 postDowngrade(false), queue(NULL), order(0), addr(0), size(0),
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

59#include "mem/cache/mshr.hh"
60#include "sim/core.hh"
61
62using namespace std;
63
64MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false),
65 pendingDirty(false), postInvalidate(false),
66 postDowngrade(false), queue(NULL), order(0), addr(0), size(0),
67 inService(false), isForward(false), threadNum(InvalidThreadID),
68 data(NULL)
67 isSecure(false), inService(false), isForward(false),
68 threadNum(InvalidThreadID), data(NULL)
69{
70}
71
72
73MSHR::TargetList::TargetList()
74 : needsExclusive(false), hasUpgrade(false)
75{}
76

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

196 }
197 ccprintf(os, "%s%s: ", prefix, s);
198 i->pkt->print(os, verbosity, "");
199 }
200}
201
202
203void
69{
70}
71
72
73MSHR::TargetList::TargetList()
74 : needsExclusive(false), hasUpgrade(false)
75{}
76

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

196 }
197 ccprintf(os, "%s%s: ", prefix, s);
198 i->pkt->print(os, verbosity, "");
199 }
200}
201
202
203void
204MSHR::allocate(Addr _addr, int _size, PacketPtr target,
205 Tick whenReady, Counter _order)
204MSHR::allocate(Addr _addr, int _size, PacketPtr target, Tick whenReady,
205 Counter _order)
206{
207 addr = _addr;
208 size = _size;
206{
207 addr = _addr;
208 size = _size;
209 isSecure = target->isSecure();
209 readyTime = whenReady;
210 order = _order;
211 assert(target);
212 isForward = false;
213 _isUncacheable = target->req->isUncacheable();
214 inService = false;
215 downstreamPending = false;
216 threadNum = 0;

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

435
436bool
437MSHR::checkFunctional(PacketPtr pkt)
438{
439 // For printing, we treat the MSHR as a whole as single entity.
440 // For other requests, we iterate over the individual targets
441 // since that's where the actual data lies.
442 if (pkt->isPrint()) {
210 readyTime = whenReady;
211 order = _order;
212 assert(target);
213 isForward = false;
214 _isUncacheable = target->req->isUncacheable();
215 inService = false;
216 downstreamPending = false;
217 threadNum = 0;

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

436
437bool
438MSHR::checkFunctional(PacketPtr pkt)
439{
440 // For printing, we treat the MSHR as a whole as single entity.
441 // For other requests, we iterate over the individual targets
442 // since that's where the actual data lies.
443 if (pkt->isPrint()) {
443 pkt->checkFunctional(this, addr, size, NULL);
444 pkt->checkFunctional(this, addr, isSecure, size, NULL);
444 return false;
445 } else {
446 return (targets.checkFunctional(pkt) ||
447 deferredTargets.checkFunctional(pkt));
448 }
449}
450
451
452void
453MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
454{
445 return false;
446 } else {
447 return (targets.checkFunctional(pkt) ||
448 deferredTargets.checkFunctional(pkt));
449 }
450}
451
452
453void
454MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
455{
455 ccprintf(os, "%s[%x:%x] %s %s %s state: %s %s %s %s %s\n",
456 ccprintf(os, "%s[%x:%x](%s) %s %s %s state: %s %s %s %s %s\n",
456 prefix, addr, addr+size-1,
457 prefix, addr, addr+size-1,
458 isSecure ? "s" : "ns",
457 isForward ? "Forward" : "",
458 isForwardNoResponse() ? "ForwNoResp" : "",
459 needsExclusive() ? "Excl" : "",
460 _isUncacheable ? "Unc" : "",
461 inService ? "InSvc" : "",
462 downstreamPending ? "DwnPend" : "",
463 hasPostInvalidate() ? "PostInv" : "",
464 hasPostDowngrade() ? "PostDowngr" : "");

--- 16 unchanged lines hidden ---
459 isForward ? "Forward" : "",
460 isForwardNoResponse() ? "ForwNoResp" : "",
461 needsExclusive() ? "Excl" : "",
462 _isUncacheable ? "Unc" : "",
463 inService ? "InSvc" : "",
464 downstreamPending ? "DwnPend" : "",
465 hasPostInvalidate() ? "PostInv" : "",
466 hasPostDowngrade() ? "PostDowngr" : "");

--- 16 unchanged lines hidden ---