A cross-platform RISC-V emulator written in Object Pascal.
The project is currently a work in progress, with the codebase organized around a small set of core modules for CPU execution, instruction decoding, memory access, and MMU support.
This repository contains the emulator implementation, build scripts, and supporting documentation for ongoing RISC-V development.
The current focus is on the core execution pipeline and related infrastructure needed to run and validate RISC-V programs from a bare-metal environment.
main.pas- Application entry point and runtime harnessuCPU.pas- CPU state and execution helpersuDecoder.pas- Instruction decoding logicuExecute.pas- Instruction execution logicuBus.pas- Memory and bus access helpersuMMU.pas- MMU and address translation supportSV32Arch.md- Notes and reference material for Sv32 architecture supportMakefile- Build, run, and clean targets.github/workflows- CI workflows for build validation and release checks
To build the project locally, install:
- Free Pascal Compiler (
fpc) make
On macOS or Linux, ensure both tools are available on your PATH.
Build the project with:
make buildTo rebuild from a clean state:
make clean
make buildYou can also build in debug mode:
make BUILD_MODE=debug buildRun the emulator with:
make runThe repository includes GitHub Actions workflows to validate builds automatically:
- Build validation on push and pull request
- Debug build checks
- Smoke-run verification
- Release artifact packaging
- Nightly build verification
The long-term development plan is documented in PLAN.md and is organized into the following phases:
- RV32I/M interpreter and bare-metal execution
- Sv32 MMU support, CSRs, and simple OS booting
- Pascal JIT core with basic block translation and code caching
- Buildroot Linux boot support
No license has been specified yet.