// Block align prefetch address
addr_prio.first = blockAddress(addr_prio.first);
- PrefetchInfo new_pfi(pfi,addr_prio.first);
+ if (samePage(pfi.getAddr(), addr_prio.first)) {
+ PrefetchInfo new_pfi(pfi,addr_prio.first);
- pfIdentified++;
- DPRINTF(HWPrefetch, "Found a pf candidate addr: %#x, "
- "inserting into prefetch queue.\n", new_pfi.getAddr());
+ pfIdentified++;
+ DPRINTF(HWPrefetch, "Found a pf candidate addr: %#x, "
+ "inserting into prefetch queue.\n", new_pfi.getAddr());
- // Create and insert the request
- insert(pkt, new_pfi, addr_prio.second);
+ // Create and insert the request
+ insert(pkt, new_pfi, addr_prio.second);
+ } else {
+ // Record the number of page crossing prefetches generate
+ pfSpanPage += 1;
+ DPRINTF(HWPrefetch, "Ignoring page crossing prefetch.\n");
+ }
}
}
}
Addr new_addr = pf_addr + d * prefetch_stride;
- if (samePage(pf_addr, new_addr)) {
- DPRINTF(HWPrefetch, "Queuing prefetch to %#x.\n", new_addr);
- addresses.push_back(AddrPriority(new_addr, 0));
- } else {
- // Record the number of page crossing prefetches generated
- pfSpanPage += degree - d + 1;
- DPRINTF(HWPrefetch, "Ignoring page crossing prefetch.\n");
- return;
- }
+ addresses.push_back(AddrPriority(new_addr, 0));
}
} else {
// Miss in table
for (int d = 1; d <= degree; d++) {
Addr newAddr = blkAddr + d*(blkSize);
- if (!samePage(blkAddr, newAddr)) {
- // Count number of unissued prefetches due to page crossing
- pfSpanPage += degree - d + 1;
- return;
- } else {
- addresses.push_back(AddrPriority(newAddr,0));
- }
+ addresses.push_back(AddrPriority(newAddr,0));
}
}