Top Banner
Kevin Walsh CS 3410, Spring 2010 Computer Science Cornell University Memory See: P&H Appendix C.8, C.9
16

Memory

Feb 23, 2016

Download

Documents

Vidal

Memory. See: P&H Appendix C.8, C.9. Voting Machine. 3. LED dec. mux. +1. mux. 32. 32. 32. . 32. reg. reg. reg. reg. E. E. E. E. decoder (3-to-8). enc. detect. 3. Register File. Register File N read/write registers Indexed by register number Implementation: - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Memory

Kevin WalshCS 3410, Spring 2010

Computer ScienceCornell University

Memory

See: P&H Appendix C.8, C.9

Page 2: Memory

2

Voting Machine

mux

32

...reg

dete

ct

enc

3

decoder (3-to-8)

32 32

32

LED

dec

3

E

+1

regE

regE

regE

mux

Page 3: Memory

3

Register File

Register File• N read/write registers• Indexed by

register number

Implementation:• D flip flops to store bits• Decoder for each write port• Mux for each read port

Dual-Read-PortSingle-Write-Port

32 x 32 Register File

QA

QB

DW

RW RA RBW

32

32

32

1 5 5 5

Page 4: Memory

4

Tradeoffs

Register File tradeoffs+ Very fast (a few gate delays for both read and write)+ Adding extra ports is straightforward– Doesn’t scale

Page 5: Memory

5

Building Large Memories

Need a shared bus (or shared bit line)• Many FFs/outputs/etc. connected to single wire• Only one output drives the bus at a time

Page 6: Memory

6

Tri-State Devices

DQ

E E Vdd

Gnd

E D Q0 0 z0 1 z1 0 01 1 1

D QD

Tri-State Buffers

Page 7: Memory

7

Shared Bus

S0D0

shared line

S1D1 S2D2 S3D3 S1023D1023

Page 8: Memory

8

SRAM

Static RAM (SRAM)• Essentially just SR Latches + tri-states buffers

Page 9: Memory

9

SRAM Chip

row

dec

oder

A21-10 column selector, sense amp, and I/O circuitsA9-0

CSR/W

Shared Data Bus

Page 10: Memory

10

SRAM Cell

Typical SRAM Cell

BB

word linebit l

ine

Each cell stores one bit, and requires 4 – 8 transistors (6 is typical)Read:• pre-charge B and B to Vdd/2• pull word line high• cell pulls B or B low, sense amp detects voltage differenceWrite:• pull word line high• drive B and B to flip cell

Page 11: Memory

11

SRAM Modules and Arrays

A21-0

Bank 2

Bank 3

Bank 4

1M x 4SRAM

1M x 4SRAM

1M x 4SRAM

1M x 4SRAM

R/W

msb lsb

CS

CS

CS

CS

Page 12: Memory

12

SRAM• A few transistors (~6) per cell• Used for working memory (caches)• But for even higher density…

SRAM Summary

Page 13: Memory

13

Dynamic RAM: DRAM

Dynamic-RAM (DRAM)• Data values require constant refresh

Gnd

word linebit l

ine

Capacitor

Page 14: Memory

14

Single transistor vs. many gates• Denser, cheaper ($30/1GB vs. $30/2MB)• But more complicated, and has analog sensing

Also needs refresh• Read and write back…• …every few milliseconds• Organized in 2D grid, so can do rows at a time• Chip can do refresh internally

Hence… slower and energy inefficient

DRAM vs. SRAM

Page 15: Memory

15

Memory

Register File tradeoffs+ Very fast (a few gate delays for both read and write)+ Adding extra ports is straightforward– Expensive, doesn’t scale– Volatile

Volatile Memory alternatives: SRAM, DRAM, …– Slower+ Cheaper, and scales well– Volatile

Non-Volatile Memory (NV-RAM): Flash, EEPROM, …+ Scales well– Limited lifetime; degrades after 100000 to 1M writes

Page 16: Memory

16

Summary

We now have enough building blocks to build machines that can perform non-trivial computational tasks

Register File: Tens of words of working memorySRAM: Millions of words of working memoryDRAM: Billions of words of working memoryNVRAM: long term storage

(usb fob, solid state disks, BIOS, …)