This presentation is the property of its rightful owner.
Sponsored Links
1 / 213

第 4 章 存 储 器 PowerPoint PPT Presentation


  • 68 Views
  • Uploaded on
  • Presentation posted in: General

第 4 章 存 储 器. 4.1 概述. 4.2 主存储器. 4.3 高速缓冲存储器. 4.4 辅助存储器. 存储器的角色. 在现代计算机中,主存储器处于全机中心地位 当前计算机正在执行的程序和数据均存放在存储器中。 CPU 直接从存储器取指令或存取数据。 计算机系统中输入输出设备数量增多,数据传送速度加快,因此采用了直接存储器存取 (DMA) 技术和输入输出通道技术,在存储器与输入输出系统之间直接传送数据。 共享存储器的多处理机的出现,利用存储器存放共享数据,并实现处理机之间的通信,更加强了存储器作为全机中心的作用。. 存储器的挑战.

Download Presentation

第 4 章 存 储 器

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


5961286

4.1

4.2

4.3

4.4


5961286

    • CPU

    • (DMA)


5961286

  • Memory Wall


5961286

    • Memory Hierarchy

      • Cache


5961286

4.1

1.

(1)

TTL MOS

(2)

(3)

(4)


5961286

4.1

2.

(1)

(2)


5961286

RAM

RAM

RAM

MROM

PROM

ROM

EPROM

EEPROM

4.1

3.

Flash Memory

Cache


5961286

CPU

CPU

4.1

1.


5961286

2.

10 ns

20 ns

200 ns

ms

CPU

4.1


5961286

MDR

MAR

4.2

1.


5961286

MDR

CPU

MAR

4.2

2. CPU


5961286

0

0

0

1

2

3

1

0

4

2

4

5

6

7

3

2

8

4

8

9

10

11

5

4

4.2

3.

24

224 = 16 M

16

8 M

32

4 M


5961286

4.2

4.

(1)

(2)

(3)

/


5961286

    • 600~700/TB

    • 200/GB

    • SRAM400/256KB


5961286

/

4.2

1.

10

4

1K4

14

1

16K1

13

8

8K8


5961286

1.

CS

/

CE

WE

WE

OE

4.2

/


5961286

8

16K 1

8

16K 1

8

16K 1

8

16K 1

65 535 8

4.2

16K 1 64K 8

32


5961286

0,0

0,0

0,7

0,7

0

A

3

0

0

0

A

168

2

0

A

1

15,0

15,7

15

0

A

0

0

0

7

7

/

/

/

/

D

D

D

D

7

7

0

0

4.2

2.

(1)


5961286

0

0,0

0,0

0,31

0,31

0

X

0

X

A

A

4

3

3232

0

A

2

0

31,0

31,31

31,0

A

X

1

0

31

A

D

D

0

I/O

I/O

Y

Y

Y

0

31

/

A

A

A

A

A

0

0

0

0

0

6

9

8

7

5

4.2

(2)

0,0


5961286

T

T

~

1

4

T

T

T

T

T

T

7

7

5

8

8

6

A

A

A

A

T1 ~ T4

T5

T6

T

T

7

8

DOUT

DIN

4.2

( RAM )

1. RAM (SRAM)

(1) RAM

T1 ~ T4

A

A


5961286

A

A

A

T1 ~ T4

T5

T6

T5T6

A

T7T8

VA

T6

T8

T7

T8

DOUT

DOUT

DOUT

DIN

4.2

RAM


5961286

A

A

A

A

T1 ~ T4

T1 ~ T4

T5

T6

T5T6

T7T8

T7

T8

DIN

DOUT

A

DIN

T7

T5

DIN

T8

T6

A

DIN

RAM


5961286

WE

CS

A

I/O

9

1

A

I/O

8

2

I/O

3

Intel 2114

I/O

4

A

0

VCC

GND

(2) RAM

Intel 2114

1K4


5961286

A8

0

A7

0

15

16

31

32

47

48

63

A6

1

A5

A4

63

A3

0

15

16

31

32

47

48

63

A9

0

A2

A1

15

A0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

16

32

48

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

WE

CS

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

16

32

48

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

15

16

31

32

47

48

63

0

16

32

48

Intel 2114 RAM (64 64)

0

0

0

0

16

32

48

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)

0

16

32

48


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O1

I/O2

I/O2

I/O3

I/O3

I/O4

I/O4

WE

CS

Intel 2114 RAM (64 64)

0

16

32

48


5961286

A8

0

A7

0

15

16

31

32

47

48

63

A6

1

A5

A4

63

A3

0

15

16

31

32

47

48

63

A9

0

A2

A1

15

A0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O2

I/O3

I/O4

WE

WE

CS

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O1

I/O2

I/O2

I/O3

I/O3

I/O4

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O1

I/O2

I/O2

I/O3

I/O3

I/O4

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O1

I/O2

I/O2

I/O3

I/O3

I/O4

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O1

I/O2

I/O2

I/O3

I/O3

I/O4

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

0

0

0

0

16

32

48

0

15

16

31

32

47

48

63

0

15

16

31

32

47

48

63

0

1

0

0

63

0

0

15

16

31

32

47

48

63

0

16

32

48

0

0

0

15

0

0

I/O1

I/O1

I/O2

I/O2

I/O3

I/O3

I/O4

I/O4

WE

CS

Intel 2114 RAM (64 64)


5961286

t

t

t

t

t

RC

OTD

OHA

CO

A

A

CS

D

OUT

tRC

tA

tOTD

tOHA

tCO

(3) RAM


5961286

t

t

t

t

t

WR

DH

WC

W

AW

A

CS

WE

D

OUT

t

DW

D

IN

tWC

tAW

tDHWE

tWR

tDW

WE

tW WE

(4) RAM (2114)


5961286

SRAM

    • 409614096

    • 1640961409616


5961286

SRAM


5961286

SRAM

    • CPU


5961286

SRAM

    • n2n

    • n4 241616


5961286

SRAM

      • 3-84-16

8+8=168X8


5961286

SRAM

    • X/Y

    • n22n/2

    • 2n/22n/2=2n

    • n=12212=4096226=128

n


5961286

SRAM

/

I/O

X


5961286

10

4

CS

WE

SRAM

2114

  • 2114SRAM1K4

    • /cs/we

    • /cs/we

    • /cs

A9A0

D3D0


5961286

SRAM

    • 410246416

    • 6-644-16


5961286

MOS

W

(1) 10

(2)

(3) MOS

Z

T

CS

CD


5961286

V

V

DD

DD

T2

T2

T

T4

T1

T1

T3

T3

1

0

1

0

1

0

1

C

C

s

g

4.2

2. RAM ( DRAM )

(1) RAM

T

1

CS 1 0


5961286

0

0

A9

0

0

A8

1

0

A7

1

0

A6

31

31

0

A5

D

D

0

0

0

1

31

0

0

0

0

0

0

A4

A0

A3

A2

A1

(2) RAM

4.2

RAM (Intel 1103)


5961286

0

A9

0

A8

1

1

A7

A6

31

31

A5

D

0

1

31

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

0

1

31

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

0

1

31

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

0

1

31

0

0

0

0

1

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

1

0

1

31

1

1

0

0

0

0

1

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

D

0

1

31

1

0

0

0

0

1

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

D

0

1

31

1

0

0

0

0

1

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

D

0

1

31

1

0

0

0

0

1

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

1

0

A9

0

1

A8

1

1

1

A7

1

A6

31

31

1

A5

D

D

0

1

31

1

0

0

0

0

1

A4

A0

A3

A2

A1

4.2

RAM (Intel 1103)


5961286

RAS

CAS

WE

'

'

A

A

6

6

~

~

DIN

DIN

'

'

A

A

0

0

I/O

DOUT

DOUT

RAM 4116 (16K 1)


5961286

0

C

128

s

1

127

/

C

s

0

63

64

127

128

D

D

OUT

OUT

D

I/O

I/O

IN

4116 (16K 1)

0

0

0

63


5961286

4.2

0

C

128

s

1

127

/

C

s

0

63

64

127

128

D

OUT

D

D

I/O

I/O

I/O

IN

IN

4116 (16K1)

0

63


5961286

RAS

RAS

WE ()

WE ()

CAS

CAS

4.2

(3) RAM

DIN

DOUT


4 dram

(4) DRAM

  • 1

  • 2ms


5961286

    • 2ms


5961286

1024200ns2ms 10 000 1024 8976(2ms/200ns)-1024=8976


5961286

/tRC100ns200ns2ms10000


5961286

2ms

12815.6sCPU

DMA


5961286

4000-32=3968R/W

32

  • 10243232500ns500ns3232

2ms/500ns=4000


5961286

0

1

31

32s

  • 10243232500ns500ns3232

500ns500ns1s


5961286

  • 10243232500ns500ns3232

2ms3232

2ms/32=62.5s

62s

0.5s

62.5s

2ms


5961286

  • CPU


5961286

DRAM

SRAM

4.2

3. RAM RAM


5961286

(RAM)

  • SRAM

  • DRAM

    • MOS


Dram sram

DRAMSRAM

DRAM

1.SRAM4SRAMSRAM4

2.DRAMSRAM1/4

3.DRAMSRAM1/6

DRAM

1.SRAM

2.DRAM

DRAM SRAM


5961286

  • DRAM

  • EDO RAMExtended Data Out RAM

  • BEDO RAMBurst

  • SDRAMSynchronous DRAMEDO50%

  • DDRDual Data RateSDRAM IISDRAMSDRAM2

  • CDRAM(Cached)SDRAMDRAMDRAM

  • RDRAM(Rambus DRAM)


5961286

VCC

0

1

ROM

1. ROM ( MROM )

MOS 1

MOS 0

2. PROM ()


5961286

SiO

S

G

D

G

2

D

S

G

_ _ _

D

+ + + + +

S

P

+

+

N

N

D

S D 0

D

S D 1

3. EPROM ( )

(1) N MOS


5961286

DO0

DO7

VCC

A7

1

24

PD/Progr

PD/Progr

A8

A9

CS

VPP

A10

CS

Y

A10

Y

2716

A7

A1

PD/Progr

A0

A6

DO7

DO0

X

DO1

DO2

128 128

VSS

12

13

DO3

A0

/

PD/Progr

(2) 2716 EPROM


5961286

4. EEPROM ( )

5. Flash Memory ()

EPROM

EEPROM

EEPROM

RAM


5961286

  • CSCS/

  • /WE01

CPU

  • RAM

    RAMRAM

    • Ai

    • Di


5961286

1RAM16K8

1

2

116K=2141488

14 + 8 + 1 + 1 + 1 + 1 = 26

/

20000H~3FFFH

01


5961286

Vcc A7 A8 A9 D0 D1 D2 D3 WE

18

10

21141K4

1

9

A6 A5 A4 A3 A0 A1 A2 CS GND

  • SRAM21141K4

A9A0

D3D0/

= 0

CS

= 1

= 0

WE

= 1


5961286

1

()

()

()

//


5961286

(1)

10

A

9

8

A

0

2114

2114

CS

D

7

WE

D

4

D

0

1.

2

1K4 1K8


5961286

8K1RAM8K8

8


8k 1 ram 8k 8

CS

WE

A0

A12

D0

D7

8K1RAM8K8

I/O

I/O

I/O

I/O

I/O

I/O

I/O

8K1

I/O


5961286

64K1b64K8b64KB

= 8

16A0 A15

8A15A0CPUA15A088CPUD7D0

CPU168 CPU /8


5961286


5961286

  • <

  • CS


5961286

11

8

A10

1

A9

A1

A0

CS0

CS1

1K 8

1K 8

D7

D0

WE

(2)

2

1K8 2K8


5961286

16K8RAM64K8

64K16K44RAM

2


16k 8 ram 64k 8

CS

WE

CS

WE

CS

WE

CS

WE

CS

WE

16K8RAM64K8

10


5961286

64K8b512K8b512KB

= 8

16A0 - A1520

A0-A19

8A15A0CPU20

A15 A0

4 A16 A19

16888

88CPUD7D0


5961286

  • :


5961286

M N

L K

  • MNLK


5961286

12

8

A11

A10

CS0

CS1

CS2

CS3

A9

A8

...

A0

1K4

1K4

1K4

1K4

1K4

1K4

1K4

1K4

D7

D0

WE

(3)

1K4 4K8

8


5961286

2. CPU

(1)

(2)

(3) /

(4)

(5)

(6)


5961286

1 2K8

0 1 1 0

0 1 1 0

0 0 0 0

1 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

ROM

2K8

0 1 1 0

0 1 1 0

0 1 1 1

1 0 1 1

1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1

1K8

RAM

21K4

4.1:

(1)

A15A14A13 A11 A10 A7 A4 A3 A0

(2)


5961286

A15 A13 A11 A10 A7 A4 A3 A0

1 ROM

0 1 1 0

0 1 1 0

1 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

2K8

0 1 1 0

0 1 1 0

0 1 1 1

1 0 1 1

1 1 1 1

1 1 1 1

1 1 1 1

1 1 1 1

2RAM

1K4

C

B

A

(3)

A10~ A0 2K8 ROM

A9 ~ A0 1K4 RAM

(4)


5961286

A14

G1

Y5

G2A

A15

&

G2B

A13

MREQ

C

Y4

A12

B

A11

A

A10

A9

A0

2K8

PD/Progr

1K4

1K4

ROM

RAM

RAM

D7

D4

D3

D0

WR

4.1 CPU


5961286

4.2 4K

8K

(1)

(2)

1 4K8 ROM 2 4K8 RAM

(3)

A11~ A0 ROM RAM

(4)


5961286

4.3 CPU 20 8

IO/M RD

WR 2764 EPROM ( 8K 8 ),

A12

A0

CE

CE

OE

PGM

OE

PGM

D7

D0

138 CPU 2764 F0000H~FFFFFH ,

2764


2114 1k 4 sram 4k 8

21141K4SRAM4K8

4

21141K4SRAM4K8

1

2

3


2114 1k 4 sram 4k 81

21141K4SRAM 24

2CS4CS

21141K4SRAM4K8

1.

=48/ 14=8

21K4

1K8

8

41K8

4K8


2114 1k 4 sram 4k 82

21141K4SRAM4K8

2.

()

4KB16(64KB


2114 1k 4 sram 4k 83

64KB

1K4

1K4

1K4

1K4

1K4

1K4

1K4

1K4

21141K4SRAM4K8

A11 A10 A9A0

0 0 0 0

0 0 1 1

0 1 0 0

0 1 1 1

4KB

1 0 0 0

12

1 0 1 1

1 1 0 0

A11A0

1 1 1 1

21141K410A0~A9


5961286

21141K4SRAM4K8

1K

A9A0

CS0

A11A10

1K

A9A0

CS1

A11A10

1K

A9A0

CS2

A11A10

1K

A9A0

CS3

A11A10

000H~FFFH

4

000H~3FFH

400H~7FFH

800H~BFFH

C00H~FFFH


2114 1k 4 sram 4k 84

11

10

01

00

21141K4SRAM4K8

3.

1

2

3

4


5961286

  • 4K82KEPROM27162K82KSRAM21141K4/A15A0D7D0


5961286

  • 1271642114

  • 8

    • 1/A11

    • 2A11/A10

    • 3A11A10

4K8

2K8

1K4 1K4

1K4 1K4

0000

07FF

0800

1K8

0BFF

1K8

0C00

0FFF


5961286

    • 4K12A15~A12

    • 10000~07FFA10~A0A110A111/A11

    • 20800~0BFFA9~A0A111 A100A11 /A10

    • 30C00~0FFFA9~A0A111 A101A11 A10


5961286

2K8

1K4 1K4

1K4 1K4

0000

    • 111A10A0 A11

    • 2310A9A0A11A10

07FF

0800

0BFF

0C00

0FFF


5961286

D7~4

D3~0

R/W

2716

2114

2114

CS0

CS2

CS1

2114

2114

A10~0

A9~0

A9~0

A11

A11

A10

A11

A10


5961286

    • /CS

    • 8ROMRAM21144D7D4D3D08

    • /R/W2716R/WR/WRAM2114


5961286

ROMWE

RAM

8K8ROM8K4RAMRAM2000H~7FFFHROMC000H~FFFFHCPU


5961286

1.

RAM 0010 0000 0000 0000

0010 0000 0000 0000

RAM8K=213

0111 1111 1111 1111

0111 1111 1111 1111

A15A14A13001~011RAM8K3=24K

8K4RAM6

ROM=FFFFH C000H=3FFFH

ROM214=16K8K8ROM2

ROM

1100 0000 0000 0000

1111 1111 1111 1111

A15A14A13110~111


5961286

64KB

8K4

8K4

8K4

8K4

1 1 1

1 1 1

0 1 1

0 1 1

0 1 0

0 1 0

8K4

8K4

8K8

8K8

CS2 A15A14A13

CS1 A15A14A13

CS6 A15A14A13

CS3 A15A14A13

A15A14A13A12A0

0 0 1 0 0

RAM

40KB

16

0 0 11 1

1 1 00 0

ROM

1 1 01 1

A15A0

3:874LS138

CS7 A15A14A13


5961286

L 1 = D + C ( DC )

L = 3

1 .

L

D

C


5961286

2i ( i = 012 3 )

2 .

2kn + k + 1


5961286

C1 g1 1357911

C2 g2 23671011

C4 g3 45671213

C8 g4 8910111213141524

Ci

gi 2i1

gi gj 2i1 + 2j1

gigj gl 2i1 + 2j1 + 2l1


5961286

1 2 3 4 5 6 7

0

1 0 1

4.4

0101

n = 4

2k n + k + 1

k = 3

:

C1 C2 C4

0

1

0

0101 0100101


5961286

1 2 3 4 5 6 7

C1= 3 5 7 = 1

0

0 1 1

C2= 3 6 7 = 0

C4= 5 6 7 = 0

1

0011

n = 4 2k n + k + 1

k = 3

C1 C2 C4

1 0 0

0011 1000011


5961286

P1 = 1 3 5 7

P2 = 2 3 6 7

P4 = 4 5 6 7

3.

Pi

3 k = 3

P4 P2 P1

k = 3 Pi

C1

C2

C4

P1= 0P2 = 0P4 = 0


5961286

0100111

?

P1= 1 3 5 7 = 0

P2= 2 3 6 7 = 1

P4= 4 5 6 7 = 1

4.5

P4P2P1 = 110

6 0100101

0101


5961286

0101101

P4 = 4 5 6 7 = 1

P2 = 2 3 6 7 = 0

P1 = 1 3 5 7 = 0

3

0011

2

4

P4 P2 P1 = 100

0101011


5961286

W

W

W

W

W

. . .

. . .

  • Cache

1.


5961286

M0

M1

M2

M3

00 0000

01 0000

10 0000

11 0000

00 0001

01 0001

10 0001

11 0001

00 1111

01 1111

10 1111

11 1111

2.

(1)


5961286

M0

M1

M2

M3

n

2n

3n

0

n+1

2n+1

3n+1

1

n1

2n1

3n1

4n1

(1)


5961286

M0

M1

M2

M3

0000 00

0000 01

0000 10

0000 11

0001 00

0001 01

0001 10

0001 11

1111 00

1111 01

1111 10

1111 11

(2)


5961286

M0

M1

M2

M3

0

1

2

3

5

6

7

4

4n4

4n3

4n2

4n1

(2)


5961286

0

1

2

3


5961286

T T 4

4 T(41)


5961286

Q

Q

CM

(3)

CPU


5961286

3.

(1) SDRAM ( DRAM)

CPU

(2) RDRAM

Rambus

(3) CacheDRAM

DRAM SRAM Cache


5961286

CPU

4.3

1.

CPU

CPU DRAM


5961286

Cache

0

0

0

0

1

1

1

1

2c1

2m1

M1

C1

~

~

~

~

~

~

~

~

n

m

b

c

b

M

C

B

B

2. Cache

4.3

(1)

B


5961286

C

M

4.3

(2)

M >> C


5961286

4.3

(3) Cache

CPU Cache

Cache

4 ~ 8

CRAY_1 16 16

IBM 370/168 4 4

644=256


5961286

Cache

e = 100%

tc

e = 100%

htc+ (1h) tm

4.3

(4) Cache

e

Cache h Cache tc

tm


5961286

4.3

3. Cache

CPU

Cache

Cache

Cache


5961286

CPU

Cache

Cache

CPU

CPU

Cache

4.3

4. Cache


Cache

4 -40 cache

Cache

    • CPUCache/

    • Cache

    • CPUCache

Cache

Cache


5961286

4. Cache

4.3

Cache

  • Write through

Cache

  • Write back

Cache

Cache

Cache

Cache

Cache


5961286

4.3

5. Cache

(1) Cache

Cache

Cache

(2)

Cache

Cache

Pentium 8K Cache 8K Cache

PowerPC620 32K Cache 32K Cache


Cache1

Cache

  • CPU

    • Temporal Locality

    • Spatial Locality


Cache2

Cache

  • Pareto principle80/2080%20%

  • 80%20%90%10%20%80%


Cache3

4 -40 cache

Cache

  • Cache

    • SRAM

    • CPUCache

    • Cache


Cache4

Cache

    • Cache

    • Cache

    • //

Cache


Cache5

Cache

Cache

?


5961286

t

Cache

0

0

0

0

0

1

*

1

1

2c1

2c

2c

2c1

2c1

t

2c+1

=

2c+11

Cache

2c+1

2c+1

=1

c

b

t

2m1

m

4.3

Cache

1.

i = jmodC

i

j


Cache6

Cache

  • 1MB2048Cache8KBCache

    • 1MB512BCache8KB512B16

    • 2048/16=1281620947


5961286

i = j mod nCache

Cache

Tag

CacheCache

BS

102416101024

1110245

31018


5961286


5961286

Cache

Cache

Cache

Cache


5961286

4-1Cache53CPU8

000101100001101000010110000110100001000000000 0110001000000010010

Cache

1 Cache


5961286

Cache110N00010110Cache 110Cache110Y00010Cache00010110

2 0010110

Y

00010

00010110


5961286

Cache010

N00011010Cache

010Cache010Y

00011Cache00011010

300011010

Y

00011

00011010


5961286

4 00010110CacheCache

5 00011010CacheCache


5961286

Cache000

N00010000Cache

000Cache000Y

00010Cache0001000

6 00010000

Y

00010

00010000


5961286

Cache011

N00000011Cache

011Cache011Y

00000Cache

7 00000011

Y

00000

00000011


5961286

800010000CacheCache


5961286

900010010

Cache0100001100010

0001001000011010

00010Cache

00010

00010010


5961286

CacheCache


5961286

Cache

m=t+c

0

0

0

1

1

2c1

2c1

2m1

m = t + c

b

4.3

2.


Cache7

Cache

  • 1MB2048Cache8KBCache

    • 1MB512B20119

    • Cache8KB512B169

    • Cache11


5961286


5961286

CacheCPUCache

Cache

CacheCache

CacheCache

Cache

Cache

Cache


5961286

Cache

Cache

Cache


5961286

Cache8Cache3CPU8

0001011000011010000101100001101000010000000000110001000000010010

Cache

8

222622261631618,Cache4-1

Cache4-198

Cache8418

mod 8 = 26 mod 8


5961286

18


5961286

Cache4-208Cache

22

22

26

22

26

22

26

22

26

16

22

26

16

3

22

26

16

3

22

26

16

3

18


5961286

Cache

Qr = 1)

0

0

0

0

0

1

1

1

2

3

1

2c-r

1

2c-r

2c-r

2c-r1

2c2

2c1

2c-r +1

q =cr

b

s = t + r

2c-r+1

2c-r+1

m

2m1

4.3

3.

i = jmodQ

j Q i


Cache8

Cache

  • 1MB2048Cache8KBCache 22Cache

    • 1MB512BCache8KB512B168

    • 2048/8=256209 3 8


5961286

Cache

Cache

Cache


5961286

Cache

Cache


5961286

CacheCacheCache

Cache

Cache

CacheCache

Cache


5961286

Cache8Cache34-21CPU8 0001011022000110102600010110220001101026000100001600000011300010000160001001018

Cache

100010 11 022

85000102110

Cache822Cache30Cache6Cache6110000100


5961286

22


5961286

0 0 0 1 0

0


5961286

(2)0001101 026, 2610

Cache2

26


5961286

00011

0


5961286

(3) 00010 11 0 22

3 Cache6

000100 Cache,

Cache 110

(4) 00011 01026

100011Cache


5961286

50000100016

Cache00Cache0

6000000113

11011

Cache3

16

16

26

3

22


5961286

700010 00 016

02Cache

800010 01 018

Cache10326103

10FIFO

18


5961286

4

1

Cache(1)


5961286

CacheCache


5961286

4.3

1. FIFO

2. LRU


5961286

(1)

Dt

Db

(2)

(3)

(4)

(5)

4.4

1.

CPU

2.

C = n k s

+

Dr=Db V


5961286

I

I

N

S

S

N

0

1

4.4

1.


5961286

N

S

S

N

f

f

s

s

e

e

t

t

0

1

4.4

1.


5961286

T

0

1

1

1

0

0

0

1

0

RZ

NRZ

NRZ1

PM

FM

MFM

4.4

2.


5961286

0

1

1

0

0

1

0

4.4

NRZ1


5961286

4.4

1.

(1)

(2)

2.


5961286

4.4

(1)


5961286

4.4

(2)

(3)


5961286

4.4

1.


5961286

/

/

4.4

2.


5961286

4.4

1.

2.


5961286

  • :()

    • :

    • :

  • :()

    • :.

    • :

  • CPU


5961286


5961286

    • -


5961286

Cache

Cache


5961286


5961286

    • CPU324G


5961286

  • Cache

    • ----


  • Login