1/* |
2 * Copyright (c) 2013-2015 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 --- 187 unchanged lines hidden (view full) --- 198 * outstanding request to this line (requested) or already share a cache line 199 * with this address (holder). 200 */ 201 struct SnoopItem { 202 SnoopMask requested; 203 SnoopMask holder; 204 }; 205 /** |
206 * HashMap of SnoopItems indexed by line address 207 */ 208 typedef m5::hash_map<Addr, SnoopItem> SnoopFilterCache; 209 210 /** |
211 * Convert a single port to a corresponding, one-hot bitmask 212 * @param port SlavePort that should be converted. 213 * @return One-hot bitmask corresponding to the port. 214 */ 215 SnoopMask portToMask(const SlavePort& port) const; 216 /** 217 * Convert multiple ports to a corresponding bitmask 218 * @param ports SnoopList that should be converted. 219 * @return Bitmask corresponding to the ports in the list. 220 */ 221 SnoopMask portListToMask(const SnoopList& ports) const; 222 /** 223 * Converts a bitmask of ports into the corresponing list of ports 224 * @param ports SnoopMask of the requested ports 225 * @return SnoopList containing all the requested SlavePorts 226 */ 227 SnoopList maskToPortList(SnoopMask ports) const; 228 229 private: |
230 231 /** 232 * Removes snoop filter items which have no requesters and no holders. 233 */ 234 void eraseIfNullEntry(SnoopFilterCache::iterator& sf_it); |
235 /** Simple hash set of cached addresses. */ |
236 SnoopFilterCache cachedLocations; 237 /** 238 * Variable to temporarily store value of snoopfilter entry 239 * incase updateRequest needs to undo changes made in lookupRequest 240 * (because of crossbar retry) 241 */ 242 SnoopItem retryItem; |
243 /** List of all attached slave ports. */ 244 SnoopList slavePorts; 245 /** Cache line size. */ 246 const unsigned linesize; 247 /** Latency for doing a lookup in the filter */ 248 const Cycles lookupLatency; 249 250 /** Statistics */ --- 38 unchanged lines hidden --- |