@Arjun Sir,
We are asked about the “Hit Latency”, so we actually don’t care about the data selection part.
Questions is:
- What exactly is $2:1$ multiplexer doing here? What exactly do we need to select? We already know the sets in which we are, now, for that set we just use comparators and then use $OR$ gate to know the Hit/Miss.
Now, if we didn’t use $2:1$ mux for that, and used it for actually implementing $OR$ gate using mux, then the answer you mentioned in this GATE answers is absolutely fine.
If we used it for that tag selection something, then what did we consider for $OR$ gate?
But then why in this answer (link), (question says to calculate “Hit Latency”), you mentioned this:
For direct mapped entry we assumed that each cache entry can hold a single cache block. But this changes in a set-associative cache and with a 2-way set, each cache entry can hold 2 cache blocks. i.e., after indexing to a cache, we have to compare the tag bits of 2 entries. But this comparison can be done in parallel and result be multiplexed. We also need an OR gate to determine the output of tag comparison for 2 set entries. The tag comparison result of the entries serve as select lines to the MUX. So, here hit time
=$18/10+0.6+0.6=3.0ns$
In this we considered both, can you explain in a detailed manner about those $0.6 + 0.6$?
Thank you.
PS: Also, can you tell me how to tag user, when I typed “@Arjun" it didn’t become blue neither it allowed me to select some user after typing “@” which generally happens.