1. Field of the Invention
This invention is related to the field of memory controllers.
2. Description of the Related Art
Memory controllers are generally included in systems to interface various devices in the system with the memory. Generally, the memory controller receives a memory transaction, which includes an address, from one of the devices and accesses the memory using the address. More particularly, the memory controller may use a portion of the address to select a storage location in the memory for access in response to the memory transaction. In a typical dynamic random access memory (DRAM) controller, for example, a first portion of the address is a row address for the DRAM and a second portion of the address is a column address for the DRAM. Together, the row and column addresses select a storage location in the DRAM to be accessed in response to the memory transaction.
Various memory controllers have implemented other features as well. For example, memory controllers have been configured to attach to multiple memory sections, and the memory controller may provide a separate select signal (typically referred to as a chip select signal) to each memory section. By asserting one of the chip select signals, one of the memory sections may be selected to respond to a memory transaction (e.g. by receiving the row and column addresses provided by the memory controller and reading or writing the selected storage location). Another portion of the address of memory transactions may be used to determine the chip select signals. Another feature of some memory controllers is interleaving. With interleaving, two or more memory sections may be combined to represent a given address range. Portions of the data corresponding to the address range may be stored in each of the two or more memory sections, and the memory sections may be accessed in sequence to access all of the data corresponding to the address range. Interleaving may reduce the overall latency of the memory transactions by increasing the possibility of having open pages in the memory (e.g. for a set of transactions clustered in a certain address range) by increasing the number of memory sections accessed at one time. This may effectively increase the page size, which may be viewed as the row size of one memory section multiplied by the number of interleaved memory sections. However, a non-interleaved memory system may provide higher bandwidth, since different transactions can be pipelined into the memory sections (although the latency of each individual transaction may be higher than an interleaved system). Non-interleaving may allow for more pages (of a smaller size) than interleaved systems. If the different transactions occur to different pages, these transactions may be more likely to be pipelined into the non-interleaved system.
The various features implemented by memory controllers may attempt to provide good memory performance (e.g. high bandwidth and/or low latency). However, the memory configuration which may deliver the best memory performance may be dependent on the application(s) being executed in a given system. The arrangement of data and instructions used by the application(s) in memory, as well as the pattern of memory transactions performed by the application, may differ from other applications, and the memory configuration which provides the best memory performance may differ from that of other applications. For example, some applications may benefit from an interleaved memory system providing lower latency for each access (e.g. if the memory transactions tend to be clustered in certain address ranges). On the other hand, other applications may benefit from a non-interleaved system (e.g. applications having high numbers of memory transactions, especially if consecutive memory transactions tend to be to disparate addresses). Such applications may benefit from the availability of other memory sections of the non-interleaved configuration to perform the memory transactions. Furthermore, depending upon the arrangement of data in memory, the portions of the address of a memory transaction used to select a storage location in the memory corresponding to the address may affect the performance of the memory system.
Unfortunately, memory controllers have generally been implemented with a relatively fixed configuration. Typically, address ranges may be assigned to each memory section, and certain memory features (such as page mode) may be enabled or disabled. Otherwise, the configuration of the memory controller (and thus the mapping of addresses to storage locations in the memory) is fixed. Thus, design decisions made when designing the memory controller largely determine the performance that the memory system may deliver for a particular application.