This repo contains the source code and specifications for a VM that simulates the BRIC instruction set. This project is mainly academic and I haven't gotten around to writing proper tests yet, so there is a high likelihood of bugs being present.
For an implentation of the BRIC architecture see BRIC_IMPL
The instruction set is detailed in ISA and the save formats in vmformat.
Prerequisites: You need to have git and a rust toolchain installed.
- Get the source using
gitand the move into the directory you just cloned. - Run
cargo build --release - Your executables should be in
./target/release
- Write some
basmcode. You can look at the example, which doesn't do much but showcases some of the assembler features. You can also look at the assembly docs. - Assemble your
basmcode into abvmfile using thebasmexecutable. - Run your code in the debugger using the
bdbexecutable. See bdb for help.
This project is far from finished. Here are some features that are yet to be implemented:
- Graphics MMIO. The idea is to implement a very basic graphics API and display the result using a custom display crate built using the
WGPUcrate. - Network MMIO for network communication.
- Implementation of the computer on an FPGA using verilog
- Extend the assembler to include some simplifying mnemonics
- Implement the instruction set as a LLVM backend
Furthermore here are some niceties for existing features that are missing:
- Serialization and deserialization of memory mappings and memory blocks
- UART support in the VM
- Debugger memory editing
- Debugger memory breakpoints
- Comprehensive tests. Currently there exist limited tests for the VM but more comprehensive tests would be nice and testing the assembler would also be important.