Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 8

Memory Map

Function

Oleh :
Setiawardhana, ST
Buku : Computer Organization
V.Carl Hamacher
McGraw-Hill International

Direct Mapping
Memory

Address terbagi menjadi 3 bagian

Tag
Block
Word
Contoh

Cache Memory = 2 K 128 blok


(0-127)
Main Memory = 64K 4096 blok
(0-4095)
Bagaimana Mapping berdasar Direct Map ?

Main Memory
64K
Block 0

16

WORD
Block 0 : 0,128,256,512, etc
Block 1 : 1,129,257,513, etc
Cache
2K
Block 0

Block 1
TAG 0
Block 127
Block 128

Block 1

Block 129
TAG 1
Block 127
Tag
5

Block
7

Word
4

4096 blok /128 blok=32


Tag

4096/128=
32
12
7
5

2 /2 2

Block 255
Block 256
Main
Memory
Block 257
s/d
Block4095

TAG 32

Assositive Mapping
Cost

is Higher than Direct Map ?

Need search 128 pattern to determine wheter a


given blocks is in the cache
Search Type ?

Search

type : Assosiative Search


Tags must be search in parallel
Important !

Tags of bit addr receive from Main Memory


Freedom choose location cache ?
Efficiently
Replace

/ eject an existing block only if cache is

full

Main Memory
64K
Block 0

16

WORD

Block 1

Block 0 : 0,64,128,,4032
Block 1 : 1,65,129,,4033
Cache
2K
Block 0

Block 127
Block 128

Block 1

Block 129

Block 127
Tag
Main
Memory

Word

12

Block 255
Block 256
Block 257

64 K /16 word = 4095

2 /2 2
16

12

Block4095

Set Assosiative Mapping


Cache

: 2 block per set


Memory blocks : 0,64,128,..,4032 map
into cache memory set 0
Having 64 sets means (6 bit)
Important !
Combination Direct and Assosiative ?
Extreme condition :
128

block per set : no set bit


One block per set is direct mapping method

Main Memory
64K
Block 0

16

WORD
Block 0 : 0,128,256,512, etc
Block 1 : 1,129,257,513, etc
Cache
2K
Block 0
Set 0
Block 1

Set 0

Block 1

Block 63
Block 64

Set 0

Block 65
Set 63
Block 127
Tag
6

Set
6

Word
4

Block 127
Block 128
Main
Memory
Block 129

4096 blok /128 blok= 64


Tag

4096/64=6
4 12
6
6

2 /2 2

Block4095

Set 0

MEMORY MAPPING QUESTION


Terangkan

tentang:

Apa yang anda ketahui

Direct Mapping
Assosiative Mapping
Set Assosiative Mapping

Jelaskan

dengan gambar dan


perhitungan!

You might also like