mem: Simplify page close checks for adaptive policies

Both open_adaptive and close_adaptive page polices keep the page
open if a row hit is found. If a row hit is not found, close_adaptive
page policy precharges the row, and open_adaptive policy precharges
the row only if there is a bank conflict request waiting in the queue.

This patch makes the checks for above conditions simpler.

Committed by: Nilay Vaish <nilay@cs.wisc.edu>
This commit is contained in:
Rizwana Begum 2015-04-29 22:35:22 -05:00
parent 3a2731fb8c
commit 52a3bc5e5c

View file

@ -1174,11 +1174,12 @@ DRAMCtrl::doDRAMAccess(DRAMPacket* dram_pkt)
// currently dealing with (which is the head of the queue) // currently dealing with (which is the head of the queue)
++p; ++p;
// keep on looking until we have found required condition or // keep on looking until we find a hit or reach the end of the queue
// reached the end // 1) if a hit is found, then both open and close adaptive policies keep
while (!(got_more_hits && // the page open
(got_bank_conflict || pageMgmt == Enums::close_adaptive)) && // 2) if no hit is found, got_bank_conflict is set to true if a bank
p != queue.end()) { // conflict request is waiting in the queue
while (!got_more_hits && p != queue.end()) {
bool same_rank_bank = (dram_pkt->rank == (*p)->rank) && bool same_rank_bank = (dram_pkt->rank == (*p)->rank) &&
(dram_pkt->bank == (*p)->bank); (dram_pkt->bank == (*p)->bank);
bool same_row = dram_pkt->row == (*p)->row; bool same_row = dram_pkt->row == (*p)->row;