base.cc (13419:aaadcfae091a) | base.cc (13752:135bb759ee9c) |
---|---|
1/* 2 * Copyright (c) 2013,2016,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 --- 84 unchanged lines hidden (view full) --- 93 } 94 } 95 96 // Did not find block 97 return nullptr; 98} 99 100void | 1/* 2 * Copyright (c) 2013,2016,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 --- 84 unchanged lines hidden (view full) --- 93 } 94 } 95 96 // Did not find block 97 return nullptr; 98} 99 100void |
101BaseTags::insertBlock(const Addr addr, const bool is_secure, 102 const int src_master_ID, const uint32_t task_ID, 103 CacheBlk *blk) | 101BaseTags::insertBlock(const PacketPtr pkt, CacheBlk *blk) |
104{ 105 assert(!blk->isValid()); 106 107 // Previous block, if existed, has been removed, and now we have 108 // to insert the new one | 102{ 103 assert(!blk->isValid()); 104 105 // Previous block, if existed, has been removed, and now we have 106 // to insert the new one |
107 |
|
109 // Deal with what we are bringing in | 108 // Deal with what we are bringing in |
110 assert(src_master_ID < system->maxMasters()); 111 occupancies[src_master_ID]++; | 109 MasterID master_id = pkt->req->masterId(); 110 assert(master_id < system->maxMasters()); 111 occupancies[master_id]++; |
112 113 // Insert block with tag, src master id and task id | 112 113 // Insert block with tag, src master id and task id |
114 blk->insert(extractTag(addr), is_secure, src_master_ID, task_ID); | 114 blk->insert(extractTag(pkt->getAddr()), pkt->isSecure(), master_id, 115 pkt->req->taskId()); |
115 116 // Check if cache warm up is done 117 if (!warmedUp && tagsInUse.value() >= warmupBound) { 118 warmedUp = true; 119 warmupCycle = curTick(); 120 } 121 122 // We only need to write into one tag and one data block. --- 170 unchanged lines hidden --- | 116 117 // Check if cache warm up is done 118 if (!warmedUp && tagsInUse.value() >= warmupBound) { 119 warmedUp = true; 120 warmupCycle = curTick(); 121 } 122 123 // We only need to write into one tag and one data block. --- 170 unchanged lines hidden --- |