mem-cache: Add switch on/off duplicate entries into RMOB
Change-Id: I394d7c852a439be5315c4755b091c8741e671ea3 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/55083 Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Maintainer: Daniel Carvalho <odanrc@yahoo.com.br> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Huang Jiasen
parent
66e6e59666
commit
ec32f6c6f0
2
src/mem/cache/prefetch/Prefetcher.py
vendored
2
src/mem/cache/prefetch/Prefetcher.py
vendored
@@ -488,6 +488,8 @@ class STeMSPrefetcher(QueuedPrefetcher):
|
||||
|
||||
region_miss_order_buffer_entries = Param.Unsigned(131072,
|
||||
"Number of entries of the Region Miss Order Buffer")
|
||||
add_duplicate_entries_to_rmob = Param.Bool(True,
|
||||
"Add duplicate entries to RMOB")
|
||||
reconstruction_entries = Param.Unsigned(256,
|
||||
"Number of reconstruction entries")
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ STeMS::STeMS(const STeMSPrefetcherParams &p)
|
||||
ActiveGenerationTableEntry(
|
||||
spatialRegionSize / blkSize)),
|
||||
rmob(p.region_miss_order_buffer_entries),
|
||||
addDuplicateEntriesToRMOB(p.add_duplicate_entries_to_rmob),
|
||||
lastTriggerCounter(0)
|
||||
{
|
||||
fatal_if(!isPowerOf2(spatialRegionSize),
|
||||
@@ -120,6 +121,16 @@ STeMS::addToRMOB(Addr sr_addr, Addr pst_addr, unsigned int delta)
|
||||
rmob_entry.pstAddress = pst_addr;
|
||||
rmob_entry.delta = delta;
|
||||
|
||||
if (!addDuplicateEntriesToRMOB) {
|
||||
for (const auto& entry : rmob) {
|
||||
if (entry.srAddress == sr_addr &&
|
||||
entry.pstAddress == pst_addr &&
|
||||
entry.delta == delta) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
rmob.push_back(rmob_entry);
|
||||
}
|
||||
|
||||
|
||||
@@ -175,6 +175,9 @@ class STeMS : public Queued
|
||||
/** Region Miss Order Buffer (RMOB) */
|
||||
CircularQueue<RegionMissOrderBufferEntry> rmob;
|
||||
|
||||
/** Add duplicate entries to RMOB */
|
||||
bool addDuplicateEntriesToRMOB;
|
||||
|
||||
/** Counter to keep the count of accesses between trigger accesses */
|
||||
unsigned int lastTriggerCounter;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user