Skip to content
This repository has been archived by the owner on Feb 5, 2020. It is now read-only.

Latest commit

 

History

History
123 lines (72 loc) · 3.14 KB

README.md

File metadata and controls

123 lines (72 loc) · 3.14 KB

LAVAL simulator

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:

English documentation

Documentation française

Some examples programs are available here.

Getting Started

Prerequisites

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

Compiling

Simulator:

mkdir build
cd build
cmake ..
make

Documentation:

cd doc
./build.sh

Running the tests

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.

Using the simulator

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

Built With

  • 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

Contributing

Please read CONTRIBUTING.md for details on the process for submitting pull requests.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the GNU GPLv3 License - see the LICENSE.md file for details.

Acknowledgments

  • TIS-100, an assembly language programming game nobody never asked for but greatly inspired me!