base.hh (12743:b5ccee582b40) base.hh (12744:d1ff0b42b747)
1/*
2 * Copyright (c) 2012-2014,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

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

257 occupancies[blk->srcMasterId]--;
258 totalRefs += blk->refCount;
259 sampledRefs++;
260
261 blk->invalidate();
262 }
263
264 /**
1/*
2 * Copyright (c) 2012-2014,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

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

257 occupancies[blk->srcMasterId]--;
258 totalRefs += blk->refCount;
259 sampledRefs++;
260
261 blk->invalidate();
262 }
263
264 /**
265 * Find replacement victim based on address.
265 * Find replacement victim based on address. If the address requires
266 * blocks to be evicted, their locations are listed for eviction. If a
267 * conventional cache is being used, the list only contains the victim.
268 * However, if using sector or compressed caches, the victim is one of
269 * the blocks to be evicted, but its location is the only one that will
270 * be assigned to the newly allocated block associated to this address.
271 * @sa insertBlock
266 *
267 * @param addr Address to find a victim for.
272 *
273 * @param addr Address to find a victim for.
274 * @param evict_blks Cache blocks to be evicted.
268 * @return Cache block to be replaced.
269 */
275 * @return Cache block to be replaced.
276 */
270 virtual CacheBlk* findVictim(Addr addr) = 0;
277 virtual CacheBlk* findVictim(Addr addr, std::vector<CacheBlk*>& evict_blks)
278 const = 0;
271
272 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0;
273
274 virtual Addr extractTag(Addr addr) const = 0;
275
276 /**
277 * Insert the new block into the cache and update stats.
278 *

--- 67 unchanged lines hidden ---
279
280 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0;
281
282 virtual Addr extractTag(Addr addr) const = 0;
283
284 /**
285 * Insert the new block into the cache and update stats.
286 *

--- 67 unchanged lines hidden ---