summaryrefslogtreecommitdiff
path: root/src/mem/simple_dram.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2013-08-19 03:52:36 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2013-08-19 03:52:36 -0400
commitb63631536d974f31cf99ee280271dc0f7b4c746f (patch)
treeff83820d8dd75de8238e4b7ddaf3b91e4cf8374f /src/mem/simple_dram.cc
parent646c4a23ca44aab5468c896034288151c89be782 (diff)
downloadgem5-b63631536d974f31cf99ee280271dc0f7b4c746f.tar.xz
stats: Cumulative stats update
This patch updates the stats to reflect the: 1) addition of the internal queue in SimpleMemory, 2) moving of the memory class outside FSConfig, 3) fixing up of the 2D vector printing format, 4) specifying burst size and interface width for the DRAM instead of relying on cache-line size, 5) performing merging in the DRAM controller write buffer, and 6) fixing how idle cycles are counted in the atomic and timing CPU models. The main reason for bundling them up is to minimise the changeset size.
Diffstat (limited to 'src/mem/simple_dram.cc')
-rw-r--r--src/mem/simple_dram.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mem/simple_dram.cc b/src/mem/simple_dram.cc
index 033ccbb26..0deaedcf9 100644
--- a/src/mem/simple_dram.cc
+++ b/src/mem/simple_dram.cc
@@ -520,8 +520,9 @@ SimpleDRAM::addToWriteQueue(PacketPtr pkt, unsigned int pktCount)
writeBursts++;
// see if we can merge with an existing item in the write
- // queue and keep track of whether we have merged or not, as
- // there is only ever one item to merge with
+ // queue and keep track of whether we have merged or not so we
+ // can stop at that point and also avoid enqueueing a new
+ // request
bool merged = false;
auto w = writeQueue.begin();
@@ -529,6 +530,9 @@ SimpleDRAM::addToWriteQueue(PacketPtr pkt, unsigned int pktCount)
// either of the two could be first, if they are the same
// it does not matter which way we go
if ((*w)->addr >= addr) {
+ // the existing one starts after the new one, figure
+ // out where the new one ends with respect to the
+ // existing one
if ((addr + size) >= ((*w)->addr + (*w)->size)) {
// check if the existing one is completely
// subsumed in the new one
@@ -550,6 +554,9 @@ SimpleDRAM::addToWriteQueue(PacketPtr pkt, unsigned int pktCount)
(*w)->size = (*w)->addr + (*w)->size - addr;
}
} else {
+ // the new one starts after the current one, figure
+ // out where the existing one ends with respect to the
+ // new one
if (((*w)->addr + (*w)->size) >= (addr + size)) {
// check if the new one is completely subsumed in the
// existing one