A CPU generates 32-bit virtual addresses. The page size is 4KB. The processor has a translation look-aside buffer (TLB) which can hold a total of 128 page table entries and is 4-way set associative. The minimum size of the TLB tag is
Explanation
TLB Tag Size Calculation
The minimum size of the TLB tag is determined by subtracting the number of bits used for the page offset and the TLB set index from the total virtual address bits.
Step-by-step Solution
1. Determine the number of bits for the page off set:
The page size is 4KB. Since 1KB=210 bytes, 4KB=4×210=22×210=212 bytes. Therefore, the number of bits required for the page offset is 12 bits.
1. Determine the number of bits for the TLB set index:
The TLB has a total of 128 entries and is 4-way set associative. The number of sets in the TLB is calculated as AssociativityTotal TLB entries=4128=32 sets. Since 32=25, the number of bits required for the TLB set index is 5 bits.
1. Calculate the size of the TLB tag:
The virtual address is 32 bits. The number of bits for the TLB tag is calculated as Total virtual address bits−Page offset bits−TLB set index bits. Therefore, the TLB tag size is 32−12−5=15 bits.
Final Answer
The minimum size of the TLB tag is 15 bits.