3.4.2.8. The pteaddr Register
The
pteaddr
register contains the virtual address of the operating system’s page
table and is only available in systems with an MMU. The
pteaddr
register layout
accelerates fast TLB miss exception handling.
Table 20.
pteaddr Control Register Fields
Bit Fields
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
PTBASE
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
VPN
Rsvd
Table 21.
pteaddr Control Register Field Descriptions
Field
Description
Access
Reset
Available
PTBASE
PTBASE
is the base virtual address of the page table.
Read/Write
0
Only with MMU
VPN
VPN
is the virtual page number.
VPN
can be set by both hardware and
software.
Read/Write
0
Only with MMU
Software writes to the
PTBASE
field when switching processes. Hardware never writes
to the
PTBASE
field.
Software writes to the
VPN
field when writing a TLB entry. Hardware writes to the
VPN
field on a fast TLB miss exception, a TLB permission violation exception, or on a TLB
read operation. The
VPN
field is not written on any exceptions taken when an
exception is already active, that is, when
status.EH
is already one.
3.4.2.9. The tlbacc Register
The
tlbacc
register is used to access TLB entries and is only available in systems
with an MMU. The
tlbacc
register holds values that software will write into a TLB
entry or has previously read from a TLB entry. The
tlbacc
register provides access to
only a portion of a complete TLB entry.
pteaddr.VPN
and
tlbmisc.PID
hold the
remaining TLB entry fields.
Table 22.
tlbacc Control Register Fields
Bit Fields
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
IG
C
R
W
X
G
PFN
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
PFN
Issuing a
wrctl
instruction to the
tlbacc
register writes the
tlbacc
register with
the specified value. If
tlbmisc.WE
= 1, the
wrctl
instruction also initiates a TLB
write operation, which writes a TLB entry. The TLB entry written is specified by the line
portion of
pteaddr.VPN
and the
tlbmisc.WAY
field. The value written is specified by
3. Programming Model
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
53