This repository contains documentation and source code for the LAVAL CPU and its simulator. The LAVAL CPU is a custom made CPU architecture and ISA first made as a challenge for the CSGames 2018. Participants had to program simple algorithms in assembly.
For more information on the architecture, refer to the manual:
Some examples programs are available here.
To compile this project you need:
GCC >= 7.1
cmake
GCC 7 is available in ArchLinux Core repository and in Ubuntu 17.10. If you are using an older Ubuntu release, you can use this ppa to easily download a new GCC version. Any distros should work as long as you somehow install GCC 7.
It should be possible to build this project using a recent version of Clang but it currently have issues compiling some C++ features.
Refer to 31852 and 33222 for more information.
It is probably feasible to work around those bug by using clang's libc++
instead of GCC's libstdc++
.
Please contact me if you successfully built this project using clang.
To compile documentation from markdown to pdf, you need
pandoc
Simulator:
mkdir build
cd build
cmake ..
make
Documentation:
cd doc
./build.sh
Tests are programmed using the Catch2 testing framework. After compiling, run the generated test executable:
./build/lib/tests/LavalTests
As of today, some tests are outdated, expect some failures.
Please refer to its included help:
./build/sources/simulator --help
For most use cases, you probably want to both compile and simulate your programs like so:
./build/sources/simulator -cs lib/tests/integration/multiplication.laval
Called this way, the simulator will get its inputs from stdin. This also allows you to provide inputs using a file:
./build/sources/simulator -cs lib/tests/integration/gaussian_small.laval < lib/tests/integration/spaceship.in
- catch2 - Test framework
- cereal - Used by the assembler to serialize some structure to binary
- GSL - A useful library to support modern and safe C++ development
Please read CONTRIBUTING.md for details on the process for submitting pull requests.
- Jérôme de Courval - jdecourval
See also the list of contributors who participated in this project.
This project is licensed under the GNU GPLv3 License - see the LICENSE.md file for details.
- TIS-100, an assembly language programming game nobody never asked for but greatly inspired me!