Arthur Perais has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/46479 )

Change subject: mem: Fix bandwidth-delay calculation in AMPM prefetcher
......................................................................

mem: Fix bandwidth-delay calculation in AMPM prefetcher

The AMPM paper (https://www.jilp.org/vol13/v13paper3.pdf) defines
the bandwidth-delay calculation as :

  Mbandwidth= (Nrequests/Tepoch)×Tlatency

In the code, Tepoch and Tlatency are in ticks (which is okay),
but Tepoch is converted from Cycles (256K) to Ticks using the
clockEdge(Cycle c) function, which is incorrect as it yields currentTick
+ c * clockPeriod() instead of just c * clockPeriod().
In other words, the divider keeps increasing as time advances.

This patch substitutes clockEdge() with cyclesToTicks() to keep
the epoch length (Tepoch) constant throughout simulation.

Change-Id: I69dee29892fa4b9eb8de8715fd72a535e122687f
---
M src/mem/cache/prefetch/access_map_pattern_matching.cc
1 file changed, 1 insertion(+), 1 deletion(-)



diff --git a/src/mem/cache/prefetch/access_map_pattern_matching.cc b/src/mem/cache/prefetch/access_map_pattern_matching.cc
index 6a632e0..89418a0 100644
--- a/src/mem/cache/prefetch/access_map_pattern_matching.cc
+++ b/src/mem/cache/prefetch/access_map_pattern_matching.cc
@@ -80,7 +80,7 @@
     double num_requests = (double) (numRawCacheMisses - numGoodPrefetches +
         numTotalPrefetches);
     double memory_bandwidth = num_requests * offChipMemoryLatency /
-        clockEdge(epochCycles);
+        cyclesToTicks(epochCycles);

     if (prefetch_coverage > highCoverageThreshold &&
         (prefetch_accuracy > highAccuracyThreshold ||

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/46479
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I69dee29892fa4b9eb8de8715fd72a535e122687f
Gerrit-Change-Number: 46479
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Perais <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to