![](http://datasheet.mmic.net.cn/290000/XPC801ZP25_datasheet_16187868/XPC801ZP25_177.png)
Memory Management Unit
11-2
MPC801 USER’S MANUAL
MOTOROLA
11
11.2 ADDRESS TRANSLATION
The MPC801 core generates 32-bit effective addresses and, when enabled, the memory
management unit translates the effective address to a real address that is used for cache or
memory access. If disabled, the effective address is passed as the real address to the
memory, which bypasses the appropriate TLB. Conceptually, in tables residing in the
memory, the effective address is sought to provide the real address mapping and storage
attributes. For performance reasons, instruction and data TLBs are implemented to hold
recently used address translations. In the MPC801, the table lookup and TLB reload are
performed by a software routine with little hardware assistance. This partition simplifies the
hardware and gives the system the opportunity to choose the translation table structure.
A TLB hit in multiple entries is avoided during the TLB reload phase. The TLB logic
recognizes that the effective page number (EPN) currently loaded into the TLB overlaps
another EPN. At least when taking into account the page sizes, subpage validity flags,
problem/privileged state, address space ID (ASID), and the SH values of the TLB entries.
When such an event occurs, the current EPN is written into the TLB and the entry of the
other EPN is invalidated from the TLB. The MPC801 memory management unit supports a
multiple virtual address space model and, when enabled, each translation is associated with
an ASID. For the translation to be valid, its ASID must be equal to the current address space
ID (CASID) that is in effect when an access is performed.
11.2.1 Translation Lookaside Buffer Operation
The MPC801 has two translation lookaside buffers—one for instruction fetches and one for
data accesses. Each of the translation lookaside buffers (TLB) contain pointers to pages in
the real memory where data is indexed by the effective page number and it can hold entries
with different page sizes. The entry page size controls the number of effective address bits
to be compared and the number of least-significant effective address bits that remain
untranslated and passes them as least-significant real address bits.
For a 4K page size, four subpage validity flags are supported that allow any combination of
1K subpages to be mapped. For any other page size, all of these flags should have the same
value. Programming pages other than 4K pages with different valid bits is considered a
programming error. The subpage validity flags can be manipulated to implement effective
page sizes of 1K, 2K, 3K, 4K, or any other combination of 1K subpages. However, subpages
of an effective page frame must all map to the same real page. During the translation
process, the effective address, processor problem state (MSR
PR
to the TLB. Refer to Figure 11-1 for more information. In the TLB, the effective address and
CASID are compared with the EPN and ASID of each entry. The CASID is only compared
when the matching entry was programmed as nonshared. See Tables 11-11 and 11-15 for
details.
), and CASID are provided
A successful TLB hit occurs if the incoming effective address matches the EPN stored in a
valid TLB entry and the CASID value stored in the M_CASID
ASID field. At the same time, the subpage validity flag is set for the subpage that the
incoming effective address points to. If a hit is detected, the content of the real page number
is concatenated with the appropriate number of least-significant bits from the effective
address to form the real address that is then sent to the cache and memory system.
register matches the entry’s