
10-20
ColdFire CF4E Core User’s Manual
For More Information On This Product,
Go to: www.freescale.com
MMU Implementation
10.6.1 TLB Address Fields
Because the TLB has a total of 64 entries (32 each for the ITLB and DTLB), a 6-bit address
field is necessary. TLB addresses 0–31 reference the ITLB and TLB addresses 32–63
reference the DTLB.
In the MMUOR, bits 0 through 5 of the TLB allocation address (AA[5–0]), have this
address format for CF4e. The remaining TLB allocation address bits (AA[15–6]) are
ignored on updates and always read as zero.
When MMUAR is used for a TLB address, bits FA[5–0] also have this address format for
CF4e. The remaining form address bits (FA[31–6]) are don’t cares when this register is
being used for a TLB address.
10.6.2 TLB Replacement Algorithm
The instruction and data TLBs provide low-latency access to recently used instruction and
operand translation information. CF4e ITLBs and DTLBs are 32-entry fully associative
caches. The 32 ITLB entries are searched on each instruction K-Bus reference; the 32
DTLB entries are searched on each operand K-Bus reference.
CF4e TLBs are software controlled. The TLB clear-all function clears valid bits on every
TLB entry and resets the replacement logic. A new valid entry is loaded in the TLBs may
be designated as locked and unavailable for allocation. TLB hits to locked entries do not
update replacement algorithm information.
When a new TLB entry needs to be allocated, the user can specify the exact TLB entry to
be updated (through MMUOR[ADR] and MMUAR) or let TLB hardware pick the entry to
update based on the replacement algorithm. A pseudo-least-recently used (PLRU)
algorithm picks the entry to be replaced on a TLB miss. The algorithm works as follows:
If any element is empty (non-valid), use the lowest empty element as the allocate
entry (that is, entry 0 before 1, 2, 3, and so on).
If all entries are valid, use the entry indicated by the PLRU as the allocate entry.
The PLRU algorithm uses 31 most-recently used state bits per TLB to track the TLB hit
history. Table 10-13 lists these state bits.
Table 10-13. PLRU State Bits
State Bits
Meaning
rdRecent31To16
A one indicates 31To16 is more recent than 15To00
rdRecent31To24
A one indicates 31To24 is more recent than 23To16
rdRecent15To08
A one indicates 15To08 is more recent than 07To00
rdRecent31To28
A one indicates 31To28 is more recent than 27To24
rdRecent23To20
A one indicates 23To20 is more recent than 19To16
rdRecent15To12
A one indicates 15To12 is more recent than 11To08
F
Freescale Semiconductor, Inc.
n
.