Deleted Added
sdiff udiff text old ( 8831:6c08a877af8f ) new ( 8856:241ee47b0dc6 )
full compact
1/*
2 * Copyright (c) 2012 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

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

36 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
37 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
38 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
39 *
40 * Authors: Erik Hallnor
41 * Dave Greene
42 * Steve Reinhardt
43 * Ron Dreslinski
44 */
45
46/**
47 * @file
48 * Describes a cache based on template policies.
49 */
50
51#ifndef __CACHE_HH__

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

71 public:
72 /** Define the type of cache block to use. */
73 typedef typename TagStore::BlkType BlkType;
74 /** A typedef for a list of BlkType pointers. */
75 typedef typename TagStore::BlkList BlkList;
76
77 protected:
78
79 class CpuSidePort : public CachePort
80 {
81 public:
82 CpuSidePort(const std::string &_name,
83 Cache<TagStore> *_cache,
84 const std::string &_label);
85
86 // BaseCache::CachePort just has a BaseCache *; this function
87 // lets us get back the type info we lost when we stored the
88 // cache pointer there.
89 Cache<TagStore> *myCache() {
90 return static_cast<Cache<TagStore> *>(cache);
91 }
92
93 virtual AddrRangeList getAddrRanges();
94
95 virtual bool recvTiming(PacketPtr pkt);
96
97 virtual Tick recvAtomic(PacketPtr pkt);
98
99 virtual void recvFunctional(PacketPtr pkt);
100 };
101
102 class MemSidePort : public CachePort
103 {
104 public:
105 MemSidePort(const std::string &_name,
106 Cache<TagStore> *_cache,
107 const std::string &_label);
108
109 // BaseCache::CachePort just has a BaseCache *; this function
110 // lets us get back the type info we lost when we stored the
111 // cache pointer there.
112 Cache<TagStore> *myCache() {
113 return static_cast<Cache<TagStore> *>(cache);
114 }
115
116 void sendPacket();
117
118 void processSendEvent();
119
120 virtual bool isSnooping();
121
122 virtual bool recvTiming(PacketPtr pkt);
123
124 virtual void recvRetry();
125
126 virtual Tick recvAtomic(PacketPtr pkt);
127
128 virtual void recvFunctional(PacketPtr pkt);
129
130 typedef EventWrapper<MemSidePort, &MemSidePort::processSendEvent>
131 SendEvent;
132 };
133
134 /** Tag and data Storage */
135 TagStore *tags;
136
137 /** Prefetcher */
138 BasePrefetcher *prefetcher;
139

--- 198 unchanged lines hidden ---