Deleted Added
sdiff udiff text old ( 13772:31b71dadc472 ) new ( 13963:94555f0223ba )
full compact
1/**
2 * Copyright (c) 2018 Metempsy Technology Consulting
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;

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

38 * (pp. 178-190). ACM.
39 */
40
41#ifndef __MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__
42#define __MEM_CACHE_PREFETCH_INDIRECT_MEMORY_HH__
43
44#include <vector>
45
46#include "mem/cache/prefetch/associative_set.hh"
47#include "mem/cache/prefetch/queued.hh"
48
49struct IndirectMemoryPrefetcherParams;
50
51class IndirectMemoryPrefetcher : public QueuedPrefetcher
52{
53 /** Maximum number of prefetches generated per event */
54 const unsigned int maxPrefetchDistance;
55 /** Shift values considered */
56 const std::vector<int> shiftValues;
57 /** Counter threshold to start prefetching */
58 const unsigned int prefetchThreshold;
59 /** Maximum value of the confidence indirectCounter */
60 const unsigned int maxIndirectCounterValue;
61 /** streamCounter value to trigger the streaming prefetcher */
62 const int streamCounterThreshold;
63 /** Number of prefetches generated when using the streaming prefetcher */
64 const int streamingDistance;
65
66 /** Prefetch Table Entry */
67 struct PrefetchTableEntry : public TaggedEntry
68 {

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

81 bool enabled;
82 /** Current index value */
83 int64_t index;
84 /** BaseAddr detected */
85 Addr baseAddr;
86 /** Shift detected */
87 int shift;
88 /** Confidence counter of the indirect fields */
89 int indirectCounter;
90 /**
91 * This variable is set to indicate that there has been at least one
92 * match with the current index value. This information is later used
93 * when a new index is updated. If there were no increases in the
94 * indirectCounter, the counter is decremented.
95 */
96 bool increasedIndirectCounter;
97
98 PrefetchTableEntry() : TaggedEntry(), address(0), secure(false),
99 streamCounter(0), enabled(false), index(0), baseAddr(0), shift(0),
100 indirectCounter(0), increasedIndirectCounter(false)
101 {}
102
103 void reset() override {
104 address = 0;
105 secure = false;
106 streamCounter = 0;
107 enabled = false;
108 index = 0;
109 baseAddr = 0;
110 shift = 0;
111 indirectCounter = 0;
112 increasedIndirectCounter = false;
113 }
114 };
115 /** Prefetch table */
116 AssociativeSet<PrefetchTableEntry> prefetchTable;
117
118 /** Indirect Pattern Detector entrt */
119 struct IndirectPatternDetectorEntry : public TaggedEntry

--- 75 unchanged lines hidden ---