+ All Categories
Home > Documents > Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced...

Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced...

Date post: 04-Jan-2016
Category:
Upload: dina-fitzgerald
View: 212 times
Download: 0 times
Share this document with a friend
25
Spring 2006 Lillevik 437s06- l16 1 University of Portland School of Engineering EE 437 Advanced Computer Architecture Lecture 16 Cache design example Data/tag Controller
Transcript
Page 1: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 1University of Portland School of Engineering

EE 437

Advanced ComputerArchitecture

Lecture 16

Cache design exampleData/tag

Controller

Page 2: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 2University of Portland School of Engineering

EE 437

Cache design example

• CPU: B2Logic model

• Memory– 256 x 8, RAM (no ROM)– 4X slower then cache, Rdy signal

• Cache: direct mapped, write-through– Data: 16 x 8, RAM (no delay)

– Tag: 16 x 4 RAM (no delay)

Page 3: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 3University of Portland School of Engineering

EE 437

System schematic

Page 4: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 4University of Portland School of Engineering

EE 437

General memory design

Main

Cache

Control

Driver

Driver

enable

enable

R/W#

R/W#

hit

System

Bus

Page 5: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 5University of Portland School of Engineering

EE 437

Memory system schematic

Page 6: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 6University of Portland School of Engineering

EE 437

RAM schematic

G1 initiates a memory

operation

Rdy indicates access time complete

Page 7: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 7University of Portland School of Engineering

EE 437

Cache block diagramTrw#

Crw#

Data

Address

Hit

A

DinDout

A

4

8

4

8

4

Dout

Din

4

R/W#

16 x 4 tag

16 x 8 cache

low

high

low

R/W#

Match4 high

Page 8: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 8University of Portland School of Engineering

EE 437

Cache schematic

tag

data

Page 9: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 9University of Portland School of Engineering

EE 437

Controller description

• Read hit: read cache data and drive it onto bus

• Write hit: write data/tag into cache and data into memory

• Read miss: read data from memory, drive it onto bus, write data/tag into cache

• Write miss: same as write hit (we will use this fact later in the design)

Page 10: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 10University of Portland School of Engineering

EE 437

State diagram

000

c

bd ReadyReady

Write

ReadHitReadMiss Ready

ReadyReset

Missing outputs

Page 11: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 11University of Portland School of Engineering

EE 437

Find states?

• a = 000, idle

• b = 001, write

• c = 010, read hit

• d = 100, read miss

Page 12: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 12University of Portland School of Engineering

EE 437

Find next state table?Read Write Hit Rdy PS NS

0 0 0 0 a a

1 a b

1 1 a c

1 0 a d

1 b a

0 b b

c a

1 d a

0 d d

Wr

RdHit

RdMiss

Page 13: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 13University of Portland School of Engineering

EE 437

Find output table?

State Ack Cben Crw# Mben Mrw# Mg1

0 Idle 0 0 1 0 1 0

b Write Rdy 0 0 0 0 1

c RdHit 1 1 1 0 1 0

d RdMiss Rdy 0 0 1 1 1

Page 14: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 14University of Portland School of Engineering

EE 437

Complete state diagram?

000

ReadyReady

Write

ReadHitReadMiss Ready

ReadyReset

Page 15: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 15University of Portland School of Engineering

EE 437

Controller schematic

Page 16: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 16University of Portland School of Engineering

EE 437

Program

• Write to memory– Address: 0x00, 0x10, 0x20, 0x30– Data: 0x11, 0x22, 0x33, 0x44

• Read misses, hits

Page 17: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 17University of Portland School of Engineering

EE 437

Find controller states?Instruction Access State

60011 Write-hit 1

61022 Write-miss 1

62033 Write miss 1

63044 Write miss 1

53000 Read hit 2

52000 Read miss 4

52000 Read hit 2

51000 Read miss 4

51000 Read hit 2

50000 Read miss 4

50000 Read hit 2

Page 18: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 18University of Portland School of Engineering

EE 437

Sample trace

Page 19: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 19University of Portland School of Engineering

EE 437

Sample trace, continued.

Page 20: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 20University of Portland School of Engineering

EE 437

Page 21: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 21University of Portland School of Engineering

EE 437

Find states?

• b = 001, write

• c = 010, read hit

• d = 100, read miss

Page 22: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 22University of Portland School of Engineering

EE 437

Find next state table?Read Write Hit Rdy PS NS

0 0 0 0 a a

1 a b

1 1 a c

1 0 a d

1 b a

0 b b

c a

1 d a

0 d d

Wr

RdHit

RdMiss

Page 23: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 23University of Portland School of Engineering

EE 437

Find output table?

State Ack Cben Crw# Mben Mrw# Mg1

0 Idle 0 0 1 0 1 0

b Write Rdy 0 0 0 0 1

c RdHit 1 1 1 0 1 1

d RdMiss Rdy 0 0 1 1 1

Page 24: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 24University of Portland School of Engineering

EE 437

Complete state diagram?

000

010

001100 ReadyReady

Write

ReadHitReadMiss Ready

Ready

Ack

Mrw#

Crw#

Cben

MbenAck=ReadyAck=Ready

Reset

Crw#

Page 25: Spring 2006 1 EE 437 Lillevik 437s06-l16 University of Portland School of Engineering Advanced Computer Architecture Lecture 16 Cache design example Data/tag.

Spring 2006

Lillevik 437s06-l16 25University of Portland School of Engineering

EE 437

Find controller states?Instruction Access State

60011 Write 1

61022 Write 1

62033 Write 1

63044 Write 1

53000 Read Hit 2

52000 Read Miss 4

52000 Read Hit 2

51000 Read Miss 4

51000 Read Hit 2

50000 Read Miss 4

50000 Read Hit 2


Recommended