#include "mem/ruby/slicc_interface/RubySlicc_ComponentMapping.hh"
#include "mem/ruby/system/RubySystem.hh"
-Prefetcher*
+RubyPrefetcher*
PrefetcherParams::create()
{
- return new Prefetcher(this);
+ return new RubyPrefetcher(this);
}
-Prefetcher::Prefetcher(const Params *p)
+RubyPrefetcher::RubyPrefetcher(const Params *p)
: SimObject(p), m_num_streams(p->num_streams),
m_array(p->num_streams), m_train_misses(p->train_misses),
m_num_startup_pfs(p->num_startup_pfs), m_num_unit_filters(p->unit_filter),
}
}
-Prefetcher::~Prefetcher()
+RubyPrefetcher::~RubyPrefetcher()
{
delete m_unit_filter_hit;
delete m_negative_filter_hit;
}
void
-Prefetcher::regStats()
+RubyPrefetcher::regStats()
{
SimObject::regStats();
}
void
-Prefetcher::observeMiss(Addr address, const RubyRequestType& type)
+RubyPrefetcher::observeMiss(Addr address, const RubyRequestType& type)
{
DPRINTF(RubyPrefetcher, "Observed miss for %#x\n", address);
Addr line_addr = makeLineAddress(address);
}
void
-Prefetcher::observePfMiss(Addr address)
+RubyPrefetcher::observePfMiss(Addr address)
{
numPartialHits++;
DPRINTF(RubyPrefetcher, "Observed partial hit for %#x\n", address);
}
void
-Prefetcher::observePfHit(Addr address)
+RubyPrefetcher::observePfHit(Addr address)
{
numHits++;
DPRINTF(RubyPrefetcher, "Observed hit for %#x\n", address);
}
void
-Prefetcher::issueNextPrefetch(Addr address, PrefetchEntry *stream)
+RubyPrefetcher::issueNextPrefetch(Addr address, PrefetchEntry *stream)
{
// get our corresponding stream fetcher
if (stream == NULL) {
}
uint32_t
-Prefetcher::getLRUindex(void)
+RubyPrefetcher::getLRUindex(void)
{
uint32_t lru_index = 0;
Cycles lru_access = m_array[lru_index].m_use_time;
}
void
-Prefetcher::clearNonunitEntry(uint32_t index)
+RubyPrefetcher::clearNonunitEntry(uint32_t index)
{
m_nonunit_filter[index] = 0;
m_nonunit_stride[index] = 0;
}
void
-Prefetcher::initializeStream(Addr address, int stride,
+RubyPrefetcher::initializeStream(Addr address, int stride,
uint32_t index, const RubyRequestType& type)
{
numAllocatedStreams++;
}
PrefetchEntry *
-Prefetcher::getPrefetchEntry(Addr address, uint32_t &index)
+RubyPrefetcher::getPrefetchEntry(Addr address, uint32_t &index)
{
// search all streams for a match
for (int i = 0; i < m_num_streams; i++) {
}
bool
-Prefetcher::accessUnitFilter(std::vector<Addr>& filter_table,
+RubyPrefetcher::accessUnitFilter(std::vector<Addr>& filter_table,
uint32_t *filter_hit, uint32_t &index, Addr address,
int stride, bool &alloc)
{
}
bool
-Prefetcher::accessNonunitFilter(Addr address, int *stride,
+RubyPrefetcher::accessNonunitFilter(Addr address, int *stride,
bool &alloc)
{
//reset the alloc flag
}
void
-Prefetcher::print(std::ostream& out) const
+RubyPrefetcher::print(std::ostream& out) const
{
out << name() << " Prefetcher State\n";
// print out unit filter
}
Addr
-Prefetcher::pageAddress(Addr addr) const
+RubyPrefetcher::pageAddress(Addr addr) const
{
return mbits<Addr>(addr, 63, m_page_shift);
}