Main Memory by J. Nelson Amaral Types of Memories - - PowerPoint PPT Presentation

main memory
SMART_READER_LITE
LIVE PREVIEW

Main Memory by J. Nelson Amaral Types of Memories - - PowerPoint PPT Presentation

Main Memory by J. Nelson Amaral Types of Memories Read/Write Memory (RWM): we can store and retrieve data. the time required to read or Random Access Memory (RAM): write a bit of memory is independent of


slide-1
SLIDE 1

Main ¡Memory ¡

by ¡J. ¡Nelson ¡Amaral ¡

slide-2
SLIDE 2

CMPUT 229

Types ¡of ¡Memories ¡

Read/Write Memory (RWM): the time required to read or write a bit of memory is independent of the bit’s location.

  • nce a word is written

to a location, it remains stored as long as power is applied to the chip, unless the location is written again. the data stored at each location must be refreshed periodically by reading it and then writing it back again, or else it disappears. we can store and retrieve data. Random Access Memory (RAM): Static Random Access Memory (SRAM): Dynamic Random Access Memory (DRAM):

slide-3
SLIDE 3

CMPUT ¡329 ¡-­‑ ¡Computer ¡OrganizaAon ¡and ¡ Architecture ¡II ¡ 3 ¡

StaAc ¡× ¡Dynamic ¡Memory ¡Cell ¡

Static Memory Cell (6 transistors) word line bit line Dynamic Memory Cell (1 transistor)

slide-4
SLIDE 4

CMPUT ¡329 ¡-­‑ ¡Computer ¡OrganizaAon ¡and ¡ Architecture ¡II ¡ 4 ¡

WriAng ¡1 ¡in ¡a ¡Dynamic ¡Memories ¡

To store a 1 in this cell, a HIGH voltage is placed on the bit line, causing the capacitor to charge through the on transistor.

word line bit line

slide-5
SLIDE 5

CMPUT ¡329 ¡-­‑ ¡Computer ¡OrganizaAon ¡and ¡ Architecture ¡II ¡ 5 ¡

WriAng ¡0 ¡in ¡a ¡Dynamic ¡Memories ¡

To store a 0 in this cell, a LOW voltage is placed on the bit line, causing the capacitor to discharge through the on transistor.

word line bit line

slide-6
SLIDE 6

CMPUT ¡329 ¡-­‑ ¡Computer ¡OrganizaAon ¡and ¡ Architecture ¡II ¡ 6 ¡

DestrucAve ¡Reads ¡

To read the DRAM cell, the bit line is precharged to a voltage halfway between HIGH and LOW, and then the word line is set HIGH. Depending on the charge in the capacitor, the precharged bit line is pulled slightly higher or lower. A sense amplifier detects this small change and recovers a 1 or a 0.

word line bit line

slide-7
SLIDE 7

CMPUT ¡329 ¡-­‑ ¡Computer ¡OrganizaAon ¡and ¡ Architecture ¡II ¡ 7 ¡

Recovering ¡from ¡DestrucAve ¡Reads ¡

The read operation discharges the capacitor. Therefore a read operation in a dynamic memory must be immediately followed by a write operation of the same value read to restore the capacitor charges.

word line bit line

slide-8
SLIDE 8

CMPUT ¡329 ¡-­‑ ¡Computer ¡OrganizaAon ¡and ¡ Architecture ¡II ¡ 8 ¡

¡ForgeTul ¡Memories ¡

The problem with this cell is that it is not bi-stable:

  • nly the state 0 can be kept indefinitely, when the

cell is in state 1, the charge stored in the capacitor slowly dissipates and the data is lost.

word line bit line

slide-9
SLIDE 9

CMPUT 229

Refreshing ¡the ¡Memory: ¡ ¡ Why ¡DRAMs ¡are ¡Dynamic ¡

Vcap ¡ 0V HIGH LOW VCC time 0 stored 1 written refreshes

The solution is to periodically refresh the memory cells by reading and writing back each one of them.

slide-10
SLIDE 10

IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR ¡ IN ¡ ¡ ¡OUT ¡ SEL ¡ WR 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 229

DRAM ¡High ¡Level ¡View ¡

Cols Rows 1 2 3 1 2 3 Internal row buffer DRAM chip addr data

2 / 8 /

Memory controller (to CPU)

Byant/O’Hallaron, ¡pp. ¡459 ¡

slide-16
SLIDE 16

CMPUT 229

DRAM ¡RAS ¡Request ¡

RAS = 2 Cols Rows 1 2 3 1 2 3 Internal row buffer DRAM chip Row 2 addr data

2 / 8 /

Memory controller

RAS ¡= ¡Row ¡Address ¡Strobe ¡

Byant/O’Hallaron, ¡pp. ¡460 ¡

slide-17
SLIDE 17

CMPUT 229

DRAM ¡CAS ¡Request ¡

Supercell (2,1) Cols Rows 1 2 3 1 2 3 Internal row buffer DRAM chip CAS = 1 addr data

2 / 8 /

Memory controller

CAS ¡= ¡Column ¡Address ¡Strobe ¡

Byant/O’Hallaron, ¡pp. ¡460 ¡

slide-18
SLIDE 18

Memory ¡Modules ¡

: Supercell (i,j)

31 7 8 15 16 23 24 32 63 39 40 47 48 55 56

64-bit double word at main memory address A addr (row = i, col = j) data 64 MB memory module consisting of 8 8Mx8 DRAMs Memory controller

bits 0-7 DRAM 7 DRAM 0 bits 8-15 bits 16-23 bits 24-31 bits 32-39 bits 40-47 bits 48-55 bits 56-63

64-bit doubleword to CPU chip

Byant/O’Hallaron, ¡pp. ¡461 ¡

slide-19
SLIDE 19

Step 1: Apply row address

1

Step 2: RAS go from high to low and remain low

2

Step 4: WE must be high

4

Step 3: Apply column address

3

Step 5: CAS goes from high to low and remain low

5

Step 6: OE goes low

6

Step 7: Data appears

7

Step 8: RAS and CAS return to high

8

Read Cycle on an Asynchronous DRAM

slide-20
SLIDE 20

CMPUT 229

Improved ¡DRAMs ¡

Central Idea: Each read to a DRAM actually reads a complete row of bits or word line from the DRAM core into an array of sense amps. A traditional asynchronous DRAM interface then selects a small number of these bits to be delivered to the cache/microprocessor. All the other bits already extracted from the DRAM cells into the sense amps are wasted.

slide-21
SLIDE 21

CMPUT 229

Fast ¡Page ¡Mode ¡DRAMs ¡

In a DRAM with Fast Page Mode, a page is defined as all memory addresses that have the same row address. To read in fast page mode, all the steps from 1 to 7 of a standard read cycle are performed. Then OE and CAS are switched high, but RAS remains low. Then the steps 3 to 7 (providing a new column address, asserting CAS and OE) are performed for each new memory location to be read.

slide-22
SLIDE 22

A Fast Page Mode Read Cycle on an Asynchronous DRAM

slide-23
SLIDE 23

CMPUT 229

Enhanced ¡Data ¡Output ¡RAMs ¡(EDO-­‑RAM) ¡

The process to read multiple locations in an EDO-RAM is very similar to the Fast Page Mode. The difference is that the output drivers are not disabled when CAS goes high. This distinction allows the data from the current read cycle to be present at the outputs while the next cycle begins. As a result, faster read cycle times are allowed.

slide-24
SLIDE 24

An Enhanced Data Output Read Cycle on an Asynchronous DRAM

slide-25
SLIDE 25

CMPUT 229

Synchronous ¡DRAMs ¡(SDRAM) ¡

A Synchronous DRAM (SDRAM) has a clock input. It operates in a similar fashion as the fast page mode and EDO DRAM. However the consecutive data is output synchronously on the falling/rising edge of the clock, instead of on command by CAS. How many data elements will be output (the length of the burst) is programmable up to the maximum size of the row. The clock in an SDRAM typically runs one

  • rder of magnitude faster than the access time for

individual accesses.

slide-26
SLIDE 26

CMPUT 229

DDR ¡SDRAM ¡

A Double Data Rate (DDR) SDRAM is an SDRAM that allows data transfers both on the rising and falling edge of the clock. Thus the effective data transfer rate of a DDR SDRAM is two times the data transfer rate of a standard SDRAM with the same clock frequency.

P-­‑H ¡473 ¡ ¡

A ¡Quad ¡Data ¡Rate ¡(QDR) ¡SDRAM ¡doubles ¡the ¡data ¡ transfer ¡rate ¡again ¡by ¡separaAng ¡the ¡input ¡and ¡

  • utput ¡of ¡a ¡DDR ¡SDRAM. ¡
slide-27
SLIDE 27

Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 27

Main ¡Memory ¡SupporAng ¡Caches ¡

  • Use ¡DRAMs ¡for ¡main ¡memory ¡

– Fixed ¡width ¡(e.g., ¡1 ¡word) ¡ – Connected ¡by ¡fixed-­‑width ¡clocked ¡bus ¡

  • Bus ¡clock ¡is ¡typically ¡slower ¡than ¡CPU ¡clock ¡

P-­‑H ¡471 ¡

slide-28
SLIDE 28

Improving ¡Memory ¡Bandwidth ¡

Baer p. 248

slide-29
SLIDE 29

SIMM ¡× ¡DIMM ¡

SIMM ≡ Single Inline Memory Module DIMM ≡ Dual Inline Memory Module Uses two edges of the physical connector → twice as many connections to the chip

slide-30
SLIDE 30

Memory ¡System ¡Example ¡

Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 30

Cache ¡ Memory ¡Bus ¡ Memory ¡

1 ¡bus ¡cycle ¡for ¡address ¡transfer ¡ 15 ¡bus ¡cycles ¡per ¡DRAM ¡access ¡ 1 ¡bus ¡cycle ¡per ¡data ¡transfer ¡

4-­‑word ¡cache ¡block ¡ 1-­‑word ¡wide ¡DRAM ¡

Miss ¡penalty ¡= ¡1 ¡+ ¡4×15 ¡+ ¡4×1 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡65 ¡bus ¡cycles ¡ Bandwidth ¡= ¡16 ¡bytes ¡/ ¡65 ¡cycles ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡0.25 ¡byte/cycle ¡

P-­‑H ¡471 ¡

slide-31
SLIDE 31

Example: ¡Wider ¡Memory ¡

Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 31

Cache ¡ Memory ¡Bus ¡ Memory ¡

1 ¡bus ¡cycle ¡for ¡address ¡transfer ¡ 15 ¡bus ¡cycles ¡per ¡DRAM ¡access ¡ 1 ¡bus ¡cycle ¡per ¡data ¡transfer ¡

4-­‑word ¡cache ¡block ¡

Miss ¡penalty ¡= ¡1 ¡+ ¡15 ¡+ ¡1 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡17 ¡bus ¡cycles ¡ Bandwidth ¡= ¡16 ¡bytes ¡/ ¡17 ¡cycles ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡0.94 ¡byte/cycle ¡

Wider ¡bus/memories ¡are ¡costly! ¡

P-­‑H ¡471 ¡

4-­‑word ¡wide ¡DRAM ¡

slide-32
SLIDE 32

Example: ¡Interleaved ¡Memory ¡

Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 32

Cache ¡ Memory ¡Bus ¡ 4-­‑word ¡cache ¡block ¡

Miss ¡penalty ¡= ¡1 ¡+ ¡15 ¡+ ¡4×1 ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡20 ¡bus ¡cycles ¡ Bandwidth ¡= ¡16 ¡bytes ¡/ ¡20 ¡cycles ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡ ¡= ¡0.8 ¡byte/cycle ¡

Bank ¡ Bank ¡ Bank ¡ Bank ¡

1 ¡bus ¡cycle ¡for ¡address ¡transfer ¡ 15 ¡bus ¡cycles ¡per ¡DRAM ¡access ¡ 1 ¡bus ¡cycle ¡per ¡data ¡transfer ¡

P-­‑H ¡471 ¡

slide-33
SLIDE 33

Split ¡–TransacAon ¡Bus ¡

Issue: Memory should not hold the processor-memory bus while it fetches the data to its buffers. Solution: Split-transaction bus

Phase 1: Processor sends address and operation type to bus, then releases the bus Phase 3: Memory controller requests the bus Memory sends the data into the bus. Release the bus Phase 2: Memory fetches data into its buffers. Example (load):

Phase 1 for access A can be in parallel with Phase 2 for access B

Baer p. 250

slide-34
SLIDE 34

Bank ¡Interleaving ¡and ¡Cache ¡ Indexing ¡

Cache Tag Cache Index Cache Displ. Bank Index Line Interleaving Page Interleaving Page Index Page Offset Issue: In both cases, cache Index

  • verlaps Bank Index

⇒ on a miss, the missing line is in the same bank as the replaced line. ⇒ full penalty for precharge, row and column access

Baer p. 249

slide-35
SLIDE 35

Bank ¡Interleaving ¡and ¡Cache ¡ Indexing ¡

Solution: bank rehash by XORing the k bits of the bank index with k bits of the tag.

Baer p. 250

slide-36
SLIDE 36

Memory ¡Controller ¡

Transactions do not need to be processed in order. Intelligent controllers optimize accesses by reordering transactions.

Baer p. 250

slide-37
SLIDE 37

Memory ¡Controller ¡

IpekISCA2008 p. 40

Why the controller’s job is difficult?

  • 1. Must obey more than 50 timing constraints
  • 2. Must prioritize requests to optimize performance

Scheduling decisions have long-term consequence: Future requests depends on which request is served first (which instruction is unblocked). Benefit of a scheduling decision depends on future processor behavior.

slide-38
SLIDE 38

Reinforcement-­‑Learning ¡Controller ¡

IpekISCA2008 p. 41

slide-39
SLIDE 39

Reinforcement-­‑Learning ¡Controller ¡

IpekISCA2008 p. 42

slide-40
SLIDE 40

Reinforcement ¡Learning ¡Controller ¡ Performance ¡

4-core system Peak BW: 6.4 GB/s In-­‑Order ¡ FR-­‑FCFS ¡ RL ¡ OpImisIc ¡ 26% ¡ 46% ¡ 56% ¡ 80% ¡ Bus Utilization:

IpekISCA2008 p. 42

slide-41
SLIDE 41

Online ¡RL ¡is ¡beker ¡than ¡offline ¡RL ¡

IpekISCA2008 p. 48

slide-42
SLIDE 42

Rambus ¡

Narrow and fast buses. Split transactions Separate row and column control lines 16 internal banks 400 MHz --- 1.6 GB/s Introduced in 1997 SDRAMs were at 100 MHz and had a peak of 0.4 GB/s 2010: 64-bit DDR DRAMs at 133 MHz ⇒ same peak

slide-43
SLIDE 43

Chapter 5 — Large and Fast: Exploiting Memory Hierarchy — 43

DRAM ¡GeneraAons ¡

Year Capacity $/GB 1980 64Kbit $1500000 1983 256Kbit $500000 1985 1Mbit $200000 1989 4Mbit $50000 1992 16Mbit $15000 1996 64Mbit $10000 1998 128Mbit $4000 2000 256Mbit $1000 2004 512Mbit $250 2007 1Gbit $50 P-­‑H ¡474 ¡

Access ¡Ame ¡to ¡a ¡new ¡row/column ¡(ns) ¡ Year ¡