MIPS64r6 SoC implementation with a 5-stage in-order pipeline (2-cycle MEM stage) and peripheral components, simulated and tested with Verilator.
mips64el-linux-gnu-binutilstoolchains(asandobjdump), they're under mips64el-linux-gnu-binutils in Arch Linux.verilatorhttps://github.com/verilator/verilator for simulations and tests.googletesthttps://github.com/google/googletest for test framework.- [OPTIONAL]
Vivadohttps://www.amd.com/en/products/software/adaptive-socs-and-fpgas/vivado.html I upload vivado projects underboards/. - [OPTIONAL] If you like to write C directly, I mainly use
mips64el-linux-gnu-gcc-bootstrapwithmuslassysroot. Usescripts/install_mips64el_musl.shto download musl and mips64el-linux-gnu-gcc-bootstrap. - [OPTIONAL]
sdl3https://github.com/libsdl-org/SDL for any simulation with VGA output. - [OPTIONAL]
lcovhttps://github.com/linux-test-project/lcov for gather coverage data. - [OPTIONAL]
ftxuihttps://github.com/ArthurSonzogni/FTXUI for building the debugger TUI. - [OPTIONAL]
capstonehttps://github.com/capstone-engine/capstone for show disassembly in debugger TUI.
cmake -B build .cmake --build build -j ${$(nproc)-1}to build all. All binaries are placed underbuild/bin.cmake --build build --target allTeststo build all tests../runAllTests.shto run all generated tests underbuild/bin(by cmake), and useDUMP_COV=1 ./runAllTests.shto dump coverage data.cmake --build build --target <script_name>to compile script into memory.dat, e.g.hello_world_c.
- 5-stage in-order pipeline with forwarding and hazard detection
- L1 instruction & data cache with arbiter
- CP0 coprocessor: timer interrupt, syscall, break, overflow exception
- Peripherals via MMIO: VGA (640×480 @ 72Hz, deprecated), Timer, LED, mock stdout (simulation only)
- TUI GDB-style debugger with pipeline state, registers, memory, and peripheral views
See open milestones for planned features.
debugger_tuiGDB-style TUI debugger with information about pipeline(disassembly bycapstone), registers, memory, peripherals.SOC_debugenable debug print and press any key to step.SOC_simrun simulation under info log.SOC_run_simrun simulation without info log.SOC_VGA_simrun simulation with VGA output(provided bySDL3).VGA_simrun demo VGA simulation.
Schematic diagrams, synthesized and generated by Vivado