stride.hh (8229:78bf55f23338) stride.hh (8831:6c08a877af8f)
1/*
2 * Copyright (c) 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;

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

34 */
35
36#ifndef __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
37#define __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
38
39#include <climits>
40
41#include "mem/cache/prefetch/base.hh"
1/*
2 * Copyright (c) 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;

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

34 */
35
36#ifndef __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
37#define __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
38
39#include <climits>
40
41#include "mem/cache/prefetch/base.hh"
42#include "params/StridePrefetcher.hh"
42
43class StridePrefetcher : public BasePrefetcher
44{
45 protected:
46
47 static const int Max_Contexts = 64;
48
49 // These constants need to be changed with the type of the

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

58 Addr missAddr;
59 int stride;
60 int confidence;
61 };
62
63 Addr *lastMissAddr[Max_Contexts];
64
65 std::list<StrideEntry*> table[Max_Contexts];
43
44class StridePrefetcher : public BasePrefetcher
45{
46 protected:
47
48 static const int Max_Contexts = 64;
49
50 // These constants need to be changed with the type of the

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

59 Addr missAddr;
60 int stride;
61 int confidence;
62 };
63
64 Addr *lastMissAddr[Max_Contexts];
65
66 std::list<StrideEntry*> table[Max_Contexts];
66 Tick latency;
67 int degree;
68 bool useContextId;
69
70 public:
71
67
68 public:
69
72 StridePrefetcher(const BaseCacheParams *p)
73 : BasePrefetcher(p), latency(p->prefetch_latency),
74 degree(p->prefetch_degree), useContextId(p->prefetch_use_cpu_id)
70 StridePrefetcher(const Params *p)
71 : BasePrefetcher(p)
75 {
76 }
77
78 ~StridePrefetcher() {}
79
80 void calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
81 std::list<Tick> &delays);
82};
83
84#endif // __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__
72 {
73 }
74
75 ~StridePrefetcher() {}
76
77 void calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
78 std::list<Tick> &delays);
79};
80
81#endif // __MEM_CACHE_PREFETCH_STRIDE_PREFETCHER_HH__