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

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

805 mshr_misses[pkt->cmdToIndex()][pkt->req->masterId()]++;
806
807 // allocate an MSHR and return it, note
808 // that we send the packet straight away, so do not
809 // schedule the send
810 return allocateMissBuffer(pkt, curTick(), false);
811 } else {
812 // free the request and packet
813 delete pkt->req;
814 delete pkt;
815 }
816 }
817 }
818
819 return nullptr;
820}
821

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

1273BaseCache::writebackBlk(CacheBlk *blk)
1274{
1275 chatty_assert(!isReadOnly || writebackClean,
1276 "Writeback from read-only cache");
1277 assert(blk && blk->isValid() && (blk->isDirty() || writebackClean));
1278
1279 writebacks[Request::wbMasterId]++;
1280
1281 RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0,
1282 Request::wbMasterId);
1283 if (blk->isSecure())
1284 req->setFlags(Request::SECURE);
1285
1286 req->taskId(blk->task_id);
1287
1288 PacketPtr pkt =
1289 new Packet(req, blk->isDirty() ?
1290 MemCmd::WritebackDirty : MemCmd::WritebackClean);

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

1308 pkt->setDataFromBlock(blk->data, blkSize);
1309
1310 return pkt;
1311}
1312
1313PacketPtr
1314BaseCache::writecleanBlk(CacheBlk *blk, Request::Flags dest, PacketId id)
1315{
1316 RequestPtr req = new Request(regenerateBlkAddr(blk), blkSize, 0,
1317 Request::wbMasterId);
1318 if (blk->isSecure()) {
1319 req->setFlags(Request::SECURE);
1320 }
1321 req->taskId(blk->task_id);
1322
1323 PacketPtr pkt = new Packet(req, MemCmd::WriteClean, blkSize, id);
1324
1325 if (dest) {

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

1368}
1369
1370void
1371BaseCache::writebackVisitor(CacheBlk &blk)
1372{
1373 if (blk.isDirty()) {
1374 assert(blk.isValid());
1375
1376 Request request(regenerateBlkAddr(&blk),
1377 blkSize, 0, Request::funcMasterId);
1378 request.taskId(blk.task_id);
1379 if (blk.isSecure()) {
1380 request.setFlags(Request::SECURE);
1381 }
1382
1383 Packet packet(&request, MemCmd::WriteReq);
1384 packet.dataStatic(blk.data);
1385
1386 memSidePort.sendFunctional(&packet);
1387
1388 blk.status &= ~BlkDirty;
1389 }
1390}
1391

--- 935 unchanged lines hidden ---