TLB Entry Format - 2024.2 English

MicroBlaze Processor Reference Guide (UG984)

Document ID
UG984
Release Date
2024-11-27
Version
2024.2 English

The following figure shows the format of a TLB entry. Each TLB entry ranges from 68 bits up to 100 bits and is composed of two portions: TLBLO (also referred to as the data entry), and TLBHI (also referred to as the tag entry).

Figure 1. TLB Entry Format (PAE Disabled)

When 64-bit MicroBlaze or the Physical Address Extension (PAE) is enabled, the TLB entry is extended with up to 32 additional bits in the TLBLO RPN field to support up to a 64 bit physical address.

The TLB entry contents are described in more detail in Translation Look-Aside Buffer Low Register and Translation Look-Aside Buffer High Register, including the TLBLO format with PAE or 64-bit MicroBlaze enabled.

The fields within a TLB entry are categorized as follows:

  • Virtual-page identification (TAG, SIZE, V, TID): These fields identify the page-translation entry. They are compared with the virtual-page number during the translation process.
  • Physical-page identification (RPN, SIZE): These fields identify the translated page in physical memory.
  • Access control (EX, WR, ZSEL): These fields specify the type of access allowed in the page and are used to protect pages from improper accesses.
  • Storage attributes (W, I, M, G, E, U0): These fields specify the storage-control attributes, such as caching policy for the data cache (write-back or write-through), whether a page is cacheable, and how bytes are ordered (endianness).

The following table shows the relationship between the TLB-entry SIZE field and the translated page size. This table also shows how the page size determines which address bits are involved in a tag comparison, which address bits are used as a page offset, and which bits in the physical page number are used in the physical address. With 64-bit MicroBlaze or PAE enabled, the most significant bits of the physical address are directly taken from the extended RPN field.

Table 1. Page-Translation Bit Ranges by Page Size
Page Size SIZE TLBHI Field

Tag Comparison Bit Range 1

Page Offset PAE Disabled PAE or 64-bit Enabled 2
Physical Page Number RPN Bits Clear to 0 Physical Page Number RPN Bits Clear to 0
1 KB 000 TAG and Address[0:n-11] Address[22:31] RPN[0:21] - RPN[0:n-11] -
4 KB 001 TAG and Address[0:n-13] Address[20:31] RPN[0:19] 20:21 RPN[0:n-13] n-12:n-11
16 KB 010 TAG and Address[0:n-15] Address[18:31] RPN[0:17] 18:21 RPN[0:n-15] n-14:n-11
64 KB 011 TAG and Address[0:n-17] Address[16:31] RPN[0:15] 16:21 RPN[0:n-17] n-16:n-11
256 KB 100 TAG and Address[0:n-19] Address[14:31] RPN[0:13] 14:21 RPN[0:n-19] n-18:n-11
1 MB 101 TAG and Address[0:n-21] Address[12:31] RPN[0:11] 12:21 RPN[0:n-21] n-20:n-11
4 MB 110 TAG and Address[0:n-23] Address[10:31] RPN[0:9] 10:21 RPN[0:n-23] n-22:n-11
16 MB 111 TAG and Address[0:n-25] Address[8:31] RPN[0:7] 8:21 RPN[0:n-25] n-24:n-11
  1. The bit index n = C_ADDR_SIZE with 64-bit MicroBlaze, and 32 otherwise.
  2. The bit index n = C_ADDR_SIZE.