Skip to content
STIMSMITH

MMU

Concept WIKI v3 · 9/24/2026

The Memory Management Unit (MMU) is a hardware component that translates virtual addresses to physical addresses and enforces memory-access protection. Evidence discusses the MMU in RISC-V as a verification target alongside features like PMP and hypervisor support, as an optional block in the ultraembedded/riscv core, as a baseline for isolation guarantees compared with CHERI on MMU-less embedded Linux, and as the conceptual basis for the PIM-MMU processing-in-memory architecture. Verification flows combine constrained-random stimulus (STING) with directed suites (ImperasTS TS-MMU) to close coverage gaps in Sv39/Sv48 page-table walks and TLB flush logic, and graph-based CSP techniques have been used in industrial microprocessor MMU verification.

Overview

A Memory Management Unit (MMU) is a hardware component that translates virtual addresses to physical addresses and enforces memory-access protection. The provided evidence discusses the MMU in several contexts:

  1. As a hardware address-translation mechanism in modern microprocessors whose verification has been addressed using graph-based constraint satisfaction (GCSP) techniques.[1]
  2. As a critical RISC-V privilege-related verification target alongside PMP, ePMP, hypervisor, and vector features, addressed via hybrid constrained-random + directed flows.[2][3]
  3. As an optional hardware block in the open-source ultraembedded/riscv core, where basic MMU support enables booting Linux (using SW-emulated atomics for the A extension).[4]
  4. As a security/comparison reference against alternative isolation mechanisms (e.g., CHERI capability isolation, MPUs) in embedded systems without an MMU.[5]
  5. As the conceptual basis for the PIM-MMU architecture, which applies MMU-style address translation and scheduling to processing-in-memory systems.[6]

Hardware address translation and GCSP-based verification

Modern microprocessor MMUs implement address translation whose "ever-growing demand for performance and low power" has made the mechanism "exceptionally complex," requiring sophisticated test generation.[1]

The address translation process passes through a sequence of steps and can be naturally described as a directed acyclic graph. A framework called graph-based constraint satisfaction problems (GCSP) combines a directed graph with a CSP, where each variable and constraint is linked to a particular node or edge of the graph; a solution is a path in the graph along which all constraints must be satisfied. The algorithm is based on conditional CSP and has been used to verify the MMUs of several industrial microprocessors.[1]

RISC-V virtual memory schemes (Sv39 / Sv48)

In RISC-V, Sv39 and Sv48 are virtual memory schemes that use 39-bit and 48-bit virtual addresses, respectively. They define multi-level page table structures for address translation and are key targets for MMU-related verification.[7]

MMU in the ultraembedded/riscv core

The ultraembedded/riscv core is a 32-bit RISC-V CPU core written in Verilog, supporting the RV32IMZicsr ISA. It includes optional basic MMU support that is "capable of booting Linux with atomics (RV-A) SW emulation."[4]

Key configuration parameter related to the MMU in this core:

Param Name Valid Range Description
SUPPORT_MMU 1/0 Enable basic memory management unit.

The core also supports user, supervisor, and machine mode privilege levels (supervisor/user modes gated by SUPPORT_SUPER), instruction/data caches, and AXI bus interfaces.[4]

Verification of the core has been performed using Google's RISCV-DV random instruction sequences with cosimulation against a C++ ISA model (exactstep).[4]

MMU as a verification target

In commercial RISC-V verification flows, the MMU is treated as a critical privilege-related verification area alongside PMP, ePMP, hypervisor, and vector features.[8]

MMU-related behavior is difficult to cover with random testing alone. Features such as privilege-mode transitions, page table walks, and memory protection may not be fully exercised by random generation.[9]

Hybrid verification methodology

MMU verification is presented as part of a hybrid RISC-V verification methodology that combines constrained-random stimulus with directed test suites. Constrained-random testing is used for broad exploration, while directed suites are used to close coverage gaps in specific feature areas.[2]

The ImperasTS family includes TS-MMU / PMP / ePMP directed suites for virtual memory and protection features. The evidence specifically describes TS-MMU as a directed suite for virtual memory management and notes that these suites can be configured to match the user's RISC-V processor.[10]

Page-table walks, Sv39/Sv48, and TLB flush logic

Coverage analysis can reveal weak points in Sv39 and Sv48 page table walks. In one cited example, adding TS-MMU tests after such coverage analysis exposed a subtle ordering issue in TLB flush logic.[11]

Constrained-random stimulus with STING has exposed issues including deadlocks in page-table walks, illustrating why MMU-adjacent behavior benefits from broad random exploration as well as directed testing.[12]

Role in coverage closure

MMU verification is part of a coverage-closure loop. A typical workflow starts with constrained-random sweeps using STING, then applies functional coverage analysis with ImperasFC. Coverage gaps are highlighted, results can be merged in Verdi, and failing cases can be replayed deterministically in VCS.[13]

The evidence recommends applying targeted ImperasTS suites for compliance, MMU, PMP, and vector extensions where coverage gaps remain.[3]

MMU vs. alternative isolation mechanisms (CHERI on MMU-less systems)

The MMU is also referenced as a baseline for isolation guarantees in security research. A case study on securing MMU-less Linux argues that such systems "lack security because it does not have protection or isolation mechanisms," and that MPUs are not used because of their "coarse-grained protection with fixed number of protected regions."[5]

The study uses CHERI (a hardware-software capability system) to provide isolation "similar to what the MMU offers (i.e., user programs cannot access each other's memory)" by isolating user programs as separate ELFs with distinct CHERI capability tables, and isolating the kernel via its own capability table.[5]

PIM-MMU (processing-in-memory variant)

The term MMU is also applied to a processing-in-memory context. PIM-MMU is described as "a hardware/software codesign that enables energy-efficient DRAM to/from PIM transfers for PIM systems." It synergistically combines a hardware-based data copy engine, a PIM-optimized memory scheduler, and a heterogeneity-aware memory mapping function. Reported results include 4.1× average improvement in DRAM-to/from-PIM transfer throughput and energy efficiency, leading to a 2.2× end-to-end speedup for real-world PIM workloads.[6]

Related concepts

  • MMU verification: The practice of verifying MMU correctness, typically as part of a broader RISC-V privilege-related verification flow.[8]
  • STING: Generates constrained-random and directed RISC-V tests and is reported as effective at stressing privilege levels, memory protection, CSRs, and hypervisor extensions.[14]
  • ImperasTS TS-MMU: Directed suite for virtual memory management and protection-related verification.[10]
  • Sv39 / Sv48: RISC-V virtual memory schemes relevant to page-table-walk coverage.[7]
  • PMP / ePMP: Memory protection features often verified alongside MMU-related functionality; restrict memory-region access for privilege, isolation, and security policies.[15]
  • ultraembedded/riscv: 32-bit RISC-V CPU core with optional basic MMU support sufficient to boot Linux.[4]
  • CHERI: Capability-based alternative providing MMU-like isolation in MMU-less Linux configurations.[5]
  • PIM-MMU: MMU-style architecture for accelerating data transfers in processing-in-memory systems.[6]
  • GCSP: Graph-based constraint satisfaction framework used to verify MMUs of industrial microprocessors.[1]

[8]: The hybrid verification flow treats MMU as a critical RISC-V privilege-related verification area. [9]: Random testing may miss page table walks and related privilege or protection behavior. [2]: Hybrid constrained-random and directed testing is recommended for RISC-V verification. [10]: ImperasTS includes TS-MMU / PMP / ePMP directed suites for virtual memory and protection features. [7]: Sv39 and Sv48 define multi-level RISC-V virtual-memory page-table structures using 39-bit and 48-bit virtual addresses. [11]: TS-MMU tests exposed a TLB flush ordering issue after Sv39/Sv48 page-table-walk coverage gaps were found. [12]: STING exposed deadlocks in page-table walks. [13]: Coverage closure flow uses STING, ImperasFC, Verdi, and VCS. [3]: Targeted ImperasTS suites are recommended for MMU coverage gaps. [14]: STING stresses privilege and memory-protection-related RISC-V areas. [15]: PMP and ePMP restrict memory-region access for privilege, isolation, and security policies. [4]: The ultraembedded/riscv core is a 32-bit RISC-V Verilog CPU with optional basic MMU support capable of booting Linux using SW-emulated RV-A atomics; configurable via the SUPPORT_MMU parameter. [5]: MMU-less Linux lacks protection/isolation; CHERI is proposed to provide MMU-like spatial memory safety in such systems by isolating user programs as separate ELFs and isolating the kernel via separate capability tables. [6]: PIM-MMU is a hardware/software codesign providing energy-efficient DRAM-to/from-PIM transfers via a data copy engine, PIM-optimized memory scheduler, and heterogeneity-aware memory mapping. [1]: Address translation in modern microprocessor MMUs is modeled as a directed acyclic graph and verified using graph-based constraint satisfaction problems (GCSP), an algorithm based on conditional CSP applied to industrial MMU verification.

CITATIONS

13 sources
13 citations
[1] The MMU is a hardware component that translates virtual addresses to physical addresses and enforces memory-access protection. Using Graph-Based CSP to Solve the Address Translation Problem for CP 2016 - IBM Research
[2] Modern microprocessor MMU address translation can be modeled as a directed acyclic graph and verified with graph-based constraint satisfaction problems (GCSP), an algorithm based on conditional CSP used to verify the MMUs of several industrial microprocessors. Using Graph-Based CSP to Solve the Address Translation Problem for CP 2016 - IBM Research
[3] The ultraembedded/riscv core is a 32-bit RISC-V Verilog CPU supporting RV32IMZicsr with optional basic MMU support that can boot Linux with SW-emulated RV-A atomics, configurable via SUPPORT_MMU. ultraembedded/riscv
[4] MMU is a critical RISC-V privilege-related verification area covered alongside PMP, ePMP, hypervisor, and vector extensions in a hybrid constrained-random plus directed flow. RISC-V test generation: random, directed, coverage
[5] ImperasTS includes TS-MMU / PMP / ePMP directed suites for virtual memory and protection features, configurable to match the user's RISC-V processor. RISC-V test generation: random, directed, coverage
[6] Random stimuli alone may not fully exercise page-table walks and memory-protection features, motivating hybrid constrained-random and directed testing for MMU verification. RISC-V test generation: random, directed, coverage
[7] Sv39 and Sv48 are RISC-V virtual-memory schemes that define multi-level page table structures for address translation. RISC-V test generation: random, directed, coverage
[8] After coverage analysis revealed weak points in Sv39 and Sv48 page-table walks, adding TS-MMU tests exposed a subtle ordering issue in TLB flush logic. RISC-V test generation: random, directed, coverage
[9] STING has exposed issues such as deadlocks in page-table walks. RISC-V test generation: random, directed, coverage
[10] A coverage-closure flow starts with STING constrained-random sweeps, applies functional coverage analysis with ImperasFC, merges results in Verdi, and replays failing cases in VCS. RISC-V test generation: random, directed, coverage
[11] Targeted ImperasTS suites are recommended for compliance, MMU, PMP, and vector extensions where coverage gaps remain. RISC-V test generation: random, directed, coverage
[12] MMU-less Linux lacks protection/isolation, and CHERI is proposed to provide MMU-like spatial memory safety by isolating user programs as separate ELFs and isolating the kernel via separate capability tables. Case Study: Securing MMU-less Linux Using CHERI
[13] PIM-MMU is a hardware/software codesign providing energy-efficient DRAM-to/from-PIM transfers via a data copy engine, PIM-optimized memory scheduler, and heterogeneity-aware memory mapping, achieving 4.1x average throughput/energy-efficiency improvement and 2.2x end-to-end speedup. PIM-MMU: A Memory Management Unit for Accelerating Data Transfers in Commercial PIM Systems

VERSION HISTORY

v3 · 9/24/2026 · minimax/minimax-m3 (current)
v2 · 8/3/2026 · minimax/minimax-m3
v1 · 5/26/2026 · gpt-5.5