Same bank refresh command scheduling
A data processor includes a memory accessing agent and a memory controller. The memory accessing agent is for generating memory access requests for a memory. The memory controller includes a command queue and a refresh controller. The command queue is for storing the memory access requests. The refresh controller is coupled to the command queue and is operable to select an order of providing same bank refresh commands to a plurality of refresh groups of corresponding banks in the memory based on an aggregate request count of the memory access requests in the command queue.
1 . A data processor comprising:
a memory accessing agent for generating memory access requests for a memory; and
a memory controller comprising:
a command queue for storing the memory access requests; and
a refresh controller coupled to the command queue and operable to select an order of providing same bank refresh commands to a plurality of refresh groups of corresponding banks in the memory based on an aggregate request count of the memory access requests in the command queue, the order based on updated aggregate request counts of remaining refresh groups that have not yet been picked during a refresh interval.
2 . The data processor of claim 1 , wherein the refresh controller is operable to pick a next refresh group with a lowest aggregate request count of the memory access requests in the command queue among one or more refresh groups that have not yet been picked in the refresh interval, and to generate a corresponding same bank refresh command for the next refresh group.
3 . The data processor of claim 1 , wherein the memory controller further comprises:
an arbiter coupled to the command queue and to the refresh controller for selecting memory commands from among the memory access requests stored in the command queue and refresh requests from the refresh controller.
4 . The data processor of claim 1 , wherein:
the refresh controller is operable to select the order of providing the same bank refresh commands for each of a plurality of refresh intervals.
5 . The data processor of claim 4 , wherein:
the refresh controller provides the same bank refresh commands for all of the plurality of refresh groups for each of a plurality of ranks of memory.
6 . A data processing system comprising:
a data processor; and
a memory coupled to the data processor and operable to execute a same bank refresh command by refreshing a group of corresponding banks in response to the same bank refresh command,
wherein the data processor comprises a memory controller having a command queue for storing memory access requests, wherein the memory controller is operable select an order of providing same bank refresh commands to a plurality of refresh groups of the corresponding banks in the memory based on an aggregate request count of the memory access requests in the command queue, the order based on updated aggregate request counts of remaining refresh groups that have not yet been picked during a refresh interval.
7 . The data processing system of claim 6 , wherein:
the memory controller is operable to generate a corresponding same bank refresh command for a next refresh group.
8 . The data processing system of claim 6 , wherein:
the memory controller is further operable to select the order of providing the same bank refresh command for each of a plurality of refresh intervals.
9 . The data processing system of claim 8 , wherein:
the memory controller provides the same bank refresh commands for the plurality of refresh groups in each of the plurality of refresh intervals for each of a plurality of ranks of the memory.
10 . The data processing system of claim 8 , wherein the memory controller comprises:
a refresh controller coupled to the command queue for selecting the same bank refresh commands; and
an arbiter coupled to the command queue and to the refresh controller for selecting memory commands from among the memory access requests stored in the command queue and refresh requests from the refresh controller.
11 . The data processing system of claim 10 , wherein:
the refresh controller is further operable to select the order by repetitively selecting a next refresh group among the plurality of refresh groups that has a lowest aggregate request count and has not yet been picked in a particular refresh interval until all of the plurality of refresh groups have been picked.
12 . The data processing system of claim 11 , wherein:
the refresh controller provides the same bank refresh commands for all of the plurality of refresh groups for each of a plurality of ranks of the memory.
13 . The data processing system of claim 6 , wherein:
the memory comprises a dynamic random access memory.
14 . A method for refreshing a memory having a plurality of bank groups by a memory controller having a command queue for storing memory access requests, comprising:
during a predetermined time interval:
picking a next refresh group with a lowest aggregate request count of the memory access requests in the command queue among one or more refresh groups that have not yet been picked in a current round, wherein each refresh group defines a corresponding bank in each of the plurality of bank groups; and
generating a same bank refresh command for the next refresh group,
wherein the picking comprises picking in an order based on updated aggregate request counts of remaining refresh groups that have not yet been picked during a refresh interval.
15 . The method of claim 14 , wherein:
the predetermined time interval of time comprises a maximum refresh time internal (tREFI).
16 . The method of claim 14 , further comprising:
providing the same bank refresh command to the memory using a physical interface circuit connected to the memory controller.