Article ID: 000083661 Content Type: Troubleshooting Last Reviewed: 09/22/2011

Method for Accessing MMU and MPU Registers in the Debugger

Environment

    Quartus® II Subscription Edition
BUILT IN - ARTICLE INTRO SECOND COMPONENT

Critical Issue

Description

You might observe an error if you try to read or write an MMU or MPU register via the Nios II Debugger.

Resolution

To read an MPU region, execute the following steps:

  1. Set region INDEX in the MPUBASE register.
  2. Exit and reenter debug mode, that is, single step.
  3. Set the RD bit in the MPUACC register.
  4. Exit and reenter debug mode, that is, single step.
  5. Read back MPUBASE for pertinent information.
  6. Read back MPUACC for pertinent information.

For a system with an MMU or MPU, this Workaroundallows you to read and write the current values of the registers. However, you cannot use it to control MPU regions or MMU TLB entries.

The debug core copies the Nios II processor’s register values to its internal memory when the processor enters debug mode. The debug core writes register values back to the processor only when the processor leaves debug mode. Therefore, if you attempt to set an MPU region with several consecutive values, only the last one, when leaving debug mode, is committed to the processor.

Related Products

This article applies to 1 products

Intel® Programmable Devices

1