IDT MIPS32 4Kc Processor Core
Memory Management
79RC32438 User Reference Manual
2 - 30
November 4, 2002
Notes
In order to fill an entry in the JTLB, software executes a TLBWI or TLBWR instruction (see the TLB
Instructions section). Prior to invoking one of these instructions, several CP0 registers must be updated
with the information to be written to a TLB entry:
PageMask is set in the CP0 PageMask register
VPN2 and ASID are set in the CP0 EntryHi register
PFN0, C0, D0, V0 and G bit are set in the CP0 EntryLo0 register
PFN1, C1, D1, V1 and G bit are set in the CP0 EntryLo1 register.
Note that the global bit “G” is part of both EntryLo0 and EntryLo1. The resulting “G” bit in the JTLB entry
is the logical AND between the two fields in EntryLo0 and EntryLo1. For additional information, refer to
section “CP0 Registers” on page 2-56.
The address space identifier (ASID) helps to reduce the frequency of TLB flushing on a context switch.
The existence of the ASID allows multiple processes to exist in both the TLB and instruction caches. The
ASID value is stored in the EntryHi register and is compared to the ASID value of each entry.
Instruction TLB
The ITLB is a small 3-entry, fully associative TLB dedicated to performing translations for the instruction
stream. The ITLB only maps 4-Kbyte pages/sub-pages.
The ITLB is managed by hardware and is transparent to software. If a fetch address cannot be trans-
lated by the ITLB, the JTLB is accessed to attempt to translate it in the following clock cycle. If successful,
the translation information is copied into the ITLB. The ITLB is then re-accessed and the address will be
successfully translated. This results in an ITLB miss penalty of at least 2 cycles (if the JTLB is busy with
other operations, it may take additional cycles).
Field Name
Description
PFN0[31:12],
PFN1[31:12]
Physical Frame Number. Defines the upper bits of the physical address. For page
sizes larger than 4 KBytes, only a subset of these bits is actually used.
C0[2:0],
C1[2:0]
Cacheability. Contains an encoded value of the cacheability attributes and determines
whether the page should be placed in the cache or not. The field is encoded as fol-
lows:
D0,
D1
“Dirty” or Write-enable Bit. Indicates that the page has been written, and/or is writable.
If this bit is set, stores to the page are permitted. If the bit is cleared, stores to the page
cause a TLB Modified exception.
V0,
V1
Valid Bit. Indicates that the TLB entry and, thus, the virtual page mapping are valid. If
this bit is set, accesses to the page are permitted. If the bit is cleared, accesses to the
page cause a TLB Invalid exception.
Table 2.12 TLB Data Entry Fields
C[2:0]
Coherency Attribute
000
Cacheable, noncoherent, write-through, no write allocated
001
Cacheable, noncoherent, write-through, no write allocated
010
Uncached
011
Cacheable, noncoherent, write-through, no write allocated
100
Cacheable, noncoherent, write-through, no write allocated
101
Cacheable, noncoherent, write-through, no write allocated
110
Cacheable, noncoherent, write-through, no write allocated
111
Cacheable, noncoherent, write-through, no write allocated