* GHB Prefetcher implementation.
*/
+#include "base/trace.hh"
#include "mem/cache/prefetch/ghb.hh"
-#include "arch/isa_traits.hh"
void
GHBPrefetcher::calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
std::list<Tick> &delays)
{
+ if (useContextId && !pkt->req->hasContextId()) {
+ DPRINTF(HWPrefetch, "ignoring request with no context ID");
+ return;
+ }
+
Addr blk_addr = pkt->getAddr() & ~(Addr)(blkSize-1);
int ctx_id = useContextId ? pkt->req->contextId() : 0;
assert(ctx_id < Max_Contexts);
return;
}
+ if (useContextId && !pkt->req->hasContextId()) {
+ DPRINTF(HWPrefetch, "ignoring request with no context ID");
+ return;
+ }
+
Addr blk_addr = pkt->getAddr() & ~(Addr)(blkSize-1);
int ctx_id = useContextId ? pkt->req->contextId() : 0;
Addr pc = pkt->req->getPC();
flags.set(VALID_EXTRA_DATA);
}
+ bool
+ hasContextId() const
+ {
+ return flags.isSet(VALID_CONTEXT_ID);
+ }
+
/** Accessor function for context ID.*/
int
contextId() const
return _threadId;
}
- /** Accessor function for pc.*/
bool
hasPC() const
{
return flags.isSet(VALID_PC);
}
+ /** Accessor function for pc.*/
Addr
getPC() const
{