Commit 9db7f9b0 authored by PATUREL Joseph's avatar PATUREL Joseph
Browse files

README update

parent e0dc4f83
Pipeline #101844 passed with stages
in 2 minutes and 59 seconds
......@@ -3,32 +3,22 @@
[![pipeline status](https://gitlab.inria.fr/srokicki/Comet/badges/master/pipeline.svg)](https://gitlab.inria.fr/srokicki/Comet/commits/master)
RISC-V 32-bit processor written in C++ for High Level Synthesis (HLS).
RV32I base ISA, support for M extension
## Comet RTL files
The latest working RTL sources of comet are downloadable for ASIC or FPGA targets following those two links :
- [Latest ASIC RTL](https://gitlab.inria.fr/srokicki/comet/-/jobs/artifacts/master/browse?job=catapult_ASIC)
- [Latest Xilinx RTL](https://gitlab.inria.fr/srokicki/comet/-/jobs/artifacts/master/browse?job=catapult_Xilinx)
A RISC-V 32-bit processor written in C++ for High Level Synthesis (HLS).
Support for the RV32I base ISA only, support for the M extension can be found on [another branch](https://gitlab.inria.fr/srokicki/Comet/tree/rv32im). There is [branch dedicated to the support of the F extension](https://gitlab.inria.fr/srokicki/Comet/tree/rv32imf) but it is not stable yet and may not be in a functional state.
## Dependencies
To compile the simulator:
- cmake
- the boost program_options library
The only dependency to satisfy in order to build the simulator is `cmake`.
To compile the tests:
To compile the tests, a RISC-V toolchain and libraries are needed:
- [RISC-V GNU toolchain](https://github.com/riscv/riscv-tools)
## Building the simulator
Once the repository cloned, `cd` into it.
Make sure that the dependencies are met by installing `cmake` using your package manager or directly from the sources.
For exemple on a debian based system, run `sudo apt install cmake`.
Once the repository cloned, `cd` into it.
```
mkdir build && cd build
cmake ..
......@@ -51,24 +41,25 @@ cd riscv-gnu-toolchain
The toolchain is dependant on a few packages that can be installed using :
```
sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev gawk\
build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev
```
on a Debian based system.
Or using :
```
sudo yum install autoconf automake libmpc-devel mpfr-devel gmp-devel gawk bison flex texinfo patchutils gcc gcc-c++ zlib-devel expat-devel
sudo yum install autoconf automake libmpc-devel mpfr-devel gmp-devel gawk bison flex texinfo patchutils\
gcc gcc-c++ zlib-devel expat-devel
```
on Fedora/CentOS/RHEL OS systems
Comet implements the 32bit ISA with the M extension (hardware multiply) and has no hardware floating point support.
The build process needs to be configured accordingly.
The build process needs to be configured function of which extension is supported by the core. In our case, we enable support for the base ISA only:
```
./configure --prefix=$RISCV --with-arch=rv32im --with-abi=ilp32
./configure --prefix=$RISCV --with-arch=rv32i --with-abi=ilp32
make
```
Once the toolchain compiled it is a good idea to add it's installation directory to the your system's PATH :
Once the toolchain compiled it is a good idea to add it's installation directory to the your PATH :
```
export PATH = $PATH:$RISCV/bin
```
......@@ -83,17 +74,17 @@ This repository includes a basic set of benchmarks (`dijkstra`, `matmul`, `qsort
cd <repo_root>/tests
make
```
The `make` command will compile the tests for a RISC-V target as well for your system and will collect their expected output.
The `make` command will compile the tests for a RISC-V target and for your system and will collect their expected output.
This will allow the `runTests.sh` script to check the behavior of Comet against a verified CPU (your system's).
##### Adding a test
To add a test to the test pool, add a folder in the `tests` folder at the root of the repository. This folder needs to named like the binary it will contain.
To add a test to the test pool, add a folder in the `tests` directory at the root of the repository. This folder needs to be named like the binary it will contain.
> Exemple : the `qsort` folder contains the `qsort.riscv32` binary
The folder must contain the sources of the program and a makefile.
The binary produced by the makefile must be named like the folder it's contained in and bear the .riscv32 extension.
The binary produced by the makefile must be named like the folder it's contained in and bear the `.riscv32` extension.
For the test to be valid, a file named `expectedOutput` needs to be created. It must contain the standard output that the test is supposed to produce.
......@@ -106,7 +97,7 @@ The `runTests.sh` script executes all the tests present in the `tests` subfolder
Please make sure that the tests you add all execute within the bounds of this timeout with a reasonable margin.
## Simulator
To run the simulator execute the `comet.sim` in `<repo_root>/build/bin`.
To run the simulator execute the `comet.sim` located in `<repo_root>/build/bin`.
You can provide a specific binary to be run by the simulator using the `-f <path_to_the_binary>` switch.
The `-i` and `-o` switches are used to specify the benchmark's standard input and output respectively.
......@@ -115,12 +106,6 @@ The `-a` switch allows to pass arguments to the benchmark that is being run by t
For further information about the arguments of the simulator, run `comet.sim -h`.
## Todo
- Fix artifacts lifetime once the version allows it (or make something that pushes automatically every 200 years)
- Add CSR support
- Add a linter to the project
## Publication
- "<a href="https://hal.archives-ouvertes.fr/hal-02303453v1">What You Simulate Is What You Synthesize: Designing a Processor Core from C++ Specifications</a>", in 38th IEEE/ACM International Conference on Computer-Aided Design
......@@ -134,6 +119,7 @@ The following persons contributed to the Comet project:
- Davide Pala
- Joseph Paturel
- Valentin Egloff
- Edwin Mascarenhas
- Edwin Mascarenhas
- Gurav Datta
- Olivier Sentieys
\ No newline at end of file
- Lauric Desauw
- Olivier Sentieys
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment