Current CPU Access
Virtual address partition
→
Physical address partition

Press Step to process the highlighted access.

Virtual to Physical address mapping

Translation changes the page number and keeps the offset.

ResidentOn secondary storagePage table
Select a virtual page for its PTE, or a physical page for its bytes.

Cache & TLB

When V = 0, entry values are ignored. Initialization restarts the series.

Main memory

Physical pages contain data and the page table.

Data byte ordering
Endianness

Purple: page-table bytes. Gold: current transfer.

Access history

Newest completed access first.

#OpVirtualPhysicalTLBCacheResult / valuePage traffic
Model notes

The PTBR points to the page table in RAM. Each PTE starts with Valid, Dirty, and Write protect at its three most significant bits. The physical page number (PPN) occupies bits 3–0; the intervening bits are reserved. PTE size is selectable.

The low VPN bits select a TLB set (entries ÷ ways); the remaining VPN bits identify the translation within that set. Fully associative TLBs use one set and no index bits. A TLB miss reads the PTE. With caches disabled, each request walks the table and accesses RAM directly. A page fault can load a page from secondary storage and retry.

The data cache supports write-back + write-allocate and write-through + no-write-allocate. Write-through stores update RAM immediately and update the cached copy on a hit; a store miss leaves the cache untouched. Load misses allocate under both policies. The cache Dirty column is needed only for write-back. Write-back stores modify the cache and set its dirty bit. Dirty blocks return to RAM before replacement or page-out. In this simulator, the PTE dirty bit marks RAM data modified since its last disk copy. Write-back cached stores leave it unchanged; cache write-back, write-through stores, and direct RAM stores set it. Page replacement flushes dirty cache blocks before checking the PTE dirty bit, then saves a dirty RAM page to disk. Page-out clears that bit. This Dirty-bit timing is a teaching abstraction: real MMUs such as RISC-V mark the page dirty on a store, even while its data remains in a write-back cache. Loads return unsigned data; register sign extension and cycle timing are not modeled. Real page tables are often multilevel.

Changes and initialization restart the series. Reset keeps the current mappings. Undo restores the previous Step, Run, or Continue; Tutorial Back restores an earlier stage.

Breakpoint — before access

The TLB, cache, memory, and statistics show the state before this access. Inspect closes this popup. Step executes the pending access; Continue executes it once and runs to the next breakpoint.

Manual page mappings

Apply restarts the series, cache, TLB, and memory with these mappings. Reset restores this starting layout.

Load memory from file

Use a UTF-8 text file with any extension (up to 4 MiB). Set the default for unassigned data addresses, then list a physical address and consecutive hexadecimal bytes:

default = zero

0x100: 12 34 AB CD
0x110: FF 00 80 7F

Drop a text file here, or