IPR-NIOS Altera, IPR-NIOS Datasheet - Page 75

no-image

IPR-NIOS

Manufacturer Part Number
IPR-NIOS
Description
IP NIOS II MEGACORE RENEW
Manufacturer
Altera
Type
MegaCorer
Datasheet

Specifications of IPR-NIOS

License
Renewal License
Lead Free Status / RoHS Status
Not applicable / Not applicable
Chapter 3: Programming Model
Working with the MPU
Working with the MPU
December 2010 Altera Corporation
MPU Region Read and Write Operations
1
Initialization with Shadow Register Sets
At initialization, system software must carry out the following tasks to ensure correct
software functioning with shadow register sets:
This section provides a basic overview of MPU initialization and the MPU region read
and write operations.
MPU region read and write operations are operations that access MPU region
attributes through the mpubase and mpuacc control registers. The mpubase.BASE,
mpuacc.MASK, mpuacc.LIMIT, mpuacc.C, and mpuacc.PERM fields comprise the MPU
region attributes.
MPU region read operations retrieve the current values for the attributes of a region.
Each MPU region read operation consists of the following actions:
The MPU region read operation retrieves mpubase.BASE, mpuacc.MASK or
mpuacc.LIMIT, mpuacc.C, and mpuacc.PERM values for the MPU region.
Values for the mpubase register are not actually retrieved until the wrctl instruction to
the mpuacc register is performed.
MPU region write operations set new values for the attributes of a region. Each MPU
region write operation consists of the following actions:
The MPU region write operation sets the values for mpubase.BASE, mpuacc.MASK or
mpuacc.LIMIT, mpuacc.C, and mpuacc.PERM as the new attributes for the MPU region.
After the gp register is initialized in the normal register set, copy it to all shadow
register sets, to ensure that all code can correctly address the small data sections.
Copy the zero register from the normal register set to all shadow register sets,
using the wrprs instruction.
Execute a wrctl instruction to the mpubase register with the mpubase.INDEX and
mpubase.D fields set to identify the MPU region.
Execute a wrctl instruction to the mpuacc register with the mpuacc.RD field set to
one and the mpuacc.WR field cleared to zero. This action loads the mpubase and
mpuacc register values.
Execute a rdctl instruction to the mpubase register to read the loaded the mpubase
register value.
Execute a rdctl instruction to the mpuacc register to read the loaded the mpuacc
register value.
Execute a wrctl instruction to the mpubase register with the mpubase.INDEX and
mpubase.D fields set to identify the MPU region.
Execute a wrctl instruction to the mpuacc register with the mpuacc.WR field set to
one and the mpuacc.RD field cleared to zero.
Nios II Processor Reference Handbook
3–29

Related parts for IPR-NIOS