Although it is not explicitly mentioned but it can be observed from the given information that the cache is virtually tagged instead of physically tagged. Thus we need to find the VA bits.
Now VA = | PageNo | PageOffset |
We have Page Size = 16KB. Thus PageOffset = 14 bits
We need to calculate bits for PageNo. Now,
PageTableSize = NoOfPageTableEntry * PTE (Page table entry size) - (1)
Now we need to calculate PTE size.
PA = 26 bits | FrameNo | FrameOffset |
FrameOffset = PageOffset = 14 bits
Thus FrameNo = 12 bits
PTE = FrameBits + Valid + Dirty + Protection = 12 + 1 + 1 + 2 = 16 bits = 2 B
Substituting in equation (1)
8 MB = NoOfPageTableEntry * 2 B
NoOfPageTableEntry = 4 M = 222
Now VA = | 22 bits | 14 bits |
TLB entry = Total Cache Line(TCL) = 128 SetAssoc(SA) = 4 way
Total Set - TCL/SA = 25
VA = | Tagbits | SetNo | BlockOffset |
= | 17 bits | 5 bits | 14 bits |