fa_lru.cc (2991:60cd98c72fd9) fa_lru.cc (3349:fec4a86fa212)
1/*
2 * Copyright (c) 2003-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;

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

198 }
199
200 lat = hitLatency;
201 //assert(check());
202 return blk;
203}
204
205FALRUBlk*
1/*
2 * Copyright (c) 2003-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;

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

198 }
199
200 lat = hitLatency;
201 //assert(check());
202 return blk;
203}
204
205FALRUBlk*
206FALRU::findBlock(Packet * &pkt, int &lat, int *inCache)
206FALRU::findBlock(PacketPtr &pkt, int &lat, int *inCache)
207{
208 Addr addr = pkt->getAddr();
209
210 accesses++;
211 int tmp_in_cache = 0;
212 Addr blkAddr = blkAlign(addr);
213 FALRUBlk* blk = hashLookup(blkAddr);
214

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

251 assert(blk->tag == blkAddr);
252 } else {
253 blk = NULL;
254 }
255 return blk;
256}
257
258FALRUBlk*
207{
208 Addr addr = pkt->getAddr();
209
210 accesses++;
211 int tmp_in_cache = 0;
212 Addr blkAddr = blkAlign(addr);
213 FALRUBlk* blk = hashLookup(blkAddr);
214

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

251 assert(blk->tag == blkAddr);
252 } else {
253 blk = NULL;
254 }
255 return blk;
256}
257
258FALRUBlk*
259FALRU::findReplacement(Packet * &pkt, PacketList &writebacks,
259FALRU::findReplacement(PacketPtr &pkt, PacketList &writebacks,
260 BlkList &compress_blocks)
261{
262 FALRUBlk * blk = tail;
263 assert(blk->inCache == 0);
264 moveToHead(blk);
265 tagHash.erase(blk->tag);
266 tagHash[blkAlign(pkt->getAddr())] = blk;
267 if (blk->isValid()) {

--- 67 unchanged lines hidden ---
260 BlkList &compress_blocks)
261{
262 FALRUBlk * blk = tail;
263 assert(blk->inCache == 0);
264 moveToHead(blk);
265 tagHash.erase(blk->tag);
266 tagHash[blkAlign(pkt->getAddr())] = blk;
267 if (blk->isValid()) {

--- 67 unchanged lines hidden ---