Deleted Added
sdiff udiff text old ( 11129:48c02e8b0bbb ) new ( 11131:22e739752f47 )
full compact
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

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

83 * upper cache dropped a line, making the snoop filter pessimistic for now
84 * (4) ordering: there is no single point of order in the system. Instead,
85 * requesting MSHRs track order between local requests and remote snoops
86 */
87class SnoopFilter : public SimObject {
88 public:
89 typedef std::vector<QueuedSlavePort*> SnoopList;
90
91 SnoopFilter (const SnoopFilterParams *p) : SimObject(p),
92 linesize(p->system->cacheLineSize()), lookupLatency(p->lookup_latency)
93 {
94 }
95
96 /**
97 * Init a new snoop filter and tell it about all the slave ports of the
98 * enclosing bus.
99 *
100 * @param bus_slave_ports Vector of slave ports that the bus is attached to.
101 */
102 void setSlavePorts(const SnoopList& bus_slave_ports) {
103 slavePorts = bus_slave_ports;
104 }
105
106 /**
107 * Lookup a request (from a slave port) in the snoop filter and return a
108 * list of other slave ports that need forwarding of the resulting snoops.
109 * Additionally, update the tracking structures with new request
110 * information.
111 *
112 * @param cpkt Pointer to the request packet. Not changed.
113 * @param slave_port Slave port where the request came from.
114 * @return Pair of a vector of snoop target ports and lookup latency.
115 */
116 std::pair<SnoopList, Cycles> lookupRequest(const Packet* cpkt,
117 const SlavePort& slave_port);
118
119 /**
120 * For a successful request, update all data structures in the snoop filter
121 * reflecting the changes caused by that request
122 *
123 * @param cpkt Pointer to the request packet. Not changed.
124 * @param slave_port Slave port where the request came from.
125 * @param will_retry This request will retry on this bus / snoop filter
126 */
127 void updateRequest(const Packet* cpkt, const SlavePort& slave_port,
128 bool will_retry);
129
130 /**
131 * Handle an incoming snoop from below (the master port). These can upgrade the
132 * tracking logic and may also benefit from additional steering thanks to the
133 * snoop filter.
134 * @param cpkt Pointer to const Packet containing the snoop.
135 * @return Pair with a vector of SlavePorts that need snooping and a lookup
136 * latency.

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

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 */

--- 41 unchanged lines hidden ---