summaryrefslogtreecommitdiff
path: root/src/mem/simple_dram.hh
diff options
context:
space:
mode:
authorNeha Agarwal <neha.agarwal@arm.com>2013-11-01 11:56:28 -0400
committerNeha Agarwal <neha.agarwal@arm.com>2013-11-01 11:56:28 -0400
commit5c486908d7979e4be832700ddeadb43c172c84e1 (patch)
tree7d5e87efe0c653a4388c4c15e48e37ed5d4084ec /src/mem/simple_dram.hh
parent77fce1ce0e1db502b47ea72c4243c929666d04fa (diff)
downloadgem5-5c486908d7979e4be832700ddeadb43c172c84e1.tar.xz
mem: Adding stats for DRAM power calculation
This patch adds stats which are used for offline power calculation from the 'Micron Power Calculator' spreadsheet.
Diffstat (limited to 'src/mem/simple_dram.hh')
-rw-r--r--src/mem/simple_dram.hh15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/mem/simple_dram.hh b/src/mem/simple_dram.hh
index 535e3a8c5..175c415d6 100644
--- a/src/mem/simple_dram.hh
+++ b/src/mem/simple_dram.hh
@@ -544,7 +544,8 @@ class SimpleDRAM : public AbstractMemory
Stats::Scalar writeReqs;
Stats::Scalar readBursts;
Stats::Scalar writeBursts;
- Stats::Scalar bytesRead;
+ Stats::Scalar bytesReadDRAM;
+ Stats::Scalar bytesReadWrQ;
Stats::Scalar bytesWritten;
Stats::Scalar bytesConsumedRd;
Stats::Scalar bytesConsumedWr;
@@ -580,6 +581,8 @@ class SimpleDRAM : public AbstractMemory
Stats::Formula avgConsumedWrBW;
Stats::Formula peakBW;
Stats::Formula busUtil;
+ Stats::Formula busUtilRead;
+ Stats::Formula busUtilWrite;
// Average queue lengths
Stats::Average avgRdQLen;
@@ -592,6 +595,16 @@ class SimpleDRAM : public AbstractMemory
Stats::Formula writeRowHitRate;
Stats::Formula avgGap;
+ // DRAM Power Calculation
+ Stats::Formula pageHitRate;
+ Stats::Formula prechargeAllPercent;
+ Stats::Scalar prechargeAllTime;
+
+ // To track number of cycles all the banks are precharged
+ Tick startTickPrechargeAll;
+ // To track number of banks which are currently active
+ unsigned int numBanksActive;
+
/** @todo this is a temporary workaround until the 4-phase code is
* committed. upstream caches needs this packet until true is returned, so
* hold onto it for deletion until a subsequent call