Documentation and tooling for my toy "smol2" 32-bit CPU architecture.
doc/cpu.md
: CPU & ISA documentationsrc/
: Emulator sourcesmol2/asm/
: Source code for the Python-based assemblersmol2/examples/
: Assembly examples & demos- 🔗 WIP, undocumented LLVM backend (see the 🔗 actual code changes)
You require a recent CMake and C++20 compiler. Currently, the emulator framebuffer depends on SFML, which needs to be installed.
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RELEASE
make -j
Most of the CPU architecture is defined and documented at this point, though there are still moving parts, and there will probably still be quite a few changes to it.
MMIO peripherals are mostly experimental, the framebuffer is subject to change and more IO will be provided (audio, keyboard, storage).
Currently, a simple C++ emulator and a basic Python assembler are implemented.
Some basic demos run, including a Brainfuck interpreter and a Bad Apple demo (because, of course, I had to).
An LLVM backend is under early development.
A hardware implementation using Amaranth (or possibly another HDL) is planned, but a C++ pipelined core emulator might happen before that.