Cache I-Assembly Language, Microprocessors and Computer Architecture-Lecture Slides, Slides of Computer Architecture and Organization

Assembly language is about computer basic operations. Its used in Computer Architecture. It also being used in Microprocessors. This lecture was delivered by Prof. Vishakha Ahuja at Guru Ghasidas University. It includes: Location, Capacity, Transfer, Access, Performance, Physical, Organization, Random, Associative, Internal, External

Typology: Slides

2011/2012

Uploaded on 08/03/2012

amritkala
amritkala 🇮🇳

4.4

(17)

91 documents

1 / 34

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Cache
zSmall amount of fast memory
zSits between normal main memory and
CPU
zMay be located on CPU chip or module
docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22

Partial preview of the text

Download Cache I-Assembly Language, Microprocessors and Computer Architecture-Lecture Slides and more Slides Computer Architecture and Organization in PDF only on Docsity!

Cache z^ Small amount of fast memory z^ Sits between normal main memory andCPU z^ May be located on CPU chip or module

Cache/Main Memory Structure

Cache Read Operation - Flowchart

Typical Cache Organization

Size does matter z^ Cost^ z^ More cache is expensive z^ Speed^ z^ More cache is faster (up to a point)^ z^ Checking cache for data takes time

Mapping Function z^ Cache of 64kByte z^ Cache block of 4 bytes^ z^ i.e. cache is 16k (

14 ) lines of 4 bytes

z^ 16MBytes main memory z^ 24 bit address^24 z^ (2^ =16M)

Direct Mapping Address Structure^ Tag s-r^ z^ 24 bit address^ z^ 2 bit word identifier (4 byte block)^ z^ 22 bit block identifier^ z^ 8 bit tag (=22-14)^ z^ 14 bit slot or line^ z^ No two blocks in the same line have the same Tagfield^ z^ Check contents of cache by finding line and checkingTag

Line or Slot r^

Word w 8

14

Direct Mapping Cache Line Table^ z^ Cache line^

Main Memory blocks held z^0

s0, m, 2m, 3m…2-m z^1

s1,m+1, 2m+1…2 -m+ z^ m-^

m-1, 2m-1,3m-1…

s-1 docsity.com

Direct Mapping Example

Direct Mapping Summary z^ Address length = (s + w) bits z^ Number of addressable units = 2

s+w^ words or bytes z Block size = line size = 2

w^ words or bytes z^ Number of blocks in main memory = 2

s+ w^ w^ s/2= 2^ z Number of lines in cache = m = 2

r z^ Size of tag = (s – r) bits

Associative Mapping z^ A main memory block can load into anyline of cache z^ Memory address is interpreted as tag andword z^ Tag uniquely identifies block of memory z^ Every line’s tag is examined for a match z^ Cache searching gets expensive

Tag^ 22 bit^

Word2 bit

Associative Mapping Address Structure z^ 22 bit tag stored with each 32 bit block of data z^ Compare tag field with tag entry in cache to checkfor hit z^ Least significant 2 bits of address identify which 8bit word is required from 32 bit data block

docsity.com

Associative Mapping Example

Associative Mapping Summary^ z^ Address length = (s + w) bits^ z^ Number of addressable units = 2

s+w^ words or bytes z Block size = line size = 2

w^ words or bytes z^ Number of blocks in main memory = 2

s+ w^ w^ s/2= 2^ z Number of lines in cache = undetermined z Size of tag = s bits