diff -r 494ab5474716 -r 3d6c892ac34e src/mem/cache/base.hh --- a/src/mem/cache/base.hh Mon Jan 09 09:34:36 2017 -0600 +++ b/src/mem/cache/base.hh Tue Feb 21 19:04:58 2017 +0000 @@ -484,15 +484,11 @@ return blkSize; } - - Addr blockAlign(Addr addr) const { return (addr & ~(Addr(blkSize - 1))); } - - const AddrRangeList &getAddrRanges() const { return addrRanges; } MSHR *allocateMissBuffer(PacketPtr pkt, Tick time, bool sched_send = true) { - MSHR *mshr = mshrQueue.allocate(blockAlign(pkt->getAddr()), blkSize, + MSHR *mshr = mshrQueue.allocate(pkt->getBlockAddr(blkSize), blkSize, pkt, time, order++, allocOnFill(pkt->cmd)); @@ -513,7 +509,7 @@ // should only see writes or clean evicts here assert(pkt->isWrite() || pkt->cmd == MemCmd::CleanEvict); - Addr blk_addr = blockAlign(pkt->getAddr()); + Addr blk_addr = pkt->getBlockAddr(blkSize); WriteQueueEntry *wq_entry = writeBuffer.findMatch(blk_addr, pkt->isSecure()); diff -r 494ab5474716 -r 3d6c892ac34e src/mem/cache/cache.cc --- a/src/mem/cache/cache.cc Mon Jan 09 09:34:36 2017 -0600 +++ b/src/mem/cache/cache.cc Tue Feb 21 19:04:58 2017 +0000 @@ -740,7 +740,7 @@ } else { // miss - Addr blk_addr = blockAlign(pkt->getAddr()); + Addr blk_addr = pkt->getBlockAddr(blkSize); // ignore any existing MSHR if we are dealing with an // uncacheable request @@ -964,7 +964,7 @@ } // the packet should be block aligned - assert(pkt->getAddr() == blockAlign(pkt->getAddr())); + assert(pkt->getAddr() == pkt->getBlockAddr(blkSize)); pkt->allocate(); DPRINTF(Cache, "%s: created %s from %s\n", __func__, pkt->print(), @@ -1152,7 +1152,7 @@ return; } - Addr blk_addr = blockAlign(pkt->getAddr()); + Addr blk_addr = pkt->getBlockAddr(blkSize); bool is_secure = pkt->isSecure(); CacheBlk *blk = tags->findBlock(pkt->getAddr(), is_secure); MSHR *mshr = mshrQueue.findMatch(blk_addr, is_secure); @@ -1732,7 +1732,7 @@ #endif // When handling a fill, we should have no writes to this line. - assert(addr == blockAlign(addr)); + assert(addr == pkt->getBlockAddr(blkSize)); assert(!writeBuffer.findMatch(addr, is_secure)); if (blk == nullptr) { @@ -2093,7 +2093,7 @@ bool is_secure = pkt->isSecure(); CacheBlk *blk = tags->findBlock(pkt->getAddr(), is_secure); - Addr blk_addr = blockAlign(pkt->getAddr()); + Addr blk_addr = pkt->getBlockAddr(blkSize); MSHR *mshr = mshrQueue.findMatch(blk_addr, is_secure); // Update the latency cost of the snoop so that the crossbar can @@ -2282,7 +2282,7 @@ // If we have a miss queue slot, we can try a prefetch PacketPtr pkt = prefetcher->getPacket(); if (pkt) { - Addr pf_addr = blockAlign(pkt->getAddr()); + Addr pf_addr = pkt->getBlockAddr(blkSize); if (!tags->findBlock(pf_addr, pkt->isSecure()) && !mshrQueue.findMatch(pf_addr, pkt->isSecure()) && !writeBuffer.findMatch(pf_addr, pkt->isSecure())) {