Resumen
A DRAM controller (103) may be configured to re-order read/write requests to maximize the number of page hits and minimize the number of page conflicts and page misses. A three-level prediction algorithm may be performed to obtain auto-precharge prediction for each read/write request, without having to track every individual page. Instead, the DRAM controller may track the history of page activity for each bank of DRAM (105), and make a prediction to first order based history that is not bank based. The memory requests may be stored in a queue, a specified number at a time, and used to determine whether a page should be closed or left open following access to that page. If no future requests in the queue are to the given bank containing the page, recent bank history for that bank may be used to obtain a prediction whether the page should be closed or left open. If the page is not closed as a result of the determination and/or prediction, it may be left open and closed after it has remained idle a specified length of time following the last access to the page.
Reivindicaciones
We claim; 1. A method for managing access to a memory (105) having a plurality of memory banks, the method comprising: identifying a given memory page requested by a current memory request, wherein the given memory page is in a given memory bank of the plurality of memory banks (404); determining whether the given memory page should be closed or left open based on a current prediction value corresponding to a history of recent memory accesses to the given memory bank (406); and once access to the given memory page for the current memory request has completed, performing one of: closing the given memory page in response to said determining resulting in a determination that the given memory page should be closed (422); or leaving open the given memory page in response to said determining resulting in a determination that the given memory page should be left open (424). 2. The method of claim 1, wherein said performing one of is performed before the memory is accessed again after access to the given memory page for the current memory request has completed. 3. The method of claim 1, further comprising: determining that none of one or more additional memory requests waiting to access the memory are requesting a memory page in the given memory bank; wherein said determining whether the given memory page should be closed or left open is performed in response to said determining that none of the one or more additional memory requests are requesting a memory page in the given memory bank. 4. The method of claim 1, further comprising closing the given memory page a specified length of time after access to the given memory page for the current memory request has completed, in response to the given memory page having remained idle during the specified length of time (426). 5. The method of claim 1, further comprising obtaining the current prediction value according to: first information corresponding to a first number of most recent previous memory accesses to the given memory bank; and second information corresponding to the access to the given memory page for the current memory request. 6. The method of claim 1 further comprising: receiving a plurality of memory requests and storing the received memory requests in a queue as pending memory requests (402); selecting one of the pending memory requests stored in the queue, and removing the selected memory request from the queue (404); identifying a first memory page and corresponding first memory bank requested by the selected memory request (404); making a prediction whether the first memory page should be closed or left open based on a current prediction value corresponding to a history of recent memory accesses to the first memory bank (406); determining that none of the pending memory requests stored in the queue are requesting access to the first memory bank (410); in response to said determining, performing one of: enabling auto-precharge for the selected memory request in response to said making a prediction resulting in the prediction that the first memory page should be closed (422); or disabling the auto-precharge for the selected memory request in response to said making a prediction resulting in the prediction that the first memory page should be left open (424). 7. A memory controller (103) configured to control access to a memory (105) having one or more memory banks, the memory controller comprising: a page table (106) configured to store respective memory bank access history information for each of the one or more memory banks; and a memory bank history table (108) having a plurality of entries, wherein each entry of the plurality of entries is configured to store a respective prediction value corresponding to respective memory bank access history information stored in the page table for one of the one or more memory banks; wherein the memory controller is configured to identify a given memory page targeted by a current memory request, wherein the given memory page is in a given memory bank of the one or more memory banks; wherein the memory controller is further configured to obtain a current prediction value from the memory bank history table, wherein the current prediction value is based on at least the respective memory bank access history information stored in the page table for the given memory bank, and wherein the current prediction value indicates to the memory controller whether the memory controller should close the given memory page or leave open the given memory page; and wherein when no pending memory requests are targeting the given memory bank, once access to the given memory page for the current memory request has completed, the memory controller is configured to either close or leave open the given memory page according to what the current prediction value indicates; and wherein the pending memory requests comprise one or more additional memory requests waiting to access the memory. 8. The memory controller of claim 7, wherein the memory controller is further configured to perform one or more of: obtain the current prediction value from a given entry of the memory bank history table, wherein a location of the given entry is determined by: at least a first portion of the respective memory bank access history information stored in the page table for the given memory bank; and memory bank access information corresponding to the current memory request; close the given memory page once access to the given memory page for the current memory request has completed, when none of the pending memory requests are targeting the given memory page, and at least one of the pending memory requests is targeting a closed memory page in the given memory bank; leave open the given memory page once access to the given memory page for the current memory request has completed, when none of the pending memory requests are targeting any closed memory pages in the given memory bank, and at least one of the pending memory requests is targeting the given memory page; leave open the given memory page once access to the given memory page for the current memory request has completed, when at least one of the pending memory requests is targeting the given memory page, and at least one of the pending memory requests is targeting a closed memory page in the given memory bank; update a future prediction value stored in the memory bank history table after obtaining the current prediction value; update the future prediction value stored in a given entry of the memory bank history table, wherein a location of the given entry is determined by the respective memory bank access history information stored in the page table for the given memory bank; and identify a memory access condition corresponding to the current memory request and update the future prediction value according to the memory access condition, wherein the memory access condition is one of: a page hit indicating that the given memory page is already open; a page miss indicating that there are no open pages in the given memory bank; or a page conflict indicating that the given memory page is not open and another memory page is open in the given memory bank. 9. The memory controller of claim 8; wherein when the memory access condition is a page hit, the memory controller is operable to update the future prediction value to indicate that the given memory page should remain open; wherein when the memory access condition is a page conflict, the memory controller is operable to update the future prediction value to indicate that the given memory page should be closed; wherein when the memory access condition is a page miss, and a most recently opened page in the given memory bank is not the given memory page, the memory controller is operable to update the future prediction value to indicate that the given memory page should be closed; and wherein when the memory access condition is a page miss, and a most recently opened page in the given memory bank is the given memory page, the memory controller is operable to update the future prediction value to indicate that the given memory page should remain open; wherein each entry of the memory bank history table is further configured to store a respective confidence counter value; wherein the memory controller is operable to store the future prediction value in a given entry of the memory bank history table; and wherein the memory controller is operable to update the future prediction value according to the memory access condition, and the respective confidence counter value stored in the given entry. 10. A system (100) comprising the memory controller (103) recited in claim 7, and further comprising one or more memory elements (105) coupled to the memory controller; wherein the memory controller is configured to control access to the one or more memory elements.