Expand description
The joint TLB and the instruction micro-TLB (T-12-004).
32 fully-associative joint-TLB (JTLB) entries, each mapping an even/odd page pair, plus a two-entry instruction micro-TLB (ITLB) in front of it.
§The distinction that is easy to lose
A micro-TLB miss is a stall (3 PCycles, UM §4.6.2 p. 107); a JTLB miss
is an exception. An implementation with only the JTLB does not approximate
the micro-TLB’s cost — it deletes the structure the cost occurs in, so there
is nowhere left to charge it.
§The matching rule, and the trap in it
An entry matches when VPN2 matches and (G is set or the ASID
matches). The V bit does not participate (UM §5.4.9, p. 155):
“While the V bit of the entry must be set for a valid translation to take place, it is not involved in the determination of a matching TLB entry.”
So an invalid entry still matches — it just raises TLB Invalid instead of
translating. Checking V during matching looks like an optimization, passes
ordinary tests, and breaks two things: an invalid entry would fall through to
a refill (wrong vector, wrong handler), and TLB shutdown would stop
firing on duplicates involving an invalid entry, which UM Fig. 6-6 (p. 167)
explicitly says it must.
Structs§
- Entry
- One JTLB entry: a
VPN2tag plus the even and odd page it maps. - Page
Entry - One half of an entry — the even or odd page.
- Tlb
- The joint TLB plus its instruction micro-TLB.
- Translated
- A successful translation.
Enums§
- TlbFault
- Why a translation failed.
Constants§
- ASID_
MASK - The
EntryHi.ASIDfield mask. - ITLB_
ENTRIES - Instruction micro-TLB entries (UM §1.5.1).
- ITLB_
MISS_ PCYCLES - The micro-TLB reload penalty, in
PCycles (UM §4.6.2, p. 107). - JTLB_
ENTRIES - JTLB entries. Fully associative (UM §5.1, p. 122).
- VA_MASK
- The bits of a virtual address that
EntryHi.VPN2can hold: VA(39:0). - VPN2_
MASK - The
EntryHi.VPN2field mask.