1 comp541 memories - i montek singh oct 7, 2015. topics overview of memory types read-only memory...

43
1 COMP541 Memories - I Montek Singh Oct 7, 2015

Upload: stephanie-howard

Post on 04-Jan-2016

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

1

COMP541

Memories - I

Montek Singh

Oct 7, 2015

Page 2: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Topics Overview of Memory Types

Read-Only Memory (ROM): PROMs, FLASH, etc.Random-Access Memory (RAM)

Static todayDynamic next

2

Page 3: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Types of Memory Many dimensions

Read Only vs. Read/Write (or write seldom)Volatile vs. Non-VolatileRequires refresh or not

Look at ROM first to examine interface

3

Page 4: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Non-Volatile Memory Technologies Mask (old) ROM

read-only memory Fuses (old) PROM

programmable read-only memory Erasable EPROM

erasable programmable read-only memory Electrically erasable EEPROM

electrically-erasable programmable read-only memory today called FLASH!

used everywhere!

4

Page 5: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Details of ROM Memory that is permanent

k address lines2k itemsn bits

5

Page 6: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Notional View of Internals Main components:

decoder for address decoding select one row“wired-OR” per bit OR’s together minterms

ORing done by connecting outputs of effectively tristate buffers

6

Page 7: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Programmed Truth Table

7

Page 8: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

ROM after programming Remember:

OR is a “wired OR”output is 1 if any of the rows with an intact fuse is 10 otherwise

8

Page 9: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Mask ROMs Oldest technology Originally “mask” used as last step in

manufacturingSpecify metal layer (connections)Used for volume applicationsLong turnaroundUsed for applications such as embedded systems and,

in the old days, boot ROM

but cheap to mass produce!

9

Page 10: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Programmable ROM (PROM) Early ones had fusible links

High voltage would blow out linksFast to programSingle use

10

Page 11: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

UV EPROM Erasable PROM

Common technologies used UV light to erase complete device

Took about 10 minutesHolds state as charge in very well insulated areas of

the chipNonvolatile for several (10?) years

11

Page 12: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

EEPROM Electrically Erasable PROM

Similar technology to UV EPROMErased in blocks by higher voltageProgramming is slower than reading

Today’s flavor is called “flash memory”Digital cameras, MP3 players, BIOSLimited lifeSome support individual word write, some block

Our boards have it:A flash memory chip on our Nexys boardsHas a “boot block” that is carefully protectedWe will learn to use it in upcoming labs

12

Page 13: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

How Flash Works Special transistor with floating gate This is part of device surrounded by insulation

So charge placed there can stay for yearsAside: some newer devices store multiple bits of info

in a cell

Interested in this?Let’s cover briefly

13

Page 14: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Flash Add an extra gate to an nMOS transistor

a “float gate” below the actual control gatefloat gate is isolated from everything elsecan hold electrons for a while

charge on float gate determines bit value storedelectrons deposited

negative charge does not allowtransistor to turn on

if no electrons on float gate transistor can be turned on by the control gate

14https://en.wikipedia.org/wiki/Flash_memory

Page 15: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Flash Add an extra gate to an nMOS transistor

charge on float gate determines bit value storedfloat gate can be cleared using high voltage

erased ‘1’ valuecannot erase individual bits: must clear an entire “block”

or “page”can write individual bits

for fast write speeds:must have empty blocks availablespeeds slows down as memory fillsthus, garbage collection is important overprovisioning used in SSDs

15https://en.wikipedia.org/wiki/Flash_memory

Page 16: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Read/Write Memories Flash is obviously writeable

But not meant to be written rapidly (say at CPU rates)And often writing needs erasure of entire blocks

For frequent writing, use RAM

16

Page 17: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Random Access Memories So called because it takes same amount of

time to address any particular locationNot entirely true for modern DRAMs, but somewhat

true…

First look at asynchronous static RAM reading and writing typically controlled by

“handshakes”clock may still be present, but actions controlled by

handshake signals

17

Page 18: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Simple View of RAM Typical parameters:

some word size nsome capacity 2k

k bits of address line

Need a line to specify reading or writing typically only one wire needed

sometimes two separate ones

18

Page 19: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Example: 1K x 16 memory RAM comes in variety of

sizes from 1-bit widemain issue is no. of pins

available on chip

Memory size often specified in bytesThis would be 2KB memory10 address lines (=1K

locations)16 data lines (=2

bytes/location)

19

Page 20: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Writing Sequence of steps

Set up address linesSet up data linesActivate write line (e.g., maybe a positive edge)

20

Page 21: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Reading Steps

Setup address linesActivate read lineData available soon

for asynchronous memory: after simply a specified amount of time

for synchronous memory: after a clock edge

21

Page 22: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Chip Select Enable:

Usually a line to enable the chipWhy?

22

Page 23: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Timing: Writing

23

Page 24: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Timing: Reading

24

Page 25: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Static vs. Dynamic RAM Different internal implementations: SRAM vs.

DRAMDRAM:

DRAM stores charge in capacitorDisappears after short period of timeMust be refreshedSmall sizeHigher storage density larger capacities

SRAM:SRAM easier to useUses transistors (think of it as latch)FasterMore expensive per bitSmaller sizes

25

Page 26: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Structure of SRAM Internally, each bit stored in a “latch”

One memory cell per bitCell consists of a few transistorsNot really a latch made of NANDs/NORs, but logically

equivalentBehaves like an SR latch

Control logicalso need extra logic around the latch to make it work like

a memory cell

26

Page 27: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Structure of SRAM Several optimized circuits often used

replace a full-fledged SR latch with something simpler, smaller, faster…Not really a latch made of NANDs/NORs, but logically

equivalentBehaves like an SR latch

e.g., a simpler 6-transistor memory cellwordline Select(bitline, bitline’) (B, B’) as well as (C, C’)

27

wordline

bitline bitline

Page 28: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Example: A Simple Organization Note:

In reality, more complexOnly one word-line is “on” at a time

28

wordline311

10

2:4Decoder

Address

01

00

storedbit = 0

wordline2

wordline1

wordline0

storedbit = 1

storedbit = 0

storedbit = 1

storedbit = 0

storedbit = 0

storedbit = 1

storedbit = 1

storedbit = 0

storedbit = 0

storedbit = 1

storedbit = 1

bitline2 bitline1 bitline0

Data2 Data1 Data0

2

Page 29: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Zoom in: A single bit slice Operation:

Cells connected to form 1 bit position (column)

Word Select enables one latch from address lines

only this cell is writable only this cell is read

B (and B’) set by: Read/Write’ Data In Bit Select

29

Page 30: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Let’s look at a single bit cell

stored bit

wordline

bitline

Example:

stored bit = 0

wordline = 1

stored bit = 1

stored bit = 0

stored bit = 1

bitline =

(a) (b)

wordline = 1

wordline = 0

wordline = 0

bitline =

bitline =

bitline =0

1

Z

Z

30

Page 31: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

31

Bit Slices and Modules Entire column of cells

called a bit slicebasically a 1-bit wide

memory! Module

module refers to a single chip of memory

1-bit wide memory chips are quite common!

Page 32: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Inside an SRAM Bit Cell Actual implementation does not use a real SR

latch!a tinier approximation is used logically behaves very much like an SR latchbut much smaller and faster!

stored bit

wordline

bitline

wordline

bitline bitline

32

Page 33: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

33

16 X 1 RAM “Chip”

Now shows address decoder selects

appropriate location

Page 34: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Row/Column Layout For larger RAMs:

decoder becomes pretty bigalso run into chip layout issues

Typically: larger memories use “2D” matrix layoutsee next slide

34

Page 35: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

35

16 X 1 RAM as 4 X 4 Array

Two decodersRowColumn

Address just broken up

Not visible from outside on SRAMs

Page 36: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

36

Not the same as 8 X 2 RAM! Minor change in

logic and pinsSpot the difference!

Page 37: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Spot the difference!

37

Page 38: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Realistic Sizes Example: 256Kb memory organized 32K X 8

Single-column layout would need 15-bit decoder with 32K outputs!

Better organization:A 2D (i.e., square) layout with:

9-bit row and 6-bit column decoders

38

Page 39: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

SRAM Performance Latency and Throughput important

Current ones have cycle times in low nanosecondssay 1-2ns (top-end ones even lower)

Used as cache (typically on-chip or off-chip secondary cache)

Sizes up to 8Mbit or so for fast chipsExpensive ones can go a bit bigger

Energy/powerSRAMs also better for low power vs. DRAMs

39

Page 40: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Wider Memory What if you don’t have enough bit width?

use multiple chips and side-by-side

40

Page 41: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Larger/Wider Memories Made up from sets of

chips Consider a 64K by 8

RAMour building block

41

Page 42: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Larger Let’s build a larger

memory256K X 8Decoder for high-order 2

bitsSelects chipLook at selection logicAddress ranges

Tri-state outputs

42

Page 43: 1 COMP541 Memories - I Montek Singh Oct 7, 2015. Topics  Overview of Memory Types Read-Only Memory (ROM): PROMs, FLASH, etc. Read-Only Memory (ROM):

Summary Today we looked at:

Quick look at non-volatile memoryStatic RAM

Next topic:Dynamic RAM

Complex, largest, cheapMuch more design effort to use

Talk about memories for lab

43