05 - Internal Memory
05 - Internal Memory
Computer Organization
and Architecture
th
10 Edition
Chapter 5
Internal Memory
1
Basic Properties of Memory Cell
1. Two stable states to represent
• 0
• 1
2. Can be written into (at least once)
3. Can be read from
5-2
Memory Cell Operation
Control Control
Write Read
5-3
Semiconductor Memory Types
Memory Type Category Erasure Write Mechanism Volatility
Random-access Read-write Electrically, Electrically Volatile
memory (RAM) memory byte-level
Read-only memory Masks
(ROM) Read-only
Not possible
Programmable ROM memory
(PROM)
Erasable PROM UV light,
(EPROM) chip-level Nonvolatile
Electrically Erasable Electrically, Electrically
Read-mostly
PROM byte-level
memory
(EEPROM)
Flash memory Electrically,
block-level
5-4
Semiconductor Memory
• RAM
• Read/Write
• Volatile
• Temporary storage
• Two Types:
1. Dynamic
2. Static
5-5
Dynamic RAM
• Bits stored as charge in capacitors
• Charges leak – a natural tendency of capacitors
• The term dynamic refers to this tendency of stored charge to leak away, even with power continuously
supplied
• Need refreshing even
when powered
• Simpler construction
• Smaller per bit
• Less expensive
• Need refreshing circuits
• Slower
• Main memory
• Essentially analogue
• Level of charge determines value
5-6
Dynamic RAM Structure
• Address line is activated
when the bit value from
this cell is to be read or
written
5-7
Static RAM
• Bits stored as on/off switches
• No charges to leak
• No refreshing needed when powered
• More complex construction
• Larger per bit
• More expensive
• Does not need refresh circuits
• Faster
• Cache
• Digital
• Uses flip-flops
5-9
Static RAM Structure
• Four transistors, T1 to T4 are cross
connected
• This arrangement produces a
stable logic state
• In logic state 1, point C1 is high
and C2 is low.
• T1 and T4 are Off
• T2 and T3 are On
• In logic state 0, point C1 is low and
C2 is high.
• T1 and T4 are On
• T2 and T3 are Off
• Both states are stable as long as
voltage is supplied
5-10
Static RAM Structure-2
• Address line is used to open
or close a switch
• For Write operation
• The desired bit value is
applied to the line B and its
complement to line B’
• This forces the four
transistors, T1, T2, T3 and T4
into proper state.
• The bit value is read from
line B
5-11
SRAM v DRAM
• Both volatile
• Power needed to preserve data
• Dynamic cell • Static
• Simpler to build, smaller • Faster
• More dense • Cache
• Less expensive
• Needs refresh
• Larger memory units
5-13
Types of ROM
• Written during manufacture
• Very expensive for small runs
• Programmable (once)
• PROM
• Needs special equipment to program
• Read “mostly”
• Erasable Programmable (EPROM)
• Erased by UV
• Electrically Erasable (EEPROM)
• Takes much longer to write than read
• Flash memory
• Erase whole memory electrically
5-16
Error Correction
• Hard Failure
• Permanent defect
• Soft Error
• Random, non-destructive
• No permanent damage to memory
• Detected using Hamming error correcting code
5-17
Error Correcting Code Function
Error Signal
Data Out M
Corrector
Data In M M K
f
K
Memory K Compare
f
5-18
Synchronous DRAM (SDRAM)
• Access is synchronized with an external clock
• Address is presented to RAM
• RAM finds data (CPU waits in conventional DRAM)
• Since SDRAM moves data in time with system clock, CPU knows when
data will be ready
• CPU does not have to wait, it can do something else
5-20
DDR SDRAM
• SDRAM can only send data once per clock
• Double-data-rate SDRAM can send data twice per clock cycle
• Rising edge and falling edge
5-21
Flash Memory
5-22
Flash Memory
• First introduced in the mid-1980s, flash memory is intermediate between
EPROM and EEPROM in both
• cost and
• functionality.
• Like EEPROM, flash memory uses an electrical erasing technology.
• An entire flash memory can be erased in one or a few seconds, which is much faster
than EPROM.
• In addition, it is possible to erase just blocks of memory rather than an entire chip.
• Flash memory gets its name because the microchip is organized so that a
section of memory cells are erased in a single action or “flash.”
• However, flash memory does not provide bytelevel erasure.
• Flash memory uses only one transistor per bit.
5-23
Flash Memory
• An important characteristic of flash memory is that it is persistent
memory, which means that it retains data when there is no power
applied to the memory.
• Thus, it is useful for secondary (external) storage, and as an
alternative to random access memory in computers
5-24
NOR and NAND Flash Memory
• There are two distinctive types of flash memory, designated as
• NOR and
• NAND
• In NOR flash memory,
• the basic unit of access is a bit, referred to as a memory cell.
• Cells in NOR flash are connected in parallel to the bit lines so that each cell
can be read/write/erased individually.
• If any memory cell of the device is turned on by the corresponding word line,
the bit line goes low.
• This is similar in function to a NOR logic gate.2
5-25
NOR and NAND Flash Memory
5-26
NOR and NAND Flash Memory
• NAND flash memory
• is organized in transistor arrays with 16 or 32 transistors in series.
• The bit line goes low only if all the transistors in the corresponding word lines
are turned on.
• This is similar in function to a NAND logic gate.
5-27
NOR and NAND Flash Memory
5-28
NOR and NAND Flash Memory
5-29
NOR and NAND Flash Memory
5-30
Newer Nonvolatile Solid-State
Memory Technologies
5-31
Newer Nonvolatile Solid-State Memory
Technologies
• The traditional memory hierarchy has
consisted of three levels)
• Static RAM (SRAM): SRAM provides rapid
access time, but
• is the most expensive and the
• least dense (bit density).
• SRAM is suitable for cache memory.
• Dynamic RAM (DRAM):
• Cheaper, denser, and slower than SRAM,
• has traditionally been the choice off-chip main
memory.
• Hard disk: A magnetic disk provides
• very high bit density and
• very low cost per bit, with
• relatively slow access times.
• It is the traditional choice for external storage as
part of the memory hierarchy.
5-32
Newer Nonvolatile Solid-State Memory
Technologies
• Into this mix, as we have seen, as
been added flash memory.
• Flash memory has the advantage
over traditional memory that it is
nonvolatile.
• NOR flash is best suited to storing
programs and static application
data in embedded systems, while
• NAND flash has characteristics
intermediate between DRAM and
hard disks.
5-33
Newer Nonvolatile Solid-State Memory
Technologies
• Over time, each of these technologies has seen improvements in
scaling: higher bit density, higher speed, lower power consumption,
and lower cost.
• However, for semiconductor memory, it is becoming increasingly
difficult to continue the pace of improvement
5-34
Newer Nonvolatile Solid-State Memory
Technologies
• Recently, there have been breakthroughs in developing new forms of
nonvolatile semiconductor memory that continue scaling beyond flash
memory.
• The most promising technologies are
• spin-transfer torque RAM (STT-RAM),
• Phasechange RAM (PCRAM), and
• resistive RAM (ReRAM)
• All of these are in volume production.
• However, because NAND Flash and to some extent NOR Flash are still
dominating the applications, these emerging memories have been used in
specialty applications and have not yet fulfilled their original promise to
become dominating mainstream high-density nonvolatile memory.
• This is likely to change in the next few years.
5-35
STT-RAM
• STT-RAM is a new type of magnetic RAM (MRAM),
• which features
• non-volatility,
• fast writing/reading speed (< 10 ns), and
• high programming endurance (> 1015 cycles) and
• zero standby power
5-36
PCRAM
• Phase-change RAM (pcram) is the most mature or the new technologies
• PCRAM technology is based on a chalcogenide alloy material, which is
similar to those commonly used in optical storage media (compact discs
and digital versatile discs).
• The data storage capability is achieved from the resistance differences
between an amorphous (high-resistance) and a crystalline (low-resistance)
phase of the chalcogenide-based material.
• In SET operation, the phase change material is crystallized by applying an electrical
pulse that heats a significant portion of the cell above its crystallization temperature.
• In RESET operation, a larger electrical current is applied and then abruptly cut off in
order to melt and then quench the material, leaving it in the amorphous state.
• PCRAM is a good candidate to replace or supplement DRAM for main
memory.
5-38
PCRAM
• The data storage capability is
achieved from the resistance
differences between an amorphous
(high-resistance) and a crystalline
(low-resistance) phase of the
chalcogenide-based material.
• In SET operation, the phase change
material is crystallized by applying an
electrical pulse that heats a
significant portion of the cell above
its crystallization temperature.
• In RESET operation, a larger electrical
current is applied and then abruptly
cut off in order to melt and then
quench the material, leaving it in the
amorphous state.
5-39
ReRAM
• ReRAM (also known as RRAM) works by creating resistance rather than
directly storing charge.
• An electric current is applied to a material, changing the resistance of that material.
• The resistance state can then be measured and a 1 or 0 is read as the result.
• Much of the work done on ReRAM to date has focused on finding
appropriate materials and measuring the resistance state of the cells.
• ReRAM designs are
• low voltage,
• endurance is far superior to flash memory, and
• the cells are much smaller—at least in theory.
• ReRAM is a good candidate to replace or supplement both secondary
storage and main memory.
5-40