Prefetcher.hh (10301:44839e8febbd) Prefetcher.hh (10466:73b7549d979e)
1/*
2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
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;

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

36#include "base/statistics.hh"
37#include "mem/ruby/common/Address.hh"
38#include "mem/ruby/network/MessageBuffer.hh"
39#include "mem/ruby/slicc_interface/AbstractController.hh"
40#include "mem/ruby/slicc_interface/RubyRequest.hh"
41#include "mem/ruby/system/System.hh"
42#include "params/Prefetcher.hh"
43#include "sim/sim_object.hh"
1/*
2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
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;

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

36#include "base/statistics.hh"
37#include "mem/ruby/common/Address.hh"
38#include "mem/ruby/network/MessageBuffer.hh"
39#include "mem/ruby/slicc_interface/AbstractController.hh"
40#include "mem/ruby/slicc_interface/RubyRequest.hh"
41#include "mem/ruby/system/System.hh"
42#include "params/Prefetcher.hh"
43#include "sim/sim_object.hh"
44#include "sim/system.hh"
44
45#define MAX_PF_INFLIGHT 8
46
47class PrefetchEntry
48{
49 public:
50 /// constructor
51 PrefetchEntry()

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

134 bool accessUnitFilter(std::vector<Address>& filter_table,
135 uint32_t *hit_table, uint32_t &index, const Address &address,
136 int stride, bool &alloc);
137
138 /// access a unit stride filter to determine if there is a hit
139 bool accessNonunitFilter(const Address& address, int *stride,
140 bool &alloc);
141
45
46#define MAX_PF_INFLIGHT 8
47
48class PrefetchEntry
49{
50 public:
51 /// constructor
52 PrefetchEntry()

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

135 bool accessUnitFilter(std::vector<Address>& filter_table,
136 uint32_t *hit_table, uint32_t &index, const Address &address,
137 int stride, bool &alloc);
138
139 /// access a unit stride filter to determine if there is a hit
140 bool accessNonunitFilter(const Address& address, int *stride,
141 bool &alloc);
142
143 /// determine the page aligned address
144 Address pageAddress(const Address& addr) const;
145
142 //! number of prefetch streams available
143 uint32_t m_num_streams;
144 //! an array of the active prefetch streams
145 std::vector<PrefetchEntry> m_array;
146
147 //! number of misses I must see before allocating a stream
148 uint32_t m_train_misses;
149 //! number of initial prefetches to startup a stream

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

182 /// a round robin pointer into the unit filter group
183 uint32_t m_nonunit_index;
184
185 /// Used for allowing prefetches across pages.
186 bool m_prefetch_cross_pages;
187
188 AbstractController *m_controller;
189
146 //! number of prefetch streams available
147 uint32_t m_num_streams;
148 //! an array of the active prefetch streams
149 std::vector<PrefetchEntry> m_array;
150
151 //! number of misses I must see before allocating a stream
152 uint32_t m_train_misses;
153 //! number of initial prefetches to startup a stream

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

186 /// a round robin pointer into the unit filter group
187 uint32_t m_nonunit_index;
188
189 /// Used for allowing prefetches across pages.
190 bool m_prefetch_cross_pages;
191
192 AbstractController *m_controller;
193
194 const Addr m_page_shift;
195
190 //! Count of accesses to the prefetcher
191 Stats::Scalar numMissObserved;
192 //! Count of prefetch streams allocated
193 Stats::Scalar numAllocatedStreams;
194 //! Count of prefetch requests made
195 Stats::Scalar numPrefetchRequested;
196 //! Count of prefetch requests accepted
197 Stats::Scalar numPrefetchAccepted;

--- 13 unchanged lines hidden ---
196 //! Count of accesses to the prefetcher
197 Stats::Scalar numMissObserved;
198 //! Count of prefetch streams allocated
199 Stats::Scalar numAllocatedStreams;
200 //! Count of prefetch requests made
201 Stats::Scalar numPrefetchRequested;
202 //! Count of prefetch requests accepted
203 Stats::Scalar numPrefetchAccepted;

--- 13 unchanged lines hidden ---