From b4ce51eb9ecfb053e2aacbabba318a41890f436e Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Mon, 30 Jun 2014 13:56:02 -0400 Subject: mem: Add bank and rank indices as fields to the DRAM bank This patch adds the index of the bank and rank as a field so that we can determine the identity of a given bank (reference or pointer) for the power tracing. We also grab the opportunity of cleaning up the arguments used for identifying the bank when activating. --- src/mem/dram_ctrl.hh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/mem/dram_ctrl.hh') diff --git a/src/mem/dram_ctrl.hh b/src/mem/dram_ctrl.hh index c8104a49d..aee2635b4 100644 --- a/src/mem/dram_ctrl.hh +++ b/src/mem/dram_ctrl.hh @@ -154,6 +154,8 @@ class DRAMCtrl : public AbstractMemory static const uint32_t NO_ROW = -1; uint32_t openRow; + uint8_t rank; + uint8_t bank; Tick colAllowedAt; Tick preAllowedAt; @@ -163,7 +165,8 @@ class DRAMCtrl : public AbstractMemory uint32_t bytesAccessed; Bank() : - openRow(NO_ROW), colAllowedAt(0), preAllowedAt(0), actAllowedAt(0), + openRow(NO_ROW), rank(0), bank(0), + colAllowedAt(0), preAllowedAt(0), actAllowedAt(0), rowAccesses(0), bytesAccessed(0) { } }; @@ -387,14 +390,11 @@ class DRAMCtrl : public AbstractMemory * method updates the time that the banks become available based * on the current limits. * + * @param bank Reference to the bank * @param act_tick Time when the activation takes place - * @param rank Index of the rank - * @param bank Index of the bank * @param row Index of the row - * @param bank_ref Reference to the bank */ - void activateBank(Tick act_tick, uint8_t rank, uint8_t bank, - uint32_t row, Bank& bank_ref); + void activateBank(Bank& bank, Tick act_tick, uint32_t row); /** * Precharge a given bank and also update when the precharge is -- cgit v1.2.3