base.cc (10318:98771a936b61) base.cc (10360:919c02740209)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

52#include "config/the_isa.hh"
53#include "debug/HWPrefetch.hh"
54#include "mem/cache/prefetch/base.hh"
55#include "mem/cache/base.hh"
56#include "mem/request.hh"
57#include "sim/system.hh"
58
59BasePrefetcher::BasePrefetcher(const Params *p)
1/*
2 * Copyright (c) 2013 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

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

52#include "config/the_isa.hh"
53#include "debug/HWPrefetch.hh"
54#include "mem/cache/prefetch/base.hh"
55#include "mem/cache/base.hh"
56#include "mem/request.hh"
57#include "sim/system.hh"
58
59BasePrefetcher::BasePrefetcher(const Params *p)
60 : ClockedObject(p), size(p->size), latency(p->latency), degree(p->degree),
60 : ClockedObject(p), size(p->size), cache(nullptr), blkSize(0),
61 latency(p->latency), degree(p->degree),
61 useMasterId(p->use_master_id), pageStop(!p->cross_pages),
62 serialSquash(p->serial_squash), onlyData(p->data_accesses_only),
63 onMissOnly(p->on_miss_only), onReadOnly(p->on_read_only),
64 onPrefetch(p->on_prefetch), system(p->sys),
65 masterId(system->getMasterId(name()))
66{
67}
68
69void
70BasePrefetcher::setCache(BaseCache *_cache)
71{
62 useMasterId(p->use_master_id), pageStop(!p->cross_pages),
63 serialSquash(p->serial_squash), onlyData(p->data_accesses_only),
64 onMissOnly(p->on_miss_only), onReadOnly(p->on_read_only),
65 onPrefetch(p->on_prefetch), system(p->sys),
66 masterId(system->getMasterId(name()))
67{
68}
69
70void
71BasePrefetcher::setCache(BaseCache *_cache)
72{
73 assert(!cache);
72 cache = _cache;
73 blkSize = cache->getBlockSize();
74}
75
76void
77BasePrefetcher::regStats()
78{
79 pfIdentified

--- 239 unchanged lines hidden ---
74 cache = _cache;
75 blkSize = cache->getBlockSize();
76}
77
78void
79BasePrefetcher::regStats()
80{
81 pfIdentified

--- 239 unchanged lines hidden ---