How kost623/nezalezhnyk works
Nezalezhnyk is an early-stage open CPU architecture project whose implemented product is a C++ instruction-set simulator, with command-line demonstrations and an optional Qt GUI. The main workflow is to provide encoded instructions, load them into simulated memory, then fetch, decode, and execute them while updating registers, memory, and the program counter. The graph includes the documented base-ISA definition and the sampled ALU, memory, and register layers. The encoder implementation and GUI header were not sampled, so their internal behavior is shown only where the available call sites support it.
Main entry points: mainwindow.cpp Simulator GUI · cpu.cpp CPU control · main.cpp CLI demos · register_model.hpp Register view model
Components 12
User interfaces
- CLI demos
src/main.cpp - Simulator GUI
src/gui/mainwindow.cpp - GUI entry
src/gui/main.cpp - Register view model
src/gui/register_model.hpp
Instruction definition
- Instruction encoder
src/encoder.cpp - ISA decode and definitions
src/isa.cpp
CPU execution
- CPU control
src/cpu.cpp - ALU
src/alu.cpp
Machine state
- Register file
include/nezalezhnyk/register_file.hpp - Simulated memory
src/memory.cpp
Other components
- User
- Program binary
Connections 15
- User → CLI demos: runs demos
- CLI demos → Instruction encoder: encodes instructions
- CLI demos → CPU control: loads and runs
- User → Simulator GUI: operates
- GUI entry → Simulator GUI: creates window
- Program binary → Simulator GUI: provides program
- Simulator GUI → CPU control: loads, steps, runs
- Simulator GUI → Simulated memory: reads display words
- Simulator GUI → ISA decode and definitions: decodes display words
- Simulator GUI → Register view model: refreshes
- Register view model → Register file: reads values
- CPU control → Simulated memory: fetches and accesses
- CPU control → ISA decode and definitions: decodes fetched words
- CPU control → ALU: executes ALU ops
- CPU control → Register file: reads and writes