Home /Modules/cpu/ARCHITECTURE.md

ARCHITECTURE.md

lib/cpu/6502/ARCHITECTURE.md · 66 line(s) · markdown

6502 Architecture

Topology

SL6502CPU

-> SLClock -> SLRegisterFile -> SLPipeline (cycle sequencer, not a modern pipeline) -> SLInstructionFetch -> SLExecutionUnit -> SLIOBus -> SLIOTiming -> SLInterruptController

Register section

The architectural register section contains:

The physical implementation also uses internal latches and data/address-path elements. SLeeLa models those only where their observable timing or behavior is useful.

Control section

The control side is represented as:

The original 6502 is associated with PLA-based direct instruction decoding rather than a conventional modern microcode engine.

Datapath

The major conceptual datapath elements are:

registers -> internal bus/latches -> ALU -> register/memory destination

Address formation uses high/low address components and indexed addressing logic.

Bus

The external interface exposes:

Each observable memory transaction is modeled as a bus event.

Design principle

The SLeeLa representation is intentionally compositional. A 6502 variant can replace only the couplers, I/O, timing, or opcode-specific components that differ rather than duplicating the entire CPU hierarchy.

Source: https://github.com/mamedev/mame/blob/master/docs/source/techspecs/m6502.rst