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 IndexingPolicy; |
66class ReplaceableEntry; 67 68/** 69 * A common base class of Cache tagstore objects. 70 */ 71class BaseTags : public ClockedObject 72{ 73 protected: --- 9 unchanged lines hidden (view full) --- 83 * The total access latency of the cache. This latency 84 * is different depending on the cache access mode 85 * (parallel or sequential) 86 */ 87 const Cycles accessLatency; 88 /** Pointer to the parent cache. */ 89 BaseCache *cache; 90 |
91 /** Indexing policy */ 92 BaseIndexingPolicy *indexingPolicy; 93 |
94 /** 95 * The number of tags that need to be touched to meet the warmup 96 * percentage. 97 */ 98 const unsigned warmupBound; 99 /** Marked true when the cache is warmed up. */ 100 bool warmedUp; 101 --- 58 unchanged lines hidden (view full) --- 160 161 /** 162 * Set the parent cache back pointer. 163 * 164 * @param _cache Pointer to parent cache. 165 */ 166 void setCache(BaseCache *_cache); 167 |
168 public: 169 typedef BaseTagsParams Params; 170 BaseTags(const Params *p); 171 172 /** 173 * Destructor. 174 */ 175 virtual ~BaseTags() {} --- 37 unchanged lines hidden (view full) --- 213 214 /** 215 * Find a block given set and way. 216 * 217 * @param set The set of the block. 218 * @param way The way of the block. 219 * @return The block. 220 */ |
221 virtual ReplaceableEntry* findBlockBySetAndWay(int set, int way) const; |
222 223 /** 224 * Align an address to the block size. 225 * @param addr the address to align. 226 * @return The block address. 227 */ 228 Addr blkAlign(Addr addr) const 229 { --- 60 unchanged lines hidden (view full) --- 290 * @param evict_blks Cache blocks to be evicted. 291 * @return Cache block to be replaced. 292 */ 293 virtual CacheBlk* findVictim(Addr addr, const bool is_secure, 294 std::vector<CacheBlk*>& evict_blks) const = 0; 295 296 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0; 297 |
298 /** 299 * Generate the tag from the given address. 300 * 301 * @param addr The address to get the tag from. 302 * @return The tag of the address. 303 */ 304 virtual Addr extractTag(const Addr addr) const; |
305 306 /** 307 * Insert the new block into the cache and update stats. 308 * 309 * @param addr Address of the block. 310 * @param is_secure Whether the block is in secure space or not. 311 * @param src_master_ID The source requestor ID. 312 * @param task_ID The new task ID. --- 68 unchanged lines hidden --- |