projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516e604
)
mem: Change prefetcher to use random_mt
author
Mitch Hayenga
<mitch.hayenga@arm.com>
Tue, 23 Dec 2014 14:31:19 +0000
(09:31 -0500)
committer
Mitch Hayenga
<mitch.hayenga@arm.com>
Tue, 23 Dec 2014 14:31:19 +0000
(09:31 -0500)
Prefechers has used rand() to generate random numers previously.
src/mem/cache/prefetch/stride.cc
patch
|
blob
|
history
diff --git
a/src/mem/cache/prefetch/stride.cc
b/src/mem/cache/prefetch/stride.cc
index 3ff7acda0882a6ba0d20df72de910dfb92890f5a..74c84b94ff2f9d36cacc17d864013e715c993d5c 100644
(file)
--- a/
src/mem/cache/prefetch/stride.cc
+++ b/
src/mem/cache/prefetch/stride.cc
@@
-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
@@
StridePrefetcher::pcTableVictim(Addr pc, int master_id)
{
// Rand replacement for now
int set = pcHash(pc);
- int way = rand
() % pcTableAssoc
;
+ int way = rand
om_mt.random<int>(0, pcTableAssoc - 1)
;
DPRINTF(HWPrefetch, "Victimizing lookup table[%d][%d].\n", set, way);
return &pcTable[master_id][set][way];