-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathghb.hh
52 lines (39 loc) · 971 Bytes
/
ghb.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* ghb.hh
*
* Created on: 20-Apr-2015
* Author: biswa
*/
#ifndef _MEM_CACHE_PREFETCH_GHB_HH_
#define _MEM_CACHE_PREFETCH_GHB_HH_
#include <climits>
#include "mem/cache/prefetch/base.hh"
#include "params/DepthGHBPrefetcher.hh"
class GHBPrefetcher : public BasePrefetcher
{
protected:
static const int Max_Contexts = 64;
class IndexTableEntry {
public:
Addr deltaAddr;
uint16_t GHBPointer;
uint16_t confidence;
};
Addr *lastMissAddr[Max_Contexts];
std::list<IndexTableEntry*> Index_Table[Max_Contexts];
class GHB
{
public:
Addr missAddr;
int16_t LinkPointer;
};
std::list<GHB*> GHB_Fifo[Max_Contexts];
public:
GHBPrefetcher(const GHBPrefetcherParams *p)
: QueuedPrefetcher(p)
{
}
~GHBPrefetcher() {}
void calculatePrefetch(PacketPtr &pkt, std::Vector<Addr> &addresses);
};
#endif /* __MEM_CACHE_PREFETCH_GHB_PREFETCHER_HH__ */