fa_lru.cc (12566:d6d48df9bf0f) | fa_lru.cc (12600:e670dd17c8cf) |
---|---|
1/* 2 * Copyright (c) 2013,2016-2017 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 if (i == index - 1){ 94 cacheBoundaries[j] = &(blks[i]); 95 flags &= ~ (1<<j); 96 ++j; 97 index = index << 1; 98 } 99 blks[i].prev = &(blks[i-1]); 100 blks[i].next = &(blks[i+1]); | 1/* 2 * Copyright (c) 2013,2016-2017 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 if (i == index - 1){ 94 cacheBoundaries[j] = &(blks[i]); 95 flags &= ~ (1<<j); 96 ++j; 97 index = index << 1; 98 } 99 blks[i].prev = &(blks[i-1]); 100 blks[i].next = &(blks[i+1]); |
101 blks[i].isTouched = false; | |
102 blks[i].set = 0; 103 blks[i].way = i; 104 } 105 assert(j == numCaches); 106 assert(index == numBlocks); 107 //assert(check()); 108} 109 --- 140 unchanged lines hidden (view full) --- 250 assert(blk->inCache == 0); 251 moveToHead(blk); 252 tagHash.erase(blk->tag); 253 tagHash[blkAlign(addr)] = blk; 254 if (blk->isValid()) { 255 replacements[0]++; 256 } else { 257 tagsInUse++; | 101 blks[i].set = 0; 102 blks[i].way = i; 103 } 104 assert(j == numCaches); 105 assert(index == numBlocks); 106 //assert(check()); 107} 108 --- 140 unchanged lines hidden (view full) --- 249 assert(blk->inCache == 0); 250 moveToHead(blk); 251 tagHash.erase(blk->tag); 252 tagHash[blkAlign(addr)] = blk; 253 if (blk->isValid()) { 254 replacements[0]++; 255 } else { 256 tagsInUse++; |
258 blk->isTouched = true; | |
259 if (!warmedUp && tagsInUse.value() >= warmupBound) { 260 warmedUp = true; 261 warmupCycle = curTick(); 262 } 263 } 264 //assert(check()); | 257 if (!warmedUp && tagsInUse.value() >= warmupBound) { 258 warmedUp = true; 259 warmupCycle = curTick(); 260 } 261 } 262 //assert(check()); |
263 |
|
265 return blk; 266} 267 268void 269FALRU::insertBlock(PacketPtr pkt, CacheBlk *blk) 270{ 271} 272 --- 61 unchanged lines hidden --- | 264 return blk; 265} 266 267void 268FALRU::insertBlock(PacketPtr pkt, CacheBlk *blk) 269{ 270} 271 --- 61 unchanged lines hidden --- |