The
BASE
field specifies the base address of an MPU region. The 24-bit
BASE
field
always start from 256 bytes corresponds to bits 6 through 30 of the base address,
making the base address always a multiple of 64 bytes. If the minimum region size
set in Platform Designer at generation time is larger than 64 bytes, unused low-order
bits of the
BASE
field must be written as zero and are read as zero. For example, if the
minimum region size is 1024 bytes, the four least-significant bits of the
BASE
field
(bits 6 though 9 of the
mpubase
register) must be zero. Similarly, if the Nios II
address space is less than 31 bits, unused high-order bits must also be written as zero
and are read as zero.
The
INDEX
and
D
fields specify the region information to access when an MPU region
read or write operation is performed. The
D
field specifies whether the region is a data
region or an instruction region. The
INDEX
field specifies which of the 32 data or
instruction regions to access. If there are fewer than 32 instruction or 32 data regions,
unused high-order bits must be written as zero and are read as zero.
Refer to the MPU Region Read and Write Operations section for more information on
MPU region read and write operations.
Related Information
MPU Region Read and Write Operations
on page 68
3.4.2.14. The mpuacc Register
The
mpuacc
register works in conjunction with the
mpubase
register to set and
retrieve MPU region information and is only available in systems with an MPU. The
mpuacc
register consists of attributes that will be set or have been retrieved which
define the MPU region. The
mpuacc
register only holds a portion of the attributes that
define an MPU region. The remaining portion of the MPU region definition is held by
the
BASE
field of the
mpubase
register.
A Platform Designer generation-time option controls whether the
mpuacc
register
contains a
MASK
or
LIMIT
field.
Table 32.
mpuacc Control Register Fields for MASK Variation
Bit Fields
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
MASK[n-1:p]
(
12
)
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
MASK[n-1:p]
(
12
)
0
MT
PERM
RD
WR
Table 33.
mpuacc Control Register Fields for LIMIT Variation
Bit Fields
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
LIMIT[n:p]
(
12
)
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
LIMIT[n:p]
(
12
)
0
MT
PERM
RD
WR
3. Programming Model
NII-PRG | 2018.04.18
Nios II Processor Reference Guide
60