5.12 Memory Faults

<< Click to Display Table of Contents >>

Navigation:  ASA-EMulatR Reference Guide > Introduction > Architecture Overview > Chapter 5 - Memory System Architecture >

5.12 Memory Faults

The memory system may generate the following fault types:

Alignment faults (ALIGNMENT_FAULT) — VA not naturally aligned for the access width (4-byte for longword, 8-byte for quadword). Detected by MBox in EX stage.

Translation faults — TLB miss (DTBM_SINGLE, DTBM_DOUBLE for data; ITMISS for instruction), page not present, non-canonical address. Detected by Ev6Translator during VA→PA translation.

Access violations (ACV_FAULT) — permission check failed for the current access mode (read/write/execute) and privilege level. Detected by the page table entry permission check.

Fault on read/write/execute — page table entry flags indicate the access should fault, even though the page is present (used by OS for copy-on-write, demand paging, etc.).

Bus errors — physical address does not route to any valid subsystem (unmapped PA region).

MMIO device faults — device emulator reports an error for the access.

 

Fault handling follows the precise exception model:

1.Fault detected in EX stage — MBox or Ev6Translator sets slot.faultPending = true, slot.trapCode, and slot.faultVA

2.Fault queued in the pipeline slot — the slot continues flowing through MEM

3.Fault delivered in WB — the pipeline checks faultPending, flushes younger instructions, saves the faulting PC, and transfers control to the PAL exception handler

 

Memory faults are never speculative. A fault detected in EX is guaranteed to be delivered precisely.

 

See Also: Chapter 7 - Exceptions, Faults, and Interrupts; 3.14 Precise Exceptions.