Minor cleanup: Use the blockAlign() method where it applies in the cache.
This commit is contained in:
parent
72cfed4164
commit
f679630788
2 changed files with 4 additions and 4 deletions
2
src/mem/cache/base.hh
vendored
2
src/mem/cache/base.hh
vendored
|
@ -379,7 +379,7 @@ class BaseCache : public MemObject
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Addr blockAlign(Addr addr) const { return (addr & ~(blkSize - 1)); }
|
Addr blockAlign(Addr addr) const { return (addr & ~(Addr(blkSize - 1))); }
|
||||||
|
|
||||||
|
|
||||||
const Range<Addr> &getAddrRange() const { return addrRange; }
|
const Range<Addr> &getAddrRange() const { return addrRange; }
|
||||||
|
|
6
src/mem/cache/cache_impl.hh
vendored
6
src/mem/cache/cache_impl.hh
vendored
|
@ -449,7 +449,7 @@ Cache<TagStore>::timingAccess(PacketPtr pkt)
|
||||||
} else {
|
} else {
|
||||||
// miss
|
// miss
|
||||||
|
|
||||||
Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
|
Addr blk_addr = blockAlign(pkt->getAddr());
|
||||||
MSHR *mshr = mshrQueue.findMatch(blk_addr);
|
MSHR *mshr = mshrQueue.findMatch(blk_addr);
|
||||||
|
|
||||||
if (mshr) {
|
if (mshr) {
|
||||||
|
@ -692,7 +692,7 @@ Cache<TagStore>::functionalAccess(PacketPtr pkt,
|
||||||
CachePort *incomingPort,
|
CachePort *incomingPort,
|
||||||
CachePort *otherSidePort)
|
CachePort *otherSidePort)
|
||||||
{
|
{
|
||||||
Addr blk_addr = pkt->getAddr() & ~(blkSize - 1);
|
Addr blk_addr = blockAlign(pkt->getAddr());
|
||||||
BlkType *blk = tags->findBlock(pkt->getAddr());
|
BlkType *blk = tags->findBlock(pkt->getAddr());
|
||||||
|
|
||||||
pkt->pushLabel(name());
|
pkt->pushLabel(name());
|
||||||
|
@ -1162,7 +1162,7 @@ Cache<TagStore>::snoopTiming(PacketPtr pkt)
|
||||||
|
|
||||||
BlkType *blk = tags->findBlock(pkt->getAddr());
|
BlkType *blk = tags->findBlock(pkt->getAddr());
|
||||||
|
|
||||||
Addr blk_addr = pkt->getAddr() & ~(Addr(blkSize-1));
|
Addr blk_addr = blockAlign(pkt->getAddr());
|
||||||
MSHR *mshr = mshrQueue.findMatch(blk_addr);
|
MSHR *mshr = mshrQueue.findMatch(blk_addr);
|
||||||
|
|
||||||
// Let the MSHR itself track the snoop and decide whether we want
|
// Let the MSHR itself track the snoop and decide whether we want
|
||||||
|
|
Loading…
Reference in a new issue