diff -r 561f93a19c83 -r dc5eae9ec5a2 src/mem/cache/prefetch/stride.cc --- a/src/mem/cache/prefetch/stride.cc Fri Dec 12 17:57:32 2014 +0000 +++ b/src/mem/cache/prefetch/stride.cc Fri Dec 12 17:58:40 2014 +0000 @@ -46,6 +46,7 @@ * Stride Prefetcher template instantiations. */ +#include "base/random.hh" #include "debug/HWPrefetch.hh" #include "mem/cache/prefetch/stride.hh" @@ -176,7 +177,7 @@ { // Rand replacement for now int set = pcHash(pc); - int way = rand() % pcTableAssoc; + int way = random_mt.random(0, pcTableAssoc - 1); DPRINTF(HWPrefetch, "Victimizing lookup table[%d][%d].\n", set, way); return &pcTable[master_id][set][way];