#include "base/trace.hh"
#include "base/types.hh"
#include "debug/Cache.hh"
-#include "mem/cache/blk.hh"
+#include "mem/cache/cache_blk.hh"
#include "mem/cache/mshr.hh"
#include "params/NoncoherentCache.hh"
PacketPtr
NoncoherentCache::createMissPacket(PacketPtr cpu_pkt, CacheBlk *blk,
- bool needs_writable) const
+ bool needs_writable,
+ bool is_whole_line_write) const
{
// We also fill for writebacks from the coherent caches above us,
// and they do not need responses
Cycles
-NoncoherentCache::handleAtomicReqMiss(PacketPtr pkt, CacheBlk *blk,
+NoncoherentCache::handleAtomicReqMiss(PacketPtr pkt, CacheBlk *&blk,
PacketList &writebacks)
{
- PacketPtr bus_pkt = createMissPacket(pkt, blk, true);
+ PacketPtr bus_pkt = createMissPacket(pkt, blk, true,
+ pkt->isWholeLineWrite(blkSize));
DPRINTF(Cache, "Sending an atomic %s\n", bus_pkt->print());
Cycles latency = ticksToCycles(memSidePort.sendAtomic(bus_pkt));
void
NoncoherentCache::serviceMSHRTargets(MSHR *mshr, const PacketPtr pkt,
- CacheBlk *blk, PacketList &writebacks)
+ CacheBlk *blk)
{
- MSHR::Target *initial_tgt = mshr->getTarget();
// First offset for critical word first calculations
- const int initial_offset = initial_tgt->pkt->getOffset(blkSize);
+ const int initial_offset = mshr->getTarget()->pkt->getOffset(blkSize);
MSHR::TargetList targets = mshr->extractServiceableTargets(pkt);
for (auto &target: targets) {
// Reset the bus additional time as it is now accounted for
tgt_pkt->headerDelay = tgt_pkt->payloadDelay = 0;
- cpuSidePort.schedTimingResp(tgt_pkt, completion_time, true);
+ cpuSidePort.schedTimingResp(tgt_pkt, completion_time);
break;
case MSHR::Target::FromPrefetcher:
return pkt;
}
-void
-NoncoherentCache::evictBlock(CacheBlk *blk, PacketList &writebacks)
-{
- PacketPtr pkt = evictBlock(blk);
- if (pkt) {
- writebacks.push_back(pkt);
- }
-}
-
NoncoherentCache*
NoncoherentCacheParams::create()
{