snoop_filter.hh (10403:b3231fc8ae9d) snoop_filter.hh (10888:85a001f2193b)
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"
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"
53#include "params/SnoopFilter.hh"
54#include "sim/sim_object.hh"
55#include "sim/system.hh"
56
57/**
58 * This snoop filter keeps track of which connected port has a
59 * particular line of data. It can be queried (through lookup*) on
60 * memory requests from above (reads / writes / ...); and also from

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

80 * pkt, instead of proper messages through the bus
81 * (3) there are no clean evict messages telling the snoop filter that a local,
82 * upper cache dropped a line, making the snoop filter pessimistic for now
83 * (4) ordering: there is no single point of order in the system. Instead,
84 * requesting MSHRs track order between local requests and remote snoops
85 */
86class SnoopFilter : public SimObject {
87 public:
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:
88 typedef std::vector SnoopList;
89 typedef std::vector<QueuedSlavePort*> SnoopList;
89
90 SnoopFilter (const SnoopFilterParams *p) : SimObject(p),
91 linesize(p->system->cacheLineSize()), lookupLatency(p->lookup_latency)
92 {
93 }
94
95 /**
96 * Init a new snoop filter and tell it about all the slave ports of the
97 * enclosing bus.
98 *
99 * @param bus_slave_ports Vector of slave ports that the bus is attached to.
100 */
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 */
101 void setSlavePorts(const std::vector<SlavePort*>& bus_slave_ports) {
102 void setSlavePorts(const SnoopList& bus_slave_ports) {
102 slavePorts = bus_slave_ports;
103 }
104
105 /**
106 * Lookup a request (from a slave port) in the snoop filter and return a
107 * list of other slave ports that need forwarding of the resulting snoops.
108 * Additionally, update the tracking structures with new request
109 * information.

--- 162 unchanged lines hidden ---
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 ---