changeset 285458078a09 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=285458078a09
description:
mem: Cycles converted to Ticks in atomic cache accesses
This patch fixes an outstanding issue in the cache timing calculations
where an atomic access returned a time in Cycles, but the port
forwarded it on as if it was in Ticks.
A separate patch will update the regression stats.
diffstat:
src/mem/cache/cache.hh | 10 +++++-----
src/mem/cache/cache_impl.hh | 16 ++++++----------
2 files changed, 11 insertions(+), 15 deletions(-)
diffs (98 lines):
diff -r 2bddf82f610b -r 285458078a09 src/mem/cache/cache.hh
--- a/src/mem/cache/cache.hh Thu Jun 27 05:49:49 2013 -0400
+++ b/src/mem/cache/cache.hh Thu Jun 27 05:49:49 2013 -0400
@@ -263,17 +263,17 @@
/**
* Performs the access specified by the request.
* @param pkt The request to perform.
- * @return The number of cycles required for the access.
+ * @return The number of ticks required for the access.
*/
- Cycles recvAtomic(PacketPtr pkt);
+ Tick recvAtomic(PacketPtr pkt);
/**
* Snoop for the provided request in the cache and return the estimated
- * time of completion.
+ * time taken.
* @param pkt The memory request to snoop
- * @return The number of cycles required for the snoop.
+ * @return The number of ticks required for the snoop.
*/
- Cycles recvAtomicSnoop(PacketPtr pkt);
+ Tick recvAtomicSnoop(PacketPtr pkt);
/**
* Performs the access specified by the request.
diff -r 2bddf82f610b -r 285458078a09 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
@@ -644,7 +644,7 @@
template<class TagStore>
-Cycles
+Tick
Cache<TagStore>::recvAtomic(PacketPtr pkt)
{
Cycles lat = hitLatency;
@@ -678,7 +678,7 @@
pkt->cmdString(), pkt->getAddr());
}
- return lat;
+ return lat * clockPeriod();
}
// should assert here that there are no outstanding MSHRs or
@@ -763,7 +763,7 @@
pkt->makeAtomicResponse();
}
- return lat;
+ return lat * clockPeriod();
}
@@ -1510,7 +1510,7 @@
}
template<class TagStore>
-Cycles
+Tick
Cache<TagStore>::recvAtomicSnoop(PacketPtr pkt)
{
// Snoops shouldn't happen when bypassing caches
@@ -1519,12 +1519,12 @@
if (pkt->req->isUncacheable() || pkt->cmd == MemCmd::Writeback) {
// Can't get a hit on an uncacheable address
// Revisit this for multi level coherence
- return hitLatency;
+ return 0;
}
BlkType *blk = tags->findBlock(pkt->getAddr());
handleSnoop(pkt, blk, false, false, false);
- return hitLatency;
+ return hitLatency * clockPeriod();
}
@@ -1777,8 +1777,6 @@
Tick
Cache<TagStore>::CpuSidePort::recvAtomic(PacketPtr pkt)
{
- // @todo: Note that this is currently using cycles instead of
- // ticks and will be fixed in a future patch
return cache->recvAtomic(pkt);
}
@@ -1825,8 +1823,6 @@
Tick
Cache<TagStore>::MemSidePort::recvAtomicSnoop(PacketPtr pkt)
{
- // @todo: Note that this is using cycles and not ticks and will be
- // fixed in a future patch
return cache->recvAtomicSnoop(pkt);
}
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev