in CO and Architecture
498 views
0 votes
0 votes
if in a question it ask for cache capacity the is it calculated by follwing...

cache capacity=cache size+ tag memory size+dirty bit

cache capacity=tag bits * no. of cache lines

which one is correct?
in CO and Architecture
498 views

2 Comments

both are correct.... formulas depends upon the question description
0
0

How both formula is correct?

Because to find the cache capacity we have

cache capacity = No. of cache lines * Line size

How tag bits can be used to identify the cache capacity

 

0
0

1 Answer

2 votes
2 votes

Cache Capacity = Number of lines $\times$ Bytes/Words per Line

Now what you are asking is Size of Cache tag directory,

Each Block/Line contains tag whether it is associative, direct or set-associative mapped cache. 

Hence, Size of Cache tag directory = Tag Bits $\times$ Number of Lines(Blocks)

If the question mentions that there are some extra information(valid, modified or replacement bits) along with tag then,

Size of Cache tag directory = (Tag Bits + Valid bits + Modified bits + Replacement Bits)  $\times$ Number of  Lines

 

 

Related questions