Deleted Added
sdiff udiff text old ( 12557:16b682f1d8a2 ) new ( 12566:d6d48df9bf0f )
full compact
1/*
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

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

67 * The BaseSetAssoc tags provide a base, as well as the functionality
68 * common to any set associative tags. Any derived class must implement
69 * the methods related to the specifics of the actual replacment policy.
70 * These are:
71 *
72 * BlkType* accessBlock();
73 * BlkType* findVictim();
74 * void insertBlock();
75 * void invalidate();
76 */
77class BaseSetAssoc : public BaseTags
78{
79 public:
80 /** Typedef the block type used in this tag store. */
81 typedef CacheBlk BlkType;
82 /** Typedef the set type used in this tag store. */
83 typedef CacheSet<CacheBlk> SetType;

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

129 * Find the cache block given set and way
130 * @param set The set of the block.
131 * @param way The way of the block.
132 * @return The cache block.
133 */
134 CacheBlk *findBlockBySetAndWay(int set, int way) const override;
135
136 /**
137 * Invalidate the given block.
138 * @param blk The block to invalidate.
139 */
140 void invalidate(CacheBlk *blk) override
141 {
142 assert(blk);
143 assert(blk->isValid());
144 tagsInUse--;
145 assert(blk->srcMasterId < cache->system->maxMasters());
146 occupancies[blk->srcMasterId]--;
147 blk->srcMasterId = Request::invldMasterId;
148 blk->task_id = ContextSwitchTaskId::Unknown;
149 blk->tickInserted = curTick();
150 }
151
152 /**
153 * Access block and update replacement data. May not succeed, in which case
154 * nullptr is returned. This has all the implications of a cache
155 * access and should only be used as such. Returns the access latency as a
156 * side effect.
157 * @param addr The address to find.
158 * @param is_secure True if the target memory space is secure.
159 * @param lat The access latency.
160 * @return Pointer to the cache block if found.

--- 206 unchanged lines hidden ---