42
32000D–04/2011
AVR32
5.2.3
Page Table Organization
The MMU leaves the page table organization up to the OS software. Since the page table han-
dling and TLB handling is done in software, the OS is free to implement different page table
organizations. It is recommended, however, that the page table entries (PTEs) are of the format
shown in
Figure 5-4. This allows the loaded PTE to be written directly into TLBELO, without the
need for reformatting. How the PTEs are indexed and organized in memory is left to the OS.
Figure 5-4.
Recommended Page Table Entry format
5.2.4
TLB organization
The TLB is used as a cache for the page table, in order to speed up the virtual memory transla-
tion process. Up to two TLBs can be implemented, each with up to 64 entries. Each TLB is
Figure 5-5.
TLB organization
The D, W and AP[1] bits are not implemented in ITLBs, since they have no meaning there.
The AP[0] bits are not implemented in DTLBs, since they have no meaning there.
The A bit is the Accessed bit. This bit is set when the TLB entry is loaded with a new value using
the tlbw instruction. It is cleared whenever the TLB matching process finds a match in the spe-
cific TLB entry. The A bit is used to implement pseudo-LRU replacement algorithms.
When an address look-up is performed by the TLB, the address section is searched for an entry
matching the virtual address to be accessed. The matching process is described in
chapterG
D
PFN
C
B
0
9
10
31
SZ
AP
W
876
4 3 2 1
VPN[21:0]
ASID[7:0]
G
D
PFN[21:0]
C
B
V
AP[2:0]
W
Entry 0
VPN[21:0]
ASID[7:0]
G
D
PFN[21:0]
C
B
V
AP[2:0]
W
Entry 1
VPN[21:0]
ASID[7:0]
G
W
PFN[21:0]
C
B
V
AP[2:0]
D
Entry 2
VPN[21:0]
ASID[7:0]
G
W
PFN[21:0]
C
B
V
AP[2:0]
D
Entry 3
VPN[21:0]
ASID[7:0]
G
W
PFN[21:0]
C
B
V
AP[2:0]
D
Entry 63
Address section
Data section
SZ[1:0]
A