431 views
1 votes
1 votes
Consider a 32-bit microprocessor that has an on-chip 16-KByte four-way set-associative cache. Assume that the cache has a line size of four 32-bit words.Where in the cache (Set number in decimal)  is the word from memory location ABCDE888 mapped?

1 Answer

2 votes
2 votes

Let’s see what is given to us :

32 bit architecture

Cache size = 16 KB = $2^{14}$ B

set associativity = 4

It is given that line size is of four 32 bit words so we have to consider it as word addressable.

Block offset = log2(4) = 2bits

Line size = 4*32bits = 128bits = 16B

#cache lines = $\frac{cache size}{line size} = $ $\frac{2^{14}}{2^{4}}$ = $2^{10}$

#sets = $\frac{no. of lines}{set associativity}$ =  $\frac{2^{10}}{4}$ = $2^8$

Tag (32-(8+2) = 22 bits) Set no. (8bits) Block offset (2bits)

 

Now given address is (ABCDE888) → 1010 1011 1100 1101 1110 1000 1000 1000 in binary

Set number bits are 00100010 and its decimal equivalent is 34.

Answer : 34

Related questions

1 votes
1 votes
0 answers
1
LRU asked Jan 14, 2022
353 views
Consider a memory system that uses a 32-bit address to address at the byte level, plus a cache that uses a 64-byte line size. Assume a four-way set-associative cache with...
1 votes
1 votes
1 answer
2
LRU asked Dec 4, 2021
361 views
The cache takes 2 cycles to access and has a 5% miss rate, main memory takes 100 cycles to access and has an 8% miss rate, and the disk takes 10,000 cycles to access. The...
0 votes
0 votes
0 answers
3
Ray Tomlinson asked Aug 22, 2023
227 views
is this formula is correct if it is correct then in gate 2006 Question 75 why they not used this formulahttps://gateoverflow.in/43565/gate-cse-2006-question-75