stride.cc (5338:e75d02a09806) stride.cc (5543:3af77710f397)
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;

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

35 */
36
37#include "mem/cache/prefetch/stride.hh"
38
39void
40StridePrefetcher::calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
41 std::list<Tick> &delays)
42{
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;

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

35 */
36
37#include "mem/cache/prefetch/stride.hh"
38
39void
40StridePrefetcher::calculatePrefetch(PacketPtr &pkt, std::list<Addr> &addresses,
41 std::list<Tick> &delays)
42{
43// Addr blkAddr = pkt->paddr & ~(Addr)(this->blkSize-1);
43// Addr blkAddr = pkt->paddr & ~(Addr)(this->blkSize-1);
44 int cpuID = pkt->req->getCpuNum();
45 if (!useCPUId) cpuID = 0;
46
47 /* Scan Table for IAddr Match */
44 int cpuID = pkt->req->getCpuNum();
45 if (!useCPUId) cpuID = 0;
46
47 /* Scan Table for IAddr Match */
48/* std::list<strideEntry*>::iterator iter;
48/* std::list<strideEntry*>::iterator iter;
49 for (iter=table[cpuID].begin();
50 iter !=table[cpuID].end();
51 iter++) {
52 if ((*iter)->IAddr == pkt->pc) break;
53 }
54
55 if (iter != table[cpuID].end()) {
56 //Hit in table

--- 36 unchanged lines hidden ---
49 for (iter=table[cpuID].begin();
50 iter !=table[cpuID].end();
51 iter++) {
52 if ((*iter)->IAddr == pkt->pc) break;
53 }
54
55 if (iter != table[cpuID].end()) {
56 //Hit in table

--- 36 unchanged lines hidden ---