1/* 2 * Copyright (c) 2013 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 --- 36 unchanged lines hidden (view full) --- 45#ifndef __MEM_SNOOP_FILTER_HH__ 46#define __MEM_SNOOP_FILTER_HH__ 47 48#include <utility> 49 50#include "base/hashmap.hh" 51#include "mem/packet.hh" 52#include "mem/port.hh" |
53#include "mem/qport.hh" |
54#include "params/SnoopFilter.hh" 55#include "sim/sim_object.hh" 56#include "sim/system.hh" 57 58/** 59 * This snoop filter keeps track of which connected port has a 60 * particular line of data. It can be queried (through lookup*) on 61 * memory requests from above (reads / writes / ...); and also from --- 19 unchanged lines hidden (view full) --- 81 * pkt, instead of proper messages through the bus 82 * (3) there are no clean evict messages telling the snoop filter that a local, 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. --- 162 unchanged lines hidden --- |