The Gateway to Computer Science Excellence
+40 votes
9.1k views
A cache memory unit with capacity of $N$ words and block size of $B$ words is to be designed. If it is designed as a direct mapped cache, the length of the TAG field is 10 bits. If the cache unit is now designed as a 16-way set-associative cache, the length of the TAG field is ____________ bits.
in CO and Architecture by Veteran
retagged by | 9.1k views
+2

Length of the TAG field in k-way set associative = Length of TAG field in Direct Mapping + log base2(k)

                    = 10+log base2(16) =14

 

+4

$Direct-mapped:$

$Tag$ $Line-offset$ $Word-offset$
$10-bits$ $(log_{2}N-log_{2}B)-bits$ $(log_{2}B)-bits$

$16-way\ set\ associative\ cache:$

$Tag$ $Line-offset$ $Word-offset$
$x-bits$ $(log_{2}N-log_{2}B-4)-bits$ $(log_{2}B)-bits$

$10+(log_{2}N-log_{2}B)+(log_{2}B)=x+(log_{2}N-log_{2}B-4)+(log_{2}B)$

$x=14-bits$

10 Answers

–1 vote

No of TAG bits in Direct Map Cache : (No. of bits Required for Main Memory Address M)-(number of bits for index I+bits for offset O)

No of TAG bits in 16-way set associative : M -(set bits + offset bits)

number of bits for set : index bits - 4 // 16 way set associative

No of TAG bits in 16-way set associative : M -(index bits - 4 + offset bits)

   : (M-I-O)+4=10+4=14

 

 

by Active
–1 vote

Here we go

by
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,223 questions
59,817 answers
201,021 comments
118,089 users