base.hh (10815:169af9a2779f) base.hh (10941:a39646f4c407)
1/*
1/*
2 * Copyright (c) 2012-2013 ARM Limited
2 * Copyright (c) 2012-2014 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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

191 * @param addr the address to get the offset of.
192 * @return the block offset.
193 */
194 int extractBlkOffset(Addr addr) const
195 {
196 return (addr & (Addr)(blkSize-1));
197 }
198
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
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated

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

191 * @param addr the address to get the offset of.
192 * @return the block offset.
193 */
194 int extractBlkOffset(Addr addr) const
195 {
196 return (addr & (Addr)(blkSize-1));
197 }
198
199 /**
200 * Find the cache block given set and way
201 * @param set The set of the block.
202 * @param way The way of the block.
203 * @return The cache block.
204 */
205 virtual CacheBlk *findBlockBySetAndWay(int set, int way) const = 0;
206
207 /**
208 * Limit the allocation for the cache ways.
209 * @param ways The maximum number of ways available for replacement.
210 */
211 virtual void setWayAllocationMax(int ways)
212 {
213 panic("This tag class does not implement way allocation limit!\n");
214 }
215
216 /**
217 * Get the way allocation mask limit.
218 * @return The maximum number of ways available for replacement.
219 */
220 virtual int getWayAllocationMax() const
221 {
222 panic("This tag class does not implement way allocation limit!\n");
223 return -1;
224 }
225
226 virtual unsigned getNumSets() const = 0;
227
228 virtual unsigned getNumWays() const = 0;
229
199 virtual void invalidate(CacheBlk *blk) = 0;
200
201 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat,
202 int context_src) = 0;
203
204 virtual Addr extractTag(Addr addr) const = 0;
205
206 virtual void insertBlock(PacketPtr pkt, CacheBlk *blk) = 0;

--- 27 unchanged lines hidden ---
230 virtual void invalidate(CacheBlk *blk) = 0;
231
232 virtual CacheBlk* accessBlock(Addr addr, bool is_secure, Cycles &lat,
233 int context_src) = 0;
234
235 virtual Addr extractTag(Addr addr) const = 0;
236
237 virtual void insertBlock(PacketPtr pkt, CacheBlk *blk) = 0;

--- 27 unchanged lines hidden ---