tagged.cc (5338:e75d02a09806) tagged.cc (5875:d82be3235ab4)
1/*
2 * Copyright (c) 2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

42{
43}
44
45void
46TaggedPrefetcher::
47calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
48 std::list<Tick> &delays)
49{
1/*
2 * Copyright (c) 2005 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

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

42{
43}
44
45void
46TaggedPrefetcher::
47calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
48 std::list<Tick> &delays)
49{
50 Addr blkAddr = pkt->getAddr() & ~(Addr)(this->blkSize-1);
50 Addr blkAddr = pkt->getAddr() & ~(Addr)(blkSize-1);
51
51
52 for (int d=1; d <= degree; d++) {
53 Addr newAddr = blkAddr + d*(this->blkSize);
54 if (this->pageStop &&
55 (blkAddr & ~(TheISA::VMPageSize - 1)) !=
56 (newAddr & ~(TheISA::VMPageSize - 1)))
57 {
58 //Spanned the page, so now stop
59 this->pfSpanPage += degree - d + 1;
52 for (int d = 1; d <= degree; d++) {
53 Addr newAddr = blkAddr + d*(blkSize);
54 if (pageStop && !samePage(blkAddr, newAddr)) {
55 // Spanned the page, so now stop
56 pfSpanPage += degree - d + 1;
60 return;
57 return;
61 }
62 else
63 {
58 } else {
64 addresses.push_back(newAddr);
65 delays.push_back(latency);
66 }
67 }
68}
69
70
59 addresses.push_back(newAddr);
60 delays.push_back(latency);
61 }
62 }
63}
64
65