From b63631536d974f31cf99ee280271dc0f7b4c746f Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 19 Aug 2013 03:52:36 -0400 Subject: 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. --- src/mem/simple_dram.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/mem') 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 -- cgit v1.2.3