base.hh (12574:22936e2eb2da) | base.hh (12600:e670dd17c8cf) |
---|---|
1/* 2 * Copyright (c) 2012-2014,2016-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 --- 40 unchanged lines hidden (view full) --- 49#ifndef __MEM_CACHE_TAGS_BASE_HH__ 50#define __MEM_CACHE_TAGS_BASE_HH__ 51 52#include <string> 53 54#include "base/callback.hh" 55#include "base/statistics.hh" 56#include "mem/cache/blk.hh" | 1/* 2 * Copyright (c) 2012-2014,2016-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 --- 40 unchanged lines hidden (view full) --- 49#ifndef __MEM_CACHE_TAGS_BASE_HH__ 50#define __MEM_CACHE_TAGS_BASE_HH__ 51 52#include <string> 53 54#include "base/callback.hh" 55#include "base/statistics.hh" 56#include "mem/cache/blk.hh" |
57#include "mem/cache/replacement_policies/base.hh" |
|
57#include "params/BaseTags.hh" 58#include "sim/clocked_object.hh" 59 60class BaseCache; 61 62/** 63 * A common base class of Cache tagstore objects. 64 */ --- 179 unchanged lines hidden (view full) --- 244 virtual void invalidate(CacheBlk *blk) 245 { 246 assert(blk); 247 assert(blk->isValid()); 248 tagsInUse--; 249 occupancies[blk->srcMasterId]--; 250 } 251 | 58#include "params/BaseTags.hh" 59#include "sim/clocked_object.hh" 60 61class BaseCache; 62 63/** 64 * A common base class of Cache tagstore objects. 65 */ --- 179 unchanged lines hidden (view full) --- 245 virtual void invalidate(CacheBlk *blk) 246 { 247 assert(blk); 248 assert(blk->isValid()); 249 tagsInUse--; 250 occupancies[blk->srcMasterId]--; 251 } 252 |
253 /** 254 * Find replacement victim based on address. 255 * 256 * @param addr Address to find a victim for. 257 * @return Cache block to be replaced. 258 */ 259 virtual CacheBlk* findVictim(Addr addr) = 0; 260 |
|
252 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0; 253 254 virtual Addr extractTag(Addr addr) const = 0; 255 256 virtual void insertBlock(PacketPtr pkt, CacheBlk *blk) = 0; 257 258 /** 259 * Regenerate the block address. 260 * 261 * @param block The block. 262 * @return the block address. 263 */ 264 virtual Addr regenerateBlkAddr(const CacheBlk* blk) const = 0; 265 | 261 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat) = 0; 262 263 virtual Addr extractTag(Addr addr) const = 0; 264 265 virtual void insertBlock(PacketPtr pkt, CacheBlk *blk) = 0; 266 267 /** 268 * Regenerate the block address. 269 * 270 * @param block The block. 271 * @return the block address. 272 */ 273 virtual Addr regenerateBlkAddr(const CacheBlk* blk) const = 0; 274 |
266 virtual CacheBlk* findVictim(Addr addr) = 0; 267 | |
268 virtual int extractSet(Addr addr) const = 0; 269 270 virtual void forEachBlk(CacheBlkVisitor &visitor) = 0; 271}; 272 273class BaseTagsCallback : public Callback 274{ 275 BaseTags *tags; --- 14 unchanged lines hidden --- | 275 virtual int extractSet(Addr addr) const = 0; 276 277 virtual void forEachBlk(CacheBlkVisitor &visitor) = 0; 278}; 279 280class BaseTagsCallback : public Callback 281{ 282 BaseTags *tags; --- 14 unchanged lines hidden --- |