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

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

43/**
44 * @file
45 * Declaration of a base set associative tag store.
46 */
47
48#ifndef __MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
49#define __MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
50
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

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

43/**
44 * @file
45 * Declaration of a base set associative tag store.
46 */
47
48#ifndef __MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
49#define __MEM_CACHE_TAGS_BASE_SET_ASSOC_HH__
50
51#include <cstdint>
51#include <functional>
52#include <string>
53#include <vector>
54
55#include "base/logging.hh"
56#include "base/types.hh"
57#include "mem/cache/base.hh"
58#include "mem/cache/cache_blk.hh"

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

155 }
156
157 /**
158 * Find replacement victim based on address. The list of evicted blocks
159 * only contains the victim.
160 *
161 * @param addr Address to find a victim for.
162 * @param is_secure True if the target memory space is secure.
52#include <functional>
53#include <string>
54#include <vector>
55
56#include "base/logging.hh"
57#include "base/types.hh"
58#include "mem/cache/base.hh"
59#include "mem/cache/cache_blk.hh"

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

156 }
157
158 /**
159 * Find replacement victim based on address. The list of evicted blocks
160 * only contains the victim.
161 *
162 * @param addr Address to find a victim for.
163 * @param is_secure True if the target memory space is secure.
164 * @param size Size, in bits, of new block to allocate.
163 * @param evict_blks Cache blocks to be evicted.
164 * @return Cache block to be replaced.
165 */
166 CacheBlk* findVictim(Addr addr, const bool is_secure,
165 * @param evict_blks Cache blocks to be evicted.
166 * @return Cache block to be replaced.
167 */
168 CacheBlk* findVictim(Addr addr, const bool is_secure,
169 const std::size_t size,
167 std::vector<CacheBlk*>& evict_blks) const override
168 {
169 // Get possible entries to be victimized
170 const std::vector<ReplaceableEntry*> entries =
171 indexingPolicy->getPossibleEntries(addr);
172
173 // Choose replacement victim from replacement candidates
174 CacheBlk* victim = static_cast<CacheBlk*>(replacementPolicy->getVictim(

--- 73 unchanged lines hidden ---
170 std::vector<CacheBlk*>& evict_blks) const override
171 {
172 // Get possible entries to be victimized
173 const std::vector<ReplaceableEntry*> entries =
174 indexingPolicy->getPossibleEntries(addr);
175
176 // Choose replacement victim from replacement candidates
177 CacheBlk* victim = static_cast<CacheBlk*>(replacementPolicy->getVictim(

--- 73 unchanged lines hidden ---