Docsity

Memory System Design: Main Memory Concepts, SRAM, DRAM, and Virtual Memory - Prof. B. Parh, Study notes of Electrical and Electronics Engineering

Partial preview of the text

Download Memory System Design: Main Memory Concepts, SRAM, DRAM, and Virtual Memory - Prof. B. Parh and more Study notes Electrical and Electronics Engineering in PDF only on Docsity!

Feb. 2009

Computer Architecture, Memory System Design

Part V

Memory System Design

Feb. 2009

Computer Architecture, Memory System Design

Slide 2

About This Presentation

This presentation is intended to support the use of the textbook Computer Architecture: From Microprocessors to Supercomputers

Oxford University Press, 2005, ISBN 0-19-515455-X. It is updatedregularly by the author as part of his teaching of the upper-divisioncourse ECE 154, Introduction to Computer Architecture, at theUniversity of California, Santa Barbara. Instructors can use theseslides freely in classroom teaching and for other educationalpurposes. Any other use is strictly prohibited. © Behrooz Parhami

Edition
Released
Revised
Revised
Revised
Revised
First
July 2003
July 2004
July 2005
Mar. 2006
Mar. 2007
Mar. 2008
Feb. 2009

Feb. 2009

Computer Architecture, Memory System Design

17 Main Memory Concepts

Technologies & organizations for computer’s main memory

  • SRAM (cache), DRAM (main), and flash (nonvolatile) • Interleaving & pipelining to get around “memory wall”

Topics in This Chapter 17.

Memory Structure and SRAM

DRAM and Refresh Cycles

Hitting the Memory Wall

Interleaved and Pipelined Memory

Nonvolatile Memory

The Need for a Memory Hierarchy

Feb. 2009

Computer Architecture, Memory System Design

17.1 Memory Structure and SRAM

Fig. 17.
Conceptual inner structure of a 2

h

×
g
SRAM chip
and its shorthand representation.

/ h

Write enable

/ g

Data in Address

Data out

Chip select

Q

C

Q

D

FF

Q

C

Q

D

FF

Q

C

Q

D

FF

/ g

Output enable

0 1

2

1

h

Addressdecoder

Storage

cells

/ g

/ g

/ g

WE

CS

OE

D in

D out

Addr

...

Feb. 2009

Computer Architecture, Memory System Design

SRAM with Bidirectional Data Bus

Fig. 17.
When data input and output of an SRAM chip
are shared or connected to a bidirectional data bus, outputmust be disabled during write operations.
h
g
Write enable
Data in/out
Chip select
Output enable
Address
Data in
Data out

Feb. 2009

Computer Architecture, Memory System Design

17.2 DRAM and Refresh Cycles

DRAM vs. SRAM Memory Cell Complexity

Word line

Capacitor

Bit

line

Pass

transistor

Word line

Bit

line

Compl.

bit

line

Vcc

(a) DRAM cell

(b) Typical SRAM cell

Fig. 17.
Single-transistor DRAM cell, which is considerably simpler than
SRAM cell, leads to dense, high-capacity DRAM memory chips.

Feb. 2009

Computer Architecture, Memory System Design

Loss of Bandwidth to Refresh Cycles

Example 17.

A 256 Mb DRAM chip is organized as a 32M

×

8 memory externally

and as a 16K

×

16K array internally. Rows must be refreshed at least

once every 50 ms to forestall data loss; refreshing a row takes 100 ns.What fraction of the total memory bandwidth is lost to refresh cycles?

Column mux

Row decoder

/ h

Address

Square or

almost square memory matrix

Row buffer

Row

Column

g

bits data out

/ g / h

Write enable

/ g

Data inAddress

Data out Outputenable

Chipselect

...

.

.

.

.

.

.

(a) SRAM block diagram

(b) SRAM read mechanism

Figure 2.

16K
16K 8

Solution Refreshing all 16K rows takes 16

×

×

100 ns = 1.64 ms. Loss of

1.64 ms every 50 ms amounts to 1.64/50 = 3.3% of the total bandwidth.

Feb. 2009

Computer Architecture, Memory System Design

DRAM Packaging

Fig. 17.
Typical DRAM package housing a 16M
×
4 memory.
Legend:A
i
CASD
j
NCOERASWE
A
A
A
A
A
A
D
D
CAS OE
Vss
Vss
A
A
A
A
A
D
D
RAS
WE
Vcc
Vcc
NC
Address bit
i
Column address strobeData bit
j
No connectionOutput enableRow address strobeWrite enable

24-pin dual in-line package (DIP)

Feb. 2009

Computer Architecture, Memory System Design

17.3 Hitting the Memory Wall

Fig. 17.

Memory density and capacity have grown along with the

CPU power and complexity, but memory speed has not kept pace.

1990

1980

2000

2010

1

10 10

Relative performance
Calendar year
Processor
Memory

6 3

Feb. 2009

Computer Architecture, Memory System Design

Bridging the CPU-Memory Speed Gap

Idea: Retrieve more data from memory with each access

Fig. 17.

Two ways of using a wide-access memory to bridge

the speed gap between the processor and memory.

Wide- access

memory

...

Narrow bus

to

processor

Mux

Wide-

access

memory

...

Wide bus

to

processor

...

Mux

(a) Buffer and mult iplex er

at the memory side

(a) Buffer and mult iplex er

at the processor side

...

Feb. 2009

Computer Architecture, Memory System Design

Slide 16

Memory Interleaving

Fig. 17.

Interleaved memory is more flexible than wide-access

memory in that it can handle multiple independent accesses at once.

Add- ress

Addresses that

are 0 mod 4

Addresses that

are 2 mod 4

Addresses that

are 1 mod 4

Addresses that

are 3 mod 4

Return

data

Data

in

Data

out

Dispatch

(based on 2 LSBs of

address)

Bus cycle

Memory cycle

0

1

2

3

0

1

2

3

Module accessed

Time

Addresses 0, 4, 8, …Addresses 1, 5, 9, … Addresses 2, 6, 10, …Addresses 3, 7, 11, …

Feb. 2009

Computer Architecture, Memory System Design

17.5 Nonvolatile Memory

ROM

PROM

EPROM

Fig. 17.

Read-only memory organization, with the

fixed contents shown on the right.

B i t
l i n e s
Word
lines
Word contents
S u p p l y
v o l t a g e

Feb. 2009

Computer Architecture, Memory System Design

17.6 The Need for a Memory Hierarchy

The widening speed gap between CPU and main memory

Processor operations take of the order of 1 ns Memory access requires 10s or even 100s of ns

Memory bandwidth limits the instruction execution rate

Each instruction executed involves at least one memory access Hence, a few to 100s of MIPS is the best that can be achieved A fast buffer memory can help bridge the CPU-memory gap

The fastest memories are expensive and thus not very large

A second (third?) intermediate cache level is thus often used

Feb. 2009

Computer Architecture, Memory System Design

Slide 20

Typical Levels in a Hierarchical Memory

Fig. 17.

Names and key characteristics of levels in a memory hierarchy.

Tertiary

Secondary

Main

Cache 2

Cache 1

Reg’s

$Millions

$100s Ks

$10s Ks

$1000s

$10s

$1s

Cost per GB

Access latency

Capacity 100s MB10s GB TBs

MBs 100s B 10s KB

10s ns100s ns10s msmin+

a few ns

ns

Speed

gap