base.hh (13752:135bb759ee9c) base.hh (13941:2c19da00ef9c)
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

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

45 * @file
46 * Declaration of a common base class for cache tagstore objects.
47 */
48
49#ifndef __MEM_CACHE_TAGS_BASE_HH__
50#define __MEM_CACHE_TAGS_BASE_HH__
51
52#include <cassert>
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

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

45 * @file
46 * Declaration of a common base class for cache tagstore objects.
47 */
48
49#ifndef __MEM_CACHE_TAGS_BASE_HH__
50#define __MEM_CACHE_TAGS_BASE_HH__
51
52#include <cassert>
53#include <cstdint>
53#include <functional>
54#include <string>
55
56#include "base/callback.hh"
57#include "base/logging.hh"
58#include "base/statistics.hh"
59#include "base/types.hh"
60#include "mem/cache/cache_blk.hh"

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

271 * conventional cache is being used, the list only contains the victim.
272 * However, if using sector or compressed caches, the victim is one of
273 * the blocks to be evicted, but its location is the only one that will
274 * be assigned to the newly allocated block associated to this address.
275 * @sa insertBlock
276 *
277 * @param addr Address to find a victim for.
278 * @param is_secure True if the target memory space is secure.
54#include <functional>
55#include <string>
56
57#include "base/callback.hh"
58#include "base/logging.hh"
59#include "base/statistics.hh"
60#include "base/types.hh"
61#include "mem/cache/cache_blk.hh"

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

272 * conventional cache is being used, the list only contains the victim.
273 * However, if using sector or compressed caches, the victim is one of
274 * the blocks to be evicted, but its location is the only one that will
275 * be assigned to the newly allocated block associated to this address.
276 * @sa insertBlock
277 *
278 * @param addr Address to find a victim for.
279 * @param is_secure True if the target memory space is secure.
280 * @param size Size, in bits, of new block to allocate.
279 * @param evict_blks Cache blocks to be evicted.
280 * @return Cache block to be replaced.
281 */
282 virtual CacheBlk* findVictim(Addr addr, const bool is_secure,
281 * @param evict_blks Cache blocks to be evicted.
282 * @return Cache block to be replaced.
283 */
284 virtual CacheBlk* findVictim(Addr addr, const bool is_secure,
285 const std::size_t size,
283 std::vector<CacheBlk*>& evict_blks) const = 0;
284
285 /**
286 * Access block and update replacement data. May not succeed, in which case
287 * nullptr is returned. This has all the implications of a cache access and
288 * should only be used as such. Returns the tag lookup latency as a side
289 * effect.
290 *

--- 85 unchanged lines hidden ---
286 std::vector<CacheBlk*>& evict_blks) const = 0;
287
288 /**
289 * Access block and update replacement data. May not succeed, in which case
290 * nullptr is returned. This has all the implications of a cache access and
291 * should only be used as such. Returns the tag lookup latency as a side
292 * effect.
293 *

--- 85 unchanged lines hidden ---