Deleted Added
sdiff udiff text old ( 12748:ae5ce8e42de7 ) new ( 12749:223c83ed9979 )
full compact
1/*
2 * Copyright (c) 2010-2018 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

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

372 // There's no reason to add a prefetch as an additional target
373 // to an existing MSHR. If an outstanding request is already
374 // in progress, there is nothing for the prefetch to do.
375 // If this is the case, we don't even create a request at all.
376 PacketPtr pf = nullptr;
377
378 if (!mshr) {
379 // copy the request and create a new SoftPFReq packet
380 RequestPtr req = std::make_shared<Request>(pkt->req->getPaddr(),
381 pkt->req->getSize(),
382 pkt->req->getFlags(),
383 pkt->req->masterId());
384 pf = new Packet(req, pkt->cmd);
385 pf->allocate();
386 assert(pf->getAddr() == pkt->getAddr());
387 assert(pf->getSize() == pkt->getSize());
388 }
389
390 pkt->makeTimingResponse();
391

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

691 completion_time = pkt->headerDelay;
692
693 // Software prefetch handling for cache closest to core
694 if (tgt_pkt->cmd.isSWPrefetch()) {
695 // a software prefetch would have already been ack'd
696 // immediately with dummy data so the core would be able to
697 // retire it. This request completes right here, so we
698 // deallocate it.
699 delete tgt_pkt;
700 break; // skip response
701 }
702
703 // unlike the other packet flows, where data is found in other
704 // caches or memory and brought back, write-line requests always
705 // have the data right away, so the above check for "is fill?"
706 // cannot actually be determined until examining the stored MSHR

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

797 tgt_pkt->headerDelay = tgt_pkt->payloadDelay = 0;
798 cpuSidePort.schedTimingResp(tgt_pkt, completion_time, true);
799 break;
800
801 case MSHR::Target::FromPrefetcher:
802 assert(tgt_pkt->cmd == MemCmd::HardPFReq);
803 if (blk)
804 blk->status |= BlkHWPrefetched;
805 delete tgt_pkt;
806 break;
807
808 case MSHR::Target::FromSnoop:
809 // I don't believe that a snoop can be in an error state
810 assert(!is_error);
811 // response to snoop request
812 DPRINTF(Cache, "processing deferred snoop...\n");

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

864 }
865}
866
867PacketPtr
868Cache::cleanEvictBlk(CacheBlk *blk)
869{
870 assert(!writebackClean);
871 assert(blk && blk->isValid() && !blk->isDirty());
872
873 // Creating a zero sized write, a message to the snoop filter
874 RequestPtr req = std::make_shared<Request>(
875 regenerateBlkAddr(blk), blkSize, 0, Request::wbMasterId);
876
877 if (blk->isSecure())
878 req->setFlags(Request::SECURE);
879
880 req->taskId(blk->task_id);
881
882 PacketPtr pkt = new Packet(req, MemCmd::CleanEvict);
883 pkt->allocate();
884 DPRINTF(Cache, "Create CleanEvict %s\n", pkt->print());

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

1131 // payload
1132 if (pkt->hasData())
1133 pkt->setDataFromBlock(blk->data, blkSize);
1134 }
1135 }
1136
1137 if (!respond && is_deferred) {
1138 assert(pkt->needsResponse());
1139 delete pkt;
1140 }
1141
1142 // Do this last in case it deallocates block data or something
1143 // like that
1144 if (blk_valid && invalidate) {
1145 invalidateBlock(blk);
1146 DPRINTF(Cache, "new state is %s\n", blk->print());

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

1380 // Deallocate the mshr target
1381 if (mshrQueue.forceDeallocateTarget(mshr)) {
1382 // Clear block if this deallocation resulted freed an
1383 // mshr when all had previously been utilized
1384 clearBlocked(Blocked_NoMSHRs);
1385 }
1386
1387 // given that no response is expected, delete Request and Packet
1388 delete tgt_pkt;
1389
1390 return false;
1391 }
1392 }
1393
1394 return BaseCache::sendMSHRQueuePacket(mshr);
1395}
1396
1397Cache*
1398CacheParams::create()
1399{
1400 assert(tags);
1401 assert(replacement_policy);
1402
1403 return new Cache(this);
1404}