base.cc (10360:919c02740209) | base.cc (10466:73b7549d979e) |
---|---|
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 --- 33 unchanged lines hidden (view full) --- 42 43/** 44 * @file 45 * Hardware Prefetcher Definition. 46 */ 47 48#include <list> 49 | 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 --- 33 unchanged lines hidden (view full) --- 42 43/** 44 * @file 45 * Hardware Prefetcher Definition. 46 */ 47 48#include <list> 49 |
50#include "arch/isa_traits.hh" | |
51#include "base/trace.hh" | 50#include "base/trace.hh" |
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), cache(nullptr), blkSize(0), 61 latency(p->latency), degree(p->degree), 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), | 51#include "debug/HWPrefetch.hh" 52#include "mem/cache/prefetch/base.hh" 53#include "mem/cache/base.hh" 54#include "mem/request.hh" 55#include "sim/system.hh" 56 57BasePrefetcher::BasePrefetcher(const Params *p) 58 : ClockedObject(p), size(p->size), cache(nullptr), blkSize(0), 59 latency(p->latency), degree(p->degree), 60 useMasterId(p->use_master_id), pageStop(!p->cross_pages), 61 serialSquash(p->serial_squash), onlyData(p->data_accesses_only), 62 onMissOnly(p->on_miss_only), onReadOnly(p->on_read_only), 63 onPrefetch(p->on_prefetch), system(p->sys), |
66 masterId(system->getMasterId(name())) | 64 masterId(system->getMasterId(name())), 65 pageBytes(system->getPageBytes()) |
67{ 68} 69 70void 71BasePrefetcher::setCache(BaseCache *_cache) 72{ 73 assert(!cache); 74 cache = _cache; --- 232 unchanged lines hidden (view full) --- 307 (*iter).pkt->isSecure() == is_secure) { 308 return iter; 309 } 310 } 311 return pf.end(); 312} 313 314bool | 66{ 67} 68 69void 70BasePrefetcher::setCache(BaseCache *_cache) 71{ 72 assert(!cache); 73 cache = _cache; --- 232 unchanged lines hidden (view full) --- 306 (*iter).pkt->isSecure() == is_secure) { 307 return iter; 308 } 309 } 310 return pf.end(); 311} 312 313bool |
315BasePrefetcher::samePage(Addr a, Addr b) | 314BasePrefetcher::samePage(Addr a, Addr b) const |
316{ | 315{ |
317 return roundDown(a, TheISA::PageBytes) == roundDown(b, TheISA::PageBytes); | 316 return roundDown(a, pageBytes) == roundDown(b, pageBytes); |
318} 319 320 | 317} 318 319 |