Deleted Added
sdiff udiff text old ( 3738:c06cd072bbbe ) new ( 3860:73e3642713a3 )
full compact
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

33/**
34 * @file
35 * Describes a cache based on template policies.
36 */
37
38#ifndef __CACHE_HH__
39#define __CACHE_HH__
40
41#include "base/misc.hh" // fatal, panic, and warn
42#include "cpu/smt.hh" // SMT_MAX_THREADS
43
44#include "mem/cache/base_cache.hh"
45#include "mem/cache/miss/miss_buffer.hh"
46#include "mem/cache/prefetch/prefetcher.hh"
47
48//Forward decleration
49class MSHR;
50
51
52/**

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

57 * UniCoherence, SimpleMultiCoherence.
58 */
59template <class TagStore, class Coherence>
60class Cache : public BaseCache
61{
62 public:
63 /** Define the type of cache block to use. */
64 typedef typename TagStore::BlkType BlkType;
65
66 bool prefetchAccess;
67
68 protected:
69
70 class CpuSidePort : public CachePort
71 {
72 public:

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

136
137 /**
138 * A permanent mem req to always be used to cause invalidations.
139 * Used to append to target list, to cause an invalidation.
140 */
141 PacketPtr invalidatePkt;
142 Request *invalidateReq;
143
144 public:
145
146 class Params
147 {
148 public:
149 TagStore *tags;
150 MissBuffer *missQueue;
151 Coherence *coherence;
152 BaseCache::Params baseParams;
153 Prefetcher<TagStore> *prefetcher;
154 bool prefetchAccess;
155 int hitLatency;
156
157 Params(TagStore *_tags, MissBuffer *mq, Coherence *coh,
158 BaseCache::Params params,
159 Prefetcher<TagStore> *_prefetcher,
160 bool prefetch_access, int hit_latency)
161 : tags(_tags), missQueue(mq), coherence(coh),
162 baseParams(params),
163 prefetcher(_prefetcher), prefetchAccess(prefetch_access),
164 hitLatency(hit_latency)
165 {
166 }
167 };
168
169 /** Instantiates a basic cache object. */
170 Cache(const std::string &_name, Params &params);
171
172 virtual Port *getPort(const std::string &if_name, int idx = -1);

--- 106 unchanged lines hidden ---