snoop_filter.hh (14005:6cad91d6136c) | snoop_filter.hh (14122:11979370f6f8) |
---|---|
1/* 2 * Copyright (c) 2013-2016,2019 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 --- 80 unchanged lines hidden (view full) --- 89 public: 90 91 // Change for systems with more than 256 ports tracked by this object 92 static const int SNOOP_MASK_SIZE = 256; 93 94 typedef std::vector<QueuedSlavePort*> SnoopList; 95 96 SnoopFilter (const SnoopFilterParams *p) : | 1/* 2 * Copyright (c) 2013-2016,2019 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 --- 80 unchanged lines hidden (view full) --- 89 public: 90 91 // Change for systems with more than 256 ports tracked by this object 92 static const int SNOOP_MASK_SIZE = 256; 93 94 typedef std::vector<QueuedSlavePort*> SnoopList; 95 96 SnoopFilter (const SnoopFilterParams *p) : |
97 SimObject(p), reqLookupResult(cachedLocations.end()), retryItem{0, 0}, | 97 SimObject(p), reqLookupResult(cachedLocations.end()), |
98 linesize(p->system->cacheLineSize()), lookupLatency(p->lookup_latency), 99 maxEntryCount(p->max_capacity / p->system->cacheLineSize()) 100 { 101 } 102 103 /** 104 * Init a new snoop filter and tell it about all the slave ports 105 * of the enclosing bus. --- 150 unchanged lines hidden (view full) --- 256 257 /** 258 * Removes snoop filter items which have no requesters and no holders. 259 */ 260 void eraseIfNullEntry(SnoopFilterCache::iterator& sf_it); 261 262 /** Simple hash set of cached addresses. */ 263 SnoopFilterCache cachedLocations; | 98 linesize(p->system->cacheLineSize()), lookupLatency(p->lookup_latency), 99 maxEntryCount(p->max_capacity / p->system->cacheLineSize()) 100 { 101 } 102 103 /** 104 * Init a new snoop filter and tell it about all the slave ports 105 * of the enclosing bus. --- 150 unchanged lines hidden (view full) --- 256 257 /** 258 * Removes snoop filter items which have no requesters and no holders. 259 */ 260 void eraseIfNullEntry(SnoopFilterCache::iterator& sf_it); 261 262 /** Simple hash set of cached addresses. */ 263 SnoopFilterCache cachedLocations; |
264 |
|
264 /** | 265 /** |
265 * Iterator used to store the result from lookupRequest until we 266 * call finishRequest. | 266 * A request lookup must be followed by a call to finishRequest to inform 267 * the operation's success. If a retry is needed, however, all changes 268 * made to the snoop filter while performing the lookup must be undone. 269 * This structure keeps track of the state previous to such changes. |
267 */ | 270 */ |
268 SnoopFilterCache::iterator reqLookupResult; 269 /** 270 * Variable to temporarily store value of snoopfilter entry 271 * incase finishRequest needs to undo changes made in lookupRequest 272 * (because of crossbar retry) 273 */ 274 SnoopItem retryItem; | 271 struct ReqLookupResult { 272 /** Iterator used to store the result from lookupRequest. */ 273 SnoopFilterCache::iterator it; 274 275 /** 276 * Variable to temporarily store value of snoopfilter entry 277 * in case finishRequest needs to undo changes made in lookupRequest 278 * (because of crossbar retry) 279 */ 280 SnoopItem retryItem; 281 282 /** 283 * The constructor must be informed of the internal cache's end 284 * iterator, so do not allow the compiler to implictly define it. 285 * 286 * @param end_it Iterator to the end of the internal cache. 287 */ 288 ReqLookupResult(SnoopFilterCache::iterator end_it) 289 : it(end_it), retryItem{0, 0} 290 { 291 } 292 ReqLookupResult() = delete; 293 } reqLookupResult; 294 |
275 /** List of all attached snooping slave ports. */ 276 SnoopList slavePorts; 277 /** Track the mapping from port ids to the local mask ids. */ 278 std::vector<PortID> localSlavePortIds; 279 /** Cache line size. */ 280 const unsigned linesize; 281 /** Latency for doing a lookup in the filter */ 282 const Cycles lookupLatency; --- 41 unchanged lines hidden --- | 295 /** List of all attached snooping slave ports. */ 296 SnoopList slavePorts; 297 /** Track the mapping from port ids to the local mask ids. */ 298 std::vector<PortID> localSlavePortIds; 299 /** Cache line size. */ 300 const unsigned linesize; 301 /** Latency for doing a lookup in the filter */ 302 const Cycles lookupLatency; --- 41 unchanged lines hidden --- |