26
Memory Philipp Koehn 9 September 2019 Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

Memory

Philipp Koehn

9 September 2019

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 2: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

1D-Type Level-Triggered Latch

Q

Q

DATA

NOT

AND

ANDNOR

NOR

CLOCK

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 3: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

2Slightly Modified

DATA OUT

DATA IN

NOT

AND

NOR

NOR

WRITEAND

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 4: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

3Operations

• Circuit latches on one bit of memory and keeps it around

• Truth table

Data-In Write Data-Out

0 1 0

1 1 1

X 0 Data

• Can write 1 bit and read content

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 5: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

4

multi-bit storage

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 6: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

51 Bit Memory

DATA OUT

DATA IN

NOT

AND

NOR

NOR

WRITEAND

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 7: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

68 Bit Memory

DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W

WRITE

DATA OUT

DATA IN

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 8: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

7Output Selector

• 8 Bit Latch contains 8 bits

• Now: only read 1 bit at a time

• Select the bit with an address

• Input: address

• Output: bit value

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 9: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

8Output Selector

DATA IN

DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W

WRITE

8-Bit SelectorADDRESS

OUT

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 10: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

9Output Selector

• Truth table

Address Output

A2 A1 A0 OUT

0 0 0 D00 0 1 D10 1 0 D20 1 1 D31 0 0 D41 0 1 D51 1 0 D61 1 1 D7

• What Boolean operation returns the correct value for address 000?

(NOT A2) AND (NOT A1) AND (NOT A0) AND D0

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 11: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

10Output Selector

• Full Boolean formula

( (NOT A2) AND (NOT A1) AND (NOT A0) AND D0 ) OR

( (NOT A2) AND (NOT A1) AND A0 AND D1 ) OR

( (NOT A2) AND A1 AND (NOT A0) AND D2 ) OR

( (NOT A2) AND A1 AND A0 AND D3 ) OR

( A2 AND (NOT A1) AND (NOT A0) AND D4 ) OR

( A2 AND (NOT A1) AND A0 AND D5 ) OR

( A2 AND A1 AND (NOT A0) AND D6 ) OR

( A2 AND A1 AND A0 AND D7 )

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 12: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

11Output Selector

AND

AND

AND

AND

AND

AND

AND

AND

A0A1A2

D7

D6

D5

D4

D3

D2

D1

D0

OR DATA OUT

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 13: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

12Input Decoder

• 8 Bit Latch allows 8 bits to be written at the same time

• Now: only write 1 bit at a time

• Select the bit with an address

• Input

– address– write flag– data bit

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 14: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

13Input Decoder

DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W

DATA IN

DATA OUT

ADDRESS

WRITE

3-to-8 Decoder

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 15: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

14Input Decoder

• Truth table

Address Output

A2 A1 A0 W7 W6 W5 W4 W3 W2 W1 W0

0 0 0 0 0 0 0 0 0 0 WRITE

0 0 1 0 0 0 0 0 0 WRITE 0

0 1 0 0 0 0 0 0 WRITE 0 0

0 1 1 0 0 0 0 WRITE 0 0 0

1 0 0 0 0 0 WRITE 0 0 0 0

1 0 1 0 0 WRITE 0 0 0 0 0

1 1 0 0 WRITE 0 0 0 0 0 0

1 1 1 WRITE 0 0 0 0 0 0 0

• What Boolean operation returns the correct value for output W0?

(NOT A2) AND (NOT A1) AND (NOT A0) AND WRITE

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 16: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

15Input Decoder

A0A1A2

W0WRITE

AND

AND

AND

AND

AND

AND

AND

AND

W1

W2

W3

W4

W5

W6

W7

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 17: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

168 Bit RAM

DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W DI

DO

W

DATA IN

8-Bit Selector

DATA OUT

ADDRESS

WRITE

3-to-8 Decoder

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 18: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

178 Bit RAM

• 8 Bit Random Access Memory (RAM)

• Input

– address– write flag– data bit

• Output

– data bit

DI

DO

W8x1 Bit RAM

A

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 19: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

188x2 Bit RAM

• 8x1 bit RAM allows read/write of 1 bit at a time

• What if we want to read/write 2 bits at a time?

(and ultimately 8 bits (1 byte) and more)

⇒ Arrange them together

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 20: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

198x2 Bit RAM

DI

DO

W8x1 Bit RAM

A DI

DO

W8x1 Bit RAM

A

DATA-OUT1DATA-OUT0

DATA-IN0 DATA-IN1ADDRWRT

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 21: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

208x2 Bit RAM

DI

DO

W A8x2 Bit RAM

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 22: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

218x2 Bit RAM

DI

DO

W A8x2 Bit RAM

322

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 23: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

2264 KB RAM

DI

DO

W A64Kx8 Bit RAM

1688

• 64KB = 65,536 bytes

• 16 bit address space (216 = 65536)

• Common memory size in the 1980s: we will use it with 6502 assembly

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 24: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

23Control Panel

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 25: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

24Memories

Early 1980s: 64 KB RAM, 16 bit address space

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019

Page 26: Memoryphi/csf/slides/lecture-memory.pdf64KB = 65,536 bytes 16 bit address space (216 = 65536) Common memory size in the 1980s: we will use it with 6502 assembly Philipp Koehn Computer

25Bigger Memories

• Early 1980s: 16 bit address space, up to 64 KB

• 1990s: 32-bit address space, up to 4 GB

• Today: 64-bit address space, up to 16 EB (exa-byte)

• Actually supported by Intel/AMD 64-bit processors

– 52 bits for physical memory: 4 peta-byte

– 48 bits for virtual memory: 256 tera-byte

• Actually existing RAM: my lab biggest RAM machine: 768 GB

(doubles every ∼2 years)

Philipp Koehn Computer Systems Fundamental: Memory 9 September 2019