fa_lru.cc (10815:169af9a2779f) | fa_lru.cc (10941:a39646f4c407) |
---|---|
1/* 2 * Copyright (c) 2013 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 --- 87 unchanged lines hidden (view full) --- 96 cacheBoundaries[j] = &(blks[i]); 97 flags &= ~ (1<<j); 98 ++j; 99 index = index << 1; 100 } 101 blks[i].prev = &(blks[i-1]); 102 blks[i].next = &(blks[i+1]); 103 blks[i].isTouched = false; | 1/* 2 * Copyright (c) 2013 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 --- 87 unchanged lines hidden (view full) --- 96 cacheBoundaries[j] = &(blks[i]); 97 flags &= ~ (1<<j); 98 ++j; 99 index = index << 1; 100 } 101 blks[i].prev = &(blks[i-1]); 102 blks[i].next = &(blks[i+1]); 103 blks[i].isTouched = false; |
104 blks[i].set = 0; 105 blks[i].way = i; |
|
104 } 105 assert(j == numCaches); 106 assert(index == numBlocks); 107 //assert(check()); 108} 109 110FALRU::~FALRU() 111{ --- 110 unchanged lines hidden (view full) --- 222 assert(blk->tag == blkAddr); 223 } else { 224 blk = NULL; 225 } 226 return blk; 227} 228 229CacheBlk* | 106 } 107 assert(j == numCaches); 108 assert(index == numBlocks); 109 //assert(check()); 110} 111 112FALRU::~FALRU() 113{ --- 110 unchanged lines hidden (view full) --- 224 assert(blk->tag == blkAddr); 225 } else { 226 blk = NULL; 227 } 228 return blk; 229} 230 231CacheBlk* |
232FALRU::findBlockBySetAndWay(int set, int way) const 233{ 234 assert(set == 0); 235 return &blks[way]; 236} 237 238CacheBlk* |
|
230FALRU::findVictim(Addr addr) 231{ 232 FALRUBlk * blk = tail; 233 assert(blk->inCache == 0); 234 moveToHead(blk); 235 tagHash.erase(blk->tag); 236 tagHash[blkAlign(addr)] = blk; 237 if (blk->isValid()) { --- 87 unchanged lines hidden --- | 239FALRU::findVictim(Addr addr) 240{ 241 FALRUBlk * blk = tail; 242 assert(blk->inCache == 0); 243 moveToHead(blk); 244 tagHash.erase(blk->tag); 245 tagHash[blkAlign(addr)] = blk; 246 if (blk->isValid()) { --- 87 unchanged lines hidden --- |