Deleted Added
sdiff udiff text old ( 13217:725b1701b4ee ) new ( 13219:454ecc63338d )
full compact
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

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

57#include "base/logging.hh"
58#include "base/statistics.hh"
59#include "base/types.hh"
60#include "mem/cache/blk.hh"
61#include "params/BaseTags.hh"
62#include "sim/clocked_object.hh"
63
64class BaseCache;
65class ReplaceableEntry;
66
67/**
68 * A common base class of Cache tagstore objects.
69 */
70class BaseTags : public ClockedObject
71{
72 protected:

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

82 * The total access latency of the cache. This latency
83 * is different depending on the cache access mode
84 * (parallel or sequential)
85 */
86 const Cycles accessLatency;
87 /** Pointer to the parent cache. */
88 BaseCache *cache;
89
90 /**
91 * The number of tags that need to be touched to meet the warmup
92 * percentage.
93 */
94 const unsigned warmupBound;
95 /** Marked true when the cache is warmed up. */
96 bool warmedUp;
97

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

156
157 /**
158 * Set the parent cache back pointer.
159 *
160 * @param _cache Pointer to parent cache.
161 */
162 void setCache(BaseCache *_cache);
163
164 /**
165 * Find all possible block locations for insertion and replacement of
166 * an address. Should be called immediately before ReplacementPolicy's
167 * findVictim() not to break cache resizing.
168 * Returns blocks in all ways belonging to the set of the address.
169 *
170 * @param addr The addr to a find possible locations for.
171 * @return The possible locations.
172 */
173 virtual std::vector<ReplaceableEntry*> getPossibleLocations(
174 const Addr addr) const;
175
176 public:
177 typedef BaseTagsParams Params;
178 BaseTags(const Params *p);
179
180 /**
181 * Destructor.
182 */
183 virtual ~BaseTags() {}

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

221
222 /**
223 * Find a block given set and way.
224 *
225 * @param set The set of the block.
226 * @param way The way of the block.
227 * @return The block.
228 */
229 virtual ReplaceableEntry* findBlockBySetAndWay(int set, int way) const = 0;
230
231 /**
232 * Align an address to the block size.
233 * @param addr the address to align.
234 * @return The block address.
235 */
236 Addr blkAlign(Addr addr) const
237 {

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

298 * @param evict_blks Cache blocks to be evicted.
299 * @return Cache block to be replaced.
300 */
301 virtual CacheBlk* findVictim(Addr addr, const bool is_secure,
302 std::vector<CacheBlk*>& evict_blks) const = 0;
303
304 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0;
305
306 virtual Addr extractTag(Addr addr) const = 0;
307
308 /**
309 * Insert the new block into the cache and update stats.
310 *
311 * @param addr Address of the block.
312 * @param is_secure Whether the block is in secure space or not.
313 * @param src_master_ID The source requestor ID.
314 * @param task_ID The new task ID.

--- 68 unchanged lines hidden ---