Consider two cache organizations. First one is set associative with block size, the second is of same size but direct mapped. The size of an address is in both cases . A multiplexer has latency of while a comparator has latency of . The hit latency of the set associative organization is while that of direct mapped is .
The value of is:
View worked solution
Answer: A
To find the hit latency of the 2-way set-associative cache, we first need to determine the size of the tag field ( bits) in the address.
1. Address Division for 2-Way Set-Associative Cache
- Total Cache Size:
- Block Size:
- Number of Cache Blocks: blocks
- Set Size: blocks (since it is -way set-associative)
- Number of Sets: sets
The -bit physical address is divided as follows:
---2. Calculating Hit Latency ()
In a 2-way set-associative cache, the hit path consists of two main sequential steps after the set is indexed:
- Tag Comparison: Comparing the -bit tag of the incoming address with the tags of the two blocks in the selected set using -bit comparators in parallel.
- Data Selection (Multiplexing): A multiplexer selects the data from the correct block based on the comparator output.
Therefore, the total hit latency is:
Thus, the correct option is A.
Free practice · Your answers on this page are not saved.
