1/* 2 * Copyright (c) 2012-2014,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 --- 223 unchanged lines hidden (view full) --- 232 CacheBlk* victim = static_cast<CacheBlk*>(replacementPolicy->getVictim( 233 std::vector<ReplaceableEntry*>( 234 locations.begin(), locations.end()))); 235 236 // There is only one eviction for this replacement 237 evict_blks.push_back(victim); 238 239 DPRINTF(CacheRepl, "set %x, way %x: selecting blk for replacement\n", |
240 victim->getSet(), victim->getWay()); |
241 242 return victim; 243 } 244 245 /** 246 * Insert the new block into the cache and update replacement data. 247 * 248 * @param addr Address of the block. --- 48 unchanged lines hidden (view full) --- 297 /** 298 * Regenerate the block address from the tag and set. 299 * 300 * @param block The block. 301 * @return the block address. 302 */ 303 Addr regenerateBlkAddr(const CacheBlk* blk) const override 304 { |
305 const Addr set = blk->getSet() << setShift; 306 return ((blk->tag << tagShift) | set); |
307 } 308 309 void forEachBlk(std::function<void(CacheBlk &)> visitor) override { 310 for (CacheBlk& blk : blks) { 311 visitor(blk); 312 } 313 } 314 --- 23 unchanged lines hidden --- |