mem: Sort memory commands and update DRAMPower
authorWendy Elsasser <wendy.elsasser@arm.com>
Thu, 13 Oct 2016 18:22:10 +0000 (19:22 +0100)
committerWendy Elsasser <wendy.elsasser@arm.com>
Thu, 13 Oct 2016 18:22:10 +0000 (19:22 +0100)
commit27665af26d8bfdeaab3f3877da9158c9fc5f93ac
tree28fa34a2e0ccea5dbfa52419b73f55e82de76bd7
parent61b2b493d469e1629437d35e4025bb06a62a85a8
mem: Sort memory commands and update DRAMPower

Add local variable to stores commands to be issued.
These commands are in order within a single bank but will be out
of order across banks & ranks.

A new procedure, flushCmdList, sorts commands across banks / ranks,
and flushes the sorted list, up to curTick() to DRAMPower.
This is currently called in refresh, once all previous commands are
guaranteed to have completed.  Could be called in other events like
the powerEvent as well.

By only flushing commands up to curTick(), will not get out of sync
when flushed at a periodic stats dump (done in subsequent patch).

Change-Id: I4ac65a52407f64270db1e16a1fb04cfe7f638851
Reviewed-by: Radhika Jagtap <radhika.jagtap@arm.com>
src/mem/dram_ctrl.cc
src/mem/dram_ctrl.hh