
58 Chapter 6: Memory
provides a classification system for the memory devices that are commonly found
in embedded systems.
Types of RAM
There are two important memory devices in the RAM family: SRAM and DRAM. The
main difference between them is the lifetime of the data stored. SRAM (static RAM)
retains its contents as long as electrical power is applied to the chip. However, if
the power is turned off or lost temporarily then its contents will be lost forever.
DRAM (dynamic RAM), on the other hand, has an extremely short data lifetime—
usually less than a quarter of a second. This is true even when power is applied
constantly.
In short, SRAM has all the properties of the memory you think of when you hear
the word RAM. Compared to that, DRAM sounds kind of useless. What good is a
memory device that retains its contents for only a fraction of a second? By itself,
such a volatile memory is indeed worthless. However, a simple piece of hardware
called a DRAM controller can be used to make DRAM behave more like SRAM.
(See the sidebar “DRAM Controllers” later in this chapter.) The job of the DRAM
controller is to periodically refresh the data stored in the DRAM. By refreshing the
data several times a second, the DRAM controller keeps the contents of memory
alive for as long as they are needed. So, DRAM is as useful as SRAM after all.
When deciding which type of RAM to use, a system designer must consider ...