How runningbrute/8051-simulator works
This is a learning-oriented Intel 8051 simulator: a user supplies an assembly file, the application assembles it, resets and loads the simulated system, then repeatedly steps the CPU. The tree identifies assembler stages, CPU execution components, instruction modules, and memory/register modules, but their implementations were not sampled, so their internal wiring is omitted. The README documents the CPU-and-memory emulation scope; the only directly evidenced runtime calls are those in src/main.cpp.
Main entry points: main.cpp Application Entry · system.cppm Simulated System · logger.cppm Application Logger · assembler.cppm Assembler
Components 20
Application
- Application Entry
src/main.cpp - Application Logger
src/logger.cppm
Assembly
CPU Execution
- CPU Core
src/cpu/cpu.cppm - Instruction Fetcher
src/cpu/cpu_fetcher.cppm - Instruction Dispatcher
src/cpu/cpu_dispatcher.cppm - CPU Context
src/cpu/cpu_context.cppm - CPU ALU
src/cpu/cpu_alu.cppm - ALU Instructions
src/instructions/alu.cppm - Data Instructions
src/instructions/data.cppm
Hardware State
- Simulated System
src/system.cppm - CPU Registers
src/cpu/cpu_registers.cppm - Memory
src/memory.cppm - Memory Bus
src/memory_bus.cppm - Registers
src/registers.cppm - I/O
src/io.cppm
Other components
- Program User
Connections 5
- Program User → Application Entry: provides program
README.md - Application Entry → Application Logger: starts logging
src/main.cpp - Application Entry → Assembler: assembles file
src/main.cpp - Application Entry → Simulated System: resets and loads
src/main.cpp - Application Entry → Simulated System: steps CPU
src/main.cpp