changeset 471d390943f0 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=471d390943f0
description:
        mem: Fix a bug in the DRAM controller arbitration

        Fix a minor issue that affects multi-rank systems.

diffstat:

 src/mem/dram_ctrl.cc |  12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 6d4da9dc90a1 -r 471d390943f0 src/mem/dram_ctrl.cc
--- a/src/mem/dram_ctrl.cc      Tue Dec 23 09:31:18 2014 -0500
+++ b/src/mem/dram_ctrl.cc      Tue Dec 23 09:31:18 2014 -0500
@@ -1477,7 +1477,13 @@
     // Offset by tRCD to correlate with ACT timing variables
     Tick min_cmd_at = busBusyUntil - tCL - tRCD;
 
-    // Prioritize same rank accesses that can issue B2B
+    // if we have multiple ranks and all
+    // waiting packets are accessing a rank which was previously active
+    // then bank_mask_same_rank will be set to a value while bank_mask will
+    // remain 0. In this case, the function should return the value of
+    // bank_mask_same_rank.
+    // else if waiting packets access a rank which was previously active and
+    // other ranks, prioritize same rank accesses that can issue B2B
     // Only optimize for same ranks when the command type
     // does not change; do not want to unnecessarily incur tWTR
     //
@@ -1485,8 +1491,8 @@
     // 1) Commands that access the same rank as previous burst
     //    and can prep the bank seamlessly.
     // 2) Commands (any rank) with earliest bank prep
-    if (!switched_cmd_type && same_rank_match &&
-        min_act_at_same_rank <= min_cmd_at) {
+    if ((bank_mask == 0) || (!switched_cmd_type && same_rank_match &&
+        min_act_at_same_rank <= min_cmd_at)) {
         bank_mask = bank_mask_same_rank;
     }
 
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to