summaryrefslogtreecommitdiff
path: root/src/mem/dram_ctrl.hh
diff options
context:
space:
mode:
authorWendy Elsasser <wendy.elsasser@arm.com>2015-07-03 10:14:46 -0400
committerWendy Elsasser <wendy.elsasser@arm.com>2015-07-03 10:14:46 -0400
commit31f901b69dd2cdc6b6bafa11cfb0af477de57607 (patch)
tree2b83f9b29ca3aaf81cb671ce6af58e984b9b19e5 /src/mem/dram_ctrl.hh
parentb56167b68214581857ffae5c25f7945d75cee6b3 (diff)
downloadgem5-31f901b69dd2cdc6b6bafa11cfb0af477de57607.tar.xz
mem: Update DRAM command scheduler for bank groups
This patch updates the command arbitration so that bank group timing as well as rank-to-rank delays will be taken into account. The resulting arbitration no longer selects commands (prepped or not) that cannot issue seamlessly if there are commands that can issue back-to-back, minimizing the effect of rank-to-rank (tCS) & same bank group (tCCD_L) delays. The arbitration selects a new command based on the following priority. Within each priority band, the arbitration will use FCFS to select the appropriate command: 1) Bank is prepped and burst can issue seamlessly, without a bubble 2) Bank is not prepped, but can prep and issue seamlessly, without a bubble 3) Bank is prepped but burst cannot issue seamlessly. In this case, a bubble will occur on the bus Thus, to enable more parallelism in subsequent selections, an unprepped packet is given higher priority if the bank prep can be hidden. If the bank prep cannot be hidden, the selection logic will choose a prepped packet that cannot issue seamlessly if one exist. Otherwise, the default selection will choose the packet with the minimum bank prep delay.
Diffstat (limited to 'src/mem/dram_ctrl.hh')
-rw-r--r--src/mem/dram_ctrl.hh19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/mem/dram_ctrl.hh b/src/mem/dram_ctrl.hh
index 57731f5e0..1ea04fa56 100644
--- a/src/mem/dram_ctrl.hh
+++ b/src/mem/dram_ctrl.hh
@@ -574,24 +574,22 @@ class DRAMCtrl : public AbstractMemory
* controller is switching command type.
*
* @param queue Queued requests to consider
- * @param switched_cmd_type Command type is changing
+ * @param extra_col_delay Any extra delay due to a read/write switch
* @return true if a packet is scheduled to a rank which is available else
* false
*/
- bool chooseNext(std::deque<DRAMPacket*>& queue, bool switched_cmd_type);
+ bool chooseNext(std::deque<DRAMPacket*>& queue, Tick extra_col_delay);
/**
* For FR-FCFS policy reorder the read/write queue depending on row buffer
- * hits and earliest banks available in DRAM
- * Prioritizes accesses to the same rank as previous burst unless
- * controller is switching command type.
+ * hits and earliest bursts available in DRAM
*
* @param queue Queued requests to consider
- * @param switched_cmd_type Command type is changing
+ * @param extra_col_delay Any extra delay due to a read/write switch
* @return true if a packet is scheduled to a rank which is available else
* false
*/
- bool reorderQueue(std::deque<DRAMPacket*>& queue, bool switched_cmd_type);
+ bool reorderQueue(std::deque<DRAMPacket*>& queue, Tick extra_col_delay);
/**
* Find which are the earliest banks ready to issue an activate
@@ -599,11 +597,12 @@ class DRAMCtrl : public AbstractMemory
* Also checks if the bank is already prepped.
*
* @param queue Queued requests to consider
- * @param switched_cmd_type Command type is changing
+ * @param time of seamless burst command
* @return One-hot encoded mask of bank indices
+ * @return boolean indicating burst can issue seamlessly, with no gaps
*/
- uint64_t minBankPrep(const std::deque<DRAMPacket*>& queue,
- bool switched_cmd_type) const;
+ std::pair<uint64_t, bool> minBankPrep(const std::deque<DRAMPacket*>& queue,
+ Tick min_col_at) const;
/**
* Keep track of when row activations happen, in order to enforce