63c63,65
< system(p->sys), masterId(system->getMasterId(name()))
---
> onMissOnly(p->on_miss_only), onReadOnly(p->on_read_only),
> onPrefetch(p->on_prefetch), system(p->sys),
> masterId(system->getMasterId(name()))
188c190,197
< if (!pkt->req->isUncacheable() && !(pkt->req->isInstFetch() && onlyData)) {
---
> // Don't consult the prefetcher if any of the following conditons are true
> // 1) The request is uncacheable
> // 2) The request is a fetch, but we are only prefeching data
> // 3) The request is a cache hit, but we are only training on misses
> // 4) THe request is a write, but we are only training on reads
> if (!pkt->req->isUncacheable() && !(pkt->req->isInstFetch() && onlyData) &&
> !(onMissOnly && inCache(pkt->getAddr(), true)) &&
> !(onReadOnly && !pkt->isRead())) {
264a274,278
> // Tag orefetch reqeuests with corresponding PC to train lower
> // cache-level prefetchers
> if (onPrefetch && pkt->req->hasPC())
> prefetch->req->setPC(pkt->req->getPC());
>