Prefetcher.cc (9363:e2616dc035ce) Prefetcher.cc (9475:736909f5c13b)
1/*
2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
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;

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

243 // across page boundries
244 stream->m_is_valid = false;
245 return;
246 }
247 }
248
249 // launch next prefetch
250 stream->m_address = line_addr;
1/*
2 * Copyright (c) 1999-2012 Mark D. Hill and David A. Wood
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;

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

243 // across page boundries
244 stream->m_is_valid = false;
245 return;
246 }
247 }
248
249 // launch next prefetch
250 stream->m_address = line_addr;
251 stream->m_use_time = g_system_ptr->getTime();
251 stream->m_use_time = m_controller->curCycle();
252 DPRINTF(RubyPrefetcher, "Requesting prefetch for %s\n", line_addr);
253 m_controller->enqueuePrefetch(line_addr, stream->m_type);
254}
255
256uint32_t
257Prefetcher::getLRUindex(void)
258{
259 uint32_t lru_index = 0;

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

285 uint32_t index, const RubyRequestType& type)
286{
287 numAllocatedStreams++;
288
289 // initialize the stream prefetcher
290 PrefetchEntry *mystream = &(m_array[index]);
291 mystream->m_address = line_address(address);
292 mystream->m_stride = stride;
252 DPRINTF(RubyPrefetcher, "Requesting prefetch for %s\n", line_addr);
253 m_controller->enqueuePrefetch(line_addr, stream->m_type);
254}
255
256uint32_t
257Prefetcher::getLRUindex(void)
258{
259 uint32_t lru_index = 0;

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

285 uint32_t index, const RubyRequestType& type)
286{
287 numAllocatedStreams++;
288
289 // initialize the stream prefetcher
290 PrefetchEntry *mystream = &(m_array[index]);
291 mystream->m_address = line_address(address);
292 mystream->m_stride = stride;
293 mystream->m_use_time = g_system_ptr->getTime();
293 mystream->m_use_time = m_controller->curCycle();
294 mystream->m_is_valid = true;
295 mystream->m_type = type;
296
297 // create a number of initial prefetches for this stream
298 Address page_addr = page_address(mystream->m_address);
299 Address line_addr = line_address(mystream->m_address);
300 Address prev_addr = line_addr;
301

--- 168 unchanged lines hidden ---
294 mystream->m_is_valid = true;
295 mystream->m_type = type;
296
297 // create a number of initial prefetches for this stream
298 Address page_addr = page_address(mystream->m_address);
299 Address line_addr = line_address(mystream->m_address);
300 Address prev_addr = line_addr;
301

--- 168 unchanged lines hidden ---