28
DRAM CONTROLLER CS/ECE 6810: Computer Architecture Mahdi Nazm Bojnordi Assistant Professor School of Computing University of Utah

DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

DRAM CONTROLLER

CS/ECE 6810: Computer Architecture

Mahdi Nazm Bojnordi

Assistant Professor

School of Computing

University of Utah

Page 2: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Overview

¨ Announcement¤ Homework 5 will be released on Nov. 13th

¨ This lecture¤ DRAM control¤ DRAM timing¤ DRAM hierarchy

n Channel, bank

Page 3: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Recall: DRAM Timing Example

¨ Access time¤ Row hit: tCAS

¤ Row empty: tRCD + tCAS

¤ Row conflict: tRP + tRCD + tCAS

Data Array

Row Buffer

X

Y

Requests

Cmd

Addr

Data

A

B

Rd

B

Data

Act

X

DatatCAS

Act

Y

tRP

tRC

A

Rd

tRCD

Pr

tRAS

B

Page 4: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

DRAM Channels

Improving Performance

Page 5: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Channels

¨ Memory channels provide fully parallel accesses¤ Separate data, control, and address buses

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Cmd

Addr

Data

Cmd

Addr

Data

Page 6: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Channels

¨ Memory channels provide fully parallel accesses¤ Separate data, control, and address buses

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Cmd

Addr

Data

Act

X

DatatCAS

A

Rd

tRCD

Cmd

Addr

Data

Page 7: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Channels

¨ Memory channels provide fully parallel accesses¤ Separate data, control, and address buses

Cmd

Addr

Data

Act

Y

DatatCAS

B

Rd

tRCD

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Cmd

Addr

Data

Act

X

DatatCAS

A

Rd

tRCD

Page 8: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Channels

¨ Memory channels provide fully parallel accesses¤ Separate data, control, and address buses

Cmd

Addr

Data

Act

Y

DatatCAS

B

Rd

tRCD

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Cmd

Addr

Data

Act

X

DatatCAS

A

Rd

tRCD Not scalable due to pin overhead

Page 9: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

DRAM Ranks

Improving Performance

Page 10: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Banks

¨ Memory banks provide parallel operations¤ Shared data, control, and address buses

¨ The goal is to keep the data bus fully utilized

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Bank 0 Bank 1

Page 11: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Banks

¨ Memory banks provide parallel operations¤ Shared data, control, and address buses

¨ The goal is to keep the data bus fully utilized

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Bank 0 Bank 1

Cmd

Addr

Data

Act

X

Data

A

Rd

Page 12: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Banks

¨ Memory banks provide parallel operations¤ Shared data, control, and address buses

¨ The goal is to keep the data bus fully utilized

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Bank 0 Bank 1

Cmd

Addr

Data

Act

X

Data

A

RdAct

Y

Data

B

Rd

Page 13: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Banks

¨ Memory banks provide parallel operations¤ Shared data, control, and address buses

¨ The goal is to keep the data bus fully utilized

RD BRD A

Requests

Data Array

Row Buffer

X

Y

AData Array

Row Buffer

X

Y B

Bank 0 Bank 1

Cmd

Addr

Data

Act

X

Data

A

RdAct

Y

Data

B

Rd

Shorter data transfer time to reduce bus conflictsDouble data rate vs. single rate

Page 14: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

DRAM Organization

¨ DRAM channels are independently accessed through dedicated data, address, and command buses¤ Physically broken down into DIMMs (dual in-line

memory modules)¤ Logically divided into ranks, which are a collection of

DRAM chips responding to the same memory request

Processor

Memory Controller

address/cmd

data (64-wire)

x8 x8 x8 x8 x8 x8 x8 x8

DIMM

Page 15: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Memory Controller

¨ Memory controller connects CPU and DRAM¨ Receives requests after cache misses in LLC

¤ Possibly originating from multiple cores

¨ Complicated piece of hardware, handles:¤ DRAM refresh management ¤ Command scheduling¤ Row-buffer management policies¤ Address mapping schemes

Page 16: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

DRAM Control Tasks

¨ Refresh management¤ Periodically replenish the DRAM cells (burst vs. distributed)

¨ Address mapping¤ Distribute the requests to destination banks (load balancing)

¨ Request scheduling¤ Generate a sequence of commands for memory requests

n Reduce overheads by eliminating unnecessary commands¨ Power management

¤ Keep the power consumption under a cap¨ Error detection/correction

¤ Detect and recover corrupted data

Page 17: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

DRAM Addressing

Page 18: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Address Mapping

¨ A memory request

¨ Address is used to find the location in memory¤ Channel, rank, bank, row, and column IDs

¨ Example physical address format

¨ A 4GB channel, 2 ranks, 4 banks/rank, 8KB page

AddressType Data

Row ID Channel ID Rank ID Bank ID Column ID

Page 19: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Address Mapping

¨ A memory request

¨ Address is used to find the location in memory¤ Channel, rank, bank, row, and column IDs

¨ Example physical address format

¨ A 4GB channel, 2 ranks, 4 banks/rank, 8KB page

AddressType Data

Row ID Channel ID Rank ID Bank ID Column ID

16 0 1 2 13

Page 20: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Start with empty row buffers, find the total number of commands if all the request are served in order

n Address= row(12):channel(0):rank(1):bank(3):column(16)

00000010

addr

20000001

40000100

60000010

40000101

Page 21: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Start with empty row buffers, find the total number of commands if all the request are served in order

n Address= row(12):channel(0):rank(1):bank(3):column(16)

00000010

addr

0 0 000 0010

rank bank row column

20000001

40000100

60000010

40000101

Page 22: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Start with empty row buffers, find the total number of commands if all the request are served in order

n Address= row(12):channel(0):rank(1):bank(3):column(16)

00000010

addr

0 0 000 0010

rank bank row column

20000001

40000100

60000010

40000101

0 0 200 0001

0 0 400 0100

0 0 600 0010

0 0 400 0101

Page 23: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Start with empty row buffers, find the total number of commands if all the request are served in order

n Address= row(12):channel(0):rank(1):bank(3):column(16)

00000010

addr

0 0 000 0010

rank bank row column

20000001

40000100

60000010

40000101

0 0 200 0001

0 0 400 0100

0 0 600 0010

0 0 400 0101

commands

Page 24: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Start with empty row buffers, find the total number of commands if all the request are served in order

n Address= row(12):channel(0):rank(1):bank(3):column(16)

00000010

addr

0 0 000 0010

rank bank row column

20000001

40000100

60000010

40000101

0 0 200 0001

0 0 400 0100

0 0 600 0010

0 0 400 0101

commands

ACT RD

PRE ACT RD

PRE ACT RD

PRE ACT RD

PRE ACT RD

Page 25: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Find the total number of commands using the following address mapping scheme

n Address= bank(3):rank(1):channel(0):row(12):column(16)

00000010

addr

20000001

40000100

60000010

40000101

Page 26: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Find the total number of commands using the following address mapping scheme

n Address= bank(3):rank(1):channel(0):row(12):column(16)

00000010

addr

20000001

40000100

60000010

40000101

0 0 000 0010

rank bank row column

0 1 000 0001

0 2 000 0100

0 3 000 0010

0 2 000 0101

Page 27: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Find the total number of commands using the following address mapping scheme

n Address= bank(3):rank(1):channel(0):row(12):column(16)

00000010

addr

20000001

40000100

60000010

40000101

0 0 000 0010

rank bank row column

0 1 000 0001

0 2 000 0100

0 3 000 0010

0 2 000 0101

commands

Page 28: DRAM CONTROLLER - University of Utah · 2019. 11. 13. · DRAM Organization ¨DRAM channels are independently accessed through dedicated data, address, and command buses ¤Physically

Example Problem

¨ Find the total number of commands using the following address mapping scheme

n Address= bank(3):rank(1):channel(0):row(12):column(16)

00000010

addr

20000001

40000100

60000010

40000101

0 0 000 0010

rank bank row column

0 1 000 0001

0 2 000 0100

0 3 000 0010

0 2 000 0101

commands

ACT RD

ACT RD

ACT RD

ACT RD

RD