Memory refresh is a process of periodically reading information from an area of computer memory and immediately rewriting the read information to the same area without modification, for the purpose of preserving the information. Memory refresh is a background maintenance process required during the operation of semiconductor dynamic random-access memory (DRAM), the most widely used type of computer memory, and in fact is the defining characteristic of this class of memory. In a DRAM chip, each bit of memory data is stored as the presence or absence of an electric charge on a small capacitor on the chip. As time passes, the charges in the memory cells leak away, so without being refreshed, the stored data would eventually be lost. To prevent this, external circuitry periodically reads each cell and rewrites it, restoring the charge on the capacitor to its original level. Each memory refresh cycle refreshes a succeeding area of memory cells, thus repeatedly refreshing all the cells on the chip in a consecutive cycle. This process is typically conducted automatically in the background by the memory circuitry and is transparent to the user. While a refresh cycle is occurring, the memory is not available for normal read and write operations, but in modern memory, this overhead is not large enough to significantly slow down memory operation. Static random-access memory (SRAM) is electronic memory that does not require refreshing. An SRAM memory cell requires four to six transistors, compared to a single transistor and a capacitor for DRAM; therefore, SRAM circuits require more area on a chip. As a result, data density is much lower in SRAM chips than in DRAM, which gives SRAM a higher price per bit. Therefore, DRAM is used for the main memory in computers, video game consoles, graphics cards and applications requiring large capacities and low cost. The need for memory refresh makes DRAM more complicated, but the density and cost advantages of DRAM justify this complexity.
Operation While the memory is operating, each memory cell must be refreshed repetitively and within the maximum interval between refreshes specified by the manufacturer, usually in the millisecond region. Refreshing does not employ the normal memory operations (read and write cycles) used to access data, but specialized cycles called refresh cycles which are generated by separate counter circuits and interspersed between normal memory accesses. The storage cells on a memory chip are laid out in a rectangular array of rows and columns. The read process in DRAM is destructive and removes the charge on the memory cells in an entire row, so there is a column of specialized latches on the chip called sense amplifiers, one for each column of memory cells, to temporarily hold the data. During a normal read operation, the sense amplifiers, after reading and latching the data, rewrite the data in the accessed row. This arrangement allows the normal read electronics on the chip to refresh an entire row of memory in parallel, significantly speeding up the refresh process. Although a normal read or write cycle refreshes a row of memory, normal memory accesses cannot be relied on to hit all the rows within the necessary time, necessitating a separate refresh process. Rather than use the normal read cycle in the refresh process, to save time, an abbreviated refresh cycle is used. The refresh cycle is similar to the read cycle, but executes faster for two reasons:
For a refresh, only the row address is needed, so a column address doesn't have to be applied to the chip address circuits. Data read from the cells does not need to be fed into the output buffers or the data bus to send to the CPU. To ensure that each cell gets refreshed within the refresh time interval, the refresh circuitry must perform a refresh cycle on each of the rows on the chip within the interval.
Types of refresh circuits Although in some early systems the microprocessor controlled refresh, with a timer triggering a periodic interrupt that ran a subroutine that performed the refresh, this meant the microprocessor could not be paused, single-stepped, or put into energy-saving hibernation without stopping the refresh process and losing the data in memory. So in modern systems, refresh is handled by circuits in the memory controller, which may be embedded in the chip itself. Specialized DRAM chips, such as pseudostatic RAM (PSRAM), have all the refresh circuitry on the chip, and function like static RAM as far as the rest of the computer is concerned.
… excerpt ends here. Continue reading the full article.