retagged by
3,060 views
3 votes
3 votes
Cache size 32 KB

Block size = 32 Bytes

Address size = 28 bit.

Associativity of Cache = 16

Determine what is the hardware requirement to design the 16-way set associative cache.

Hardware requirement -> Mux, Comparator, Demux, Decoder, Encoder etc.

My answer:-  Our requirement are as follow:-

1) 64 Comparator each of size 4 bit.

2) 1 Decoder Dimension -> 6 X 64

3) 1 Mux Dimension -> 32 X 1 where number of select lines are 5.

4) 64 And gates

5) 1 OR gate input line = 64

Someone, please verify these attributes??
retagged by

3 Answers

5 votes
5 votes

Number of cache block = $\frac{2^{15}}{2^5}$ = $2^{10}$

Number of sets = $\frac{2^{10}}{2^4}$ = 64

Address Size = 28 bits

|17|6|5| = |tag bits|set index bits|Block offset|

number of comparators required = 16 ( 16 blocks in 1 set)

Each comparator size  = number of tag bits = 17 bits comparator

MUX required of size Kx1 : 16x1 MUX

4 votes
4 votes
i think @nitish is right @manu

because we 1st take the set no. bit apply them as input to multiplexer to locate the set no. and then use comparator to compare the tag bits in above example 16 comparator (since 16 lines per set are used) and then use or gate

therefore the no. of multiplexer would be 64 to 1 mux
in above example even you have used decoder of size 6 to 64
correct me if i am wrong
0 votes
0 votes
Tag bit= 17, set bit= 6, offset bit= 5

Firstly 1 multiplexer or set index decoder(size 64 x 1) will be used to reach the required set, then all tag bits of 16 lines in that set will be matched with the help of 16 comparators of size 17(tag bits). Don't bother yourself on how to fetch all tag bits from 16 lines (we could use multiplexer same as we fetch from Associative mapping) because that is advance topic and not required for GATE. Then lastly we required an OR gate or a multiplexer(mux. can work as an "OR" gate) to check whether there is a hit or miss.

Note- A comparator compares 1 bit at a time that's why T.comparator= K * comparator latency

Related questions

3 votes
3 votes
1 answer
1
Shubhanshu asked Aug 5, 2017
1,020 views
Draw the diagram which shows the mechanism of fetching the data in 2-way set associative mapping using multiplexer, comparator, and encoder?
3 votes
3 votes
2 answers
2
biranchi asked Nov 16, 2016
4,798 views
Consider the memory system in which the block size in cache and main memory are equal. Cache consists of 512 blocks and main memory consists of 8192 blocks. Cache is 4-wa...
0 votes
0 votes
2 answers
3
Tehreem asked Sep 22, 2015
1,000 views
If there is k-set associative cache, with total x cache blocks, and 2^n main memory locations, how is the mapping calculated?