746 views
2 votes
2 votes

Consider a 32 bit processor that has  an on chip 16Kbyte 4 way set associative cache. assume that cache has a size of four 32 bit words. the set no in the cache to which the word from memory location FFFAE8FA is mapped_________

1 Answer

Best answer
2 votes
2 votes

32 bit processor means  word size = 32 bit = 4 Bytes

Cache Size is 16 KB , & associativity = 4

Block size = 4 words = 4*4B = 16 B 

Now Address has 3 fields     Tag  , Set index , Block offset


Now, Block Offset =  4 bits (16 Bytes block )

set index dependes on number of sets - 

          Number of sets = Cache size /(Block size * Associativity)

                                   = 16KB / (16 * 4 )

                                    = 256 sets

So, set offset is 8 bits..

Now memory address is FFFAE   8F     A

Here FFAE is tag

8F is set index  which gives 143

and A is block offset.

selected by

Related questions

0 votes
0 votes
0 answers
2
Jasmeet Kaur asked Nov 27, 2021
520 views
An eight-way set-associative cache is used in a computer in which the real memory size is 232 bytes. The line size is 16 bytes, and there are 210 lines per set. Calculate...
0 votes
0 votes
1 answer
4
Tulsidhar M asked Nov 30, 2018
805 views
What is the correct formula for tag directory size in associative mapped cache concept.?