There are many parts to a computer. One of the key pieces is system memory or RAM. This contains all the data the CPU could need for the currently running processes. RAM is the second of four tiers of storage. The first is CPU cache; the others are long-term storage. Such as connected HDDs or SSDs, and archival storage, such as disconnected external hard drives.
The CPU can directly access only the CPU cache. As fast as modern SSDs and RAM can be, they’re just too slow for the CPU. Instead, long-term storage feeds data for running processes into RAM, and RAM feeds the specific data requested by the CPU into the CPUs cache.
To manage these data transfers, a device controller is used. For storage devices, that’s a hard drive controller or an SSD controller. For RAM, that’s the job of the memory controller.
Bringing Northbridge Closer to Home
Historically CPUs have had the memory controller located on the Northbridge. This was half of an external chipset situated on the motherboard. Its purpose was to provide memory access as well as access to the Southbridge. The Southbridge was used to connect storage and peripheral devices. In the 2000s, the continuing improvement in feature scale in CPUs enabled the Northbridge to be integrated directly into the CPU die. For AMD, this started around 2003; Intel was a little later to the integration party, with products reaching the market in 2008.
Integrating the Northbridge provided several advantages while also locking in a disadvantage. Firstly, with the memory controller integrated into the CPU die itself, the connection bandwidth between the memory controller and the CPU cache can be increased while the latency can be decreased. This change enabled (then) future generations of RAM to continue to grow in performance. Integrating the memory controller onto the CPU also helps to reduce costs, as you no longer have to design, manufacture, and install northbridge chips on motherboards.
The main downside is that it’s no longer possible to upgrade to a new generation of RAM simply by upgrading the motherboard and RAM. With the memory controller on the motherboard, as long as the CPU socket stayed the same, it was possible to move the CPU to a new motherboard to gain access to a new generation of RAM. With it integrated into the CPU, the CPU itself needs to be replaced, as well as the motherboard for new RAM slots and the RAM DIMMs themselves.
What Does the Memory Controller Actually Do?
The memory controller requests the data the CPU wants from the RAM. It requests the specific row and column address of the data requested by the CPU and then passes the data to the CPU cache as it is returned from RAM.
The memory controller also contains the necessary logic to refresh the RAM cells regularly—charge leaks from DRAM cells over time. To prevent data loss, every memory cell row must be periodically refreshed. Current JEDEC standards specify that all rows are refreshed every 64ms. To avoid a significant decrease in performance every 64ms, the memory controller doesn’t refresh all rows at once.
Instead, it performs rolling opportunistic refreshes on rows that haven’t been accessed between read or write operations. Rows that have been accessed in the current 64ms period don’t need to be refreshed as the process automatically refreshes the row as the reading process is destructive.
Technically, the 64ms period is significantly more conservative than necessary. Most DRAM cells can actually hold a charge for 10 seconds in standard conditions. 64ms leaves enough buffer to refresh even the worst statistical outliers in charge retention. The performance impact of being conservative on the refresh rate, however, is minimal. However, the impact of data loss from setting the refresh timer too high could be much more of an issue.
Conclusion
A memory controller is a device that manages the data flow between the CPU and system RAM. It also continuously refreshes the RAM to ensure no data is lost due to charge leakage. Historically, the memory controller was located on the Northbridge chipset chip on the motherboard. Modern CPUs, however, have integrated the Northbridge entirely. This change has helped to enable performance increases in newer generations of RAM. Don’t forget to share your thoughts in the comments below.
Did this help? Let us know!