changeset d28825cebfcc in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=d28825cebfcc
description:
        mem: Align cache timing to clock edges

        This patch changes the cache timing calculations such that the results
        are aligned to clock edges.

        Plenty stats change as a results of this patch.

diffstat:

 src/mem/cache/cache_impl.hh |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (47 lines):

diff -r 8d327ffdba62 -r d28825cebfcc src/mem/cache/cache_impl.hh
--- a/src/mem/cache/cache_impl.hh       Thu Jun 27 05:49:49 2013 -0400
+++ b/src/mem/cache/cache_impl.hh       Thu Jun 27 05:49:49 2013 -0400
@@ -929,7 +929,7 @@
                 // responseLatency is the latency of the return path
                 // from lower level caches/memory to an upper level cache or
                 // the core.
-                completion_time = curTick() + responseLatency * clockPeriod() +
+                completion_time = clockEdge(responseLatency) +
                     (transfer_offset ? pkt->busLastWordDelay :
                      pkt->busFirstWordDelay);
 
@@ -946,14 +946,14 @@
                 // responseLatency is the latency of the return path
                 // from lower level caches/memory to an upper level cache or
                 // the core.
-                completion_time = curTick() + responseLatency * clockPeriod() +
+                completion_time = clockEdge(responseLatency) +
                     pkt->busLastWordDelay;
                 target->pkt->req->setExtraData(0);
             } else {
                 // not a cache fill, just forwarding response
                 // responseLatency is the latency of the return path
                 // from lower level cahces/memory to the core.
-                completion_time = curTick() + responseLatency * clockPeriod() +
+                completion_time = clockEdge(responseLatency) +
                     pkt->busLastWordDelay;
                 if (pkt->isRead() && !is_error) {
                     target->pkt->setData(pkt->getPtr<uint8_t>());
@@ -1021,7 +1021,7 @@
         }
         mq = mshr->queue;
         mq->markPending(mshr);
-        requestMemSideBus((RequestCause)mq->index, curTick() +
+        requestMemSideBus((RequestCause)mq->index, clockEdge() +
                           pkt->busLastWordDelay);
     } else {
         mq->deallocate(mshr);
@@ -1257,7 +1257,7 @@
         std::memcpy(blk->data, pkt->getPtr<uint8_t>(), blkSize);
     }
 
-    blk->whenReady = curTick() + responseLatency * clockPeriod() +
+    blk->whenReady = clockEdge() + responseLatency * clockPeriod() +
         pkt->busLastWordDelay;
 
     return blk;
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to