summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2015-03-27 04:55:55 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2015-03-27 04:55:55 -0400
commit7bae98459cc442f0c22d4eeac5901b61ea39c801 (patch)
tree112d5d799c511fa5b4306d08d73ad7012d0aef9b /src/mem/cache/mshr.cc
parent15f0d9ff1441886eb6431544d9d3571f56a14840 (diff)
downloadgem5-7bae98459cc442f0c22d4eeac5901b61ea39c801.tar.xz
mem: Align all MSHR entries to block boundaries
This patch aligns all MSHR queue entries to block boundaries to simplify checks for matches. Previously there were corner cases that could lead to existing entries not being identified as matches. There are, rather alarmingly, a few regressions that change with this patch.
Diffstat (limited to 'src/mem/cache/mshr.cc')
-rw-r--r--src/mem/cache/mshr.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 530ea7797..8eb5e4752 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2013 ARM Limited
+ * Copyright (c) 2012-2013, 2015 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
@@ -64,8 +64,8 @@ using namespace std;
MSHR::MSHR() : readyTime(0), _isUncacheable(false), downstreamPending(false),
pendingDirty(false),
postInvalidate(false), postDowngrade(false),
- queue(NULL), order(0), addr(0),
- size(0), isSecure(false), inService(false),
+ queue(NULL), order(0), blkAddr(0),
+ blkSize(0), isSecure(false), inService(false),
isForward(false), threadNum(InvalidThreadID), data(NULL)
{
}
@@ -202,13 +202,13 @@ print(std::ostream &os, int verbosity, const std::string &prefix) const
void
-MSHR::allocate(Addr _addr, int _size, PacketPtr target, Tick whenReady,
- Counter _order)
+MSHR::allocate(Addr blk_addr, unsigned blk_size, PacketPtr target,
+ Tick when_ready, Counter _order)
{
- addr = _addr;
- size = _size;
+ blkAddr = blk_addr;
+ blkSize = blk_size;
isSecure = target->isSecure();
- readyTime = whenReady;
+ readyTime = when_ready;
order = _order;
assert(target);
isForward = false;
@@ -221,7 +221,7 @@ MSHR::allocate(Addr _addr, int _size, PacketPtr target, Tick whenReady,
// snoop (mem-side request), so set source according to request here
Target::Source source = (target->cmd == MemCmd::HardPFReq) ?
Target::FromPrefetcher : Target::FromCPU;
- targets.add(target, whenReady, _order, source, true);
+ targets.add(target, when_ready, _order, source, true);
assert(deferredTargets.isReset());
data = NULL;
}
@@ -446,7 +446,7 @@ MSHR::checkFunctional(PacketPtr pkt)
// For other requests, we iterate over the individual targets
// since that's where the actual data lies.
if (pkt->isPrint()) {
- pkt->checkFunctional(this, addr, isSecure, size, NULL);
+ pkt->checkFunctional(this, blkAddr, isSecure, blkSize, NULL);
return false;
} else {
return (targets.checkFunctional(pkt) ||
@@ -459,7 +459,7 @@ void
MSHR::print(std::ostream &os, int verbosity, const std::string &prefix) const
{
ccprintf(os, "%s[%#llx:%#llx](%s) %s %s %s state: %s %s %s %s %s\n",
- prefix, addr, addr+size-1,
+ prefix, blkAddr, blkAddr + blkSize - 1,
isSecure ? "s" : "ns",
isForward ? "Forward" : "",
isForwardNoResponse() ? "ForwNoResp" : "",