Address Translation

Virtual addresses used by software are converted to physical addresses by the CPU's memory management unit (MMU) before being sent to the system bus.


The MMU on PIC32MZ devices with the microAptiv™ or M5150 MPU core perform the following translations:

  • Fixed Mapping Translation (FMT) on KSEG0/KSEG1
    • Physical Address = Virtual Address & 0x1FFFFFFF
  • Programmable Translation using a Translation Lookaside Buffer (TLB) on KUSEG/KSEG2/KSEG3
    • Physical Address = TBD (Depends on the specific configuration)

For a typical PIC32MZ application running in Kernel mode, virtual memory segments KSEG0/KSEG1/KSEG2 are used. KSEG0/KSEG1 are trivially mapped as indicated above, while the MPLAB XC32 compiler start-up code initializes the TLB to map external serial (SQI) and parallel (EBI) memory interfaces into KSEG2.

PIC32 devices with the microAptiv™ or M5150 MPU core include a Memory Management Unit (MMU) that uses a Translation Lookaside Buffer (TLB) to translate a virtual page address to a physical page address. This feature is used by operating systems to manage multiple tasks running in the same virtual memory, by mapping them into separate physical memory locations. The MMU can also provide protection of physical memory areas and define the cache protocol. PIC32 devices with the microAptiv™ or M5150 MPU core support page sizes from 4 KB to 1 MB.

Please refer to Section 50. CPU for Devices with MIPS32® microAptive™ and M-Class Cores (DS60001192) for detailed coverage on the TLB.

Also, see chapter 6 of See MIPS Run for a good discussion on low-level memory management and the TLB in MIPS® CPUs.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.