From 8fcb210c336a50b81cf726e161ed82981bfbec5d Mon Sep 17 00:00:00 2001 From: ymherklotz Date: Fri, 22 Jan 2021 21:30:03 +0000 Subject: deploy: a596c0c469d7c61b5ed8dfaf8805a926024a3a72 --- docs/building/index.html | 2 +- docs/index.html | 2 +- docs/using-vericert/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'docs') diff --git a/docs/building/index.html b/docs/building/index.html index 20d5841..2fa9951 100644 --- a/docs/building/index.html +++ b/docs/building/index.html @@ -5,7 +5,7 @@ The project is written in Coq, a theorem prover, which is extracted to OCaml so Coq: theorem prover that is used to also program the HLS tool.">Building Vericert | Vericert
Building Vericert -

To build Vericert, the provided Makefile can be used. External dependencies are needed to build the project, which can be pulled in automatically with nix using the provided default.nix and shell.nix files.

The project is written in Coq, a theorem prover, which is extracted to OCaml so that it can then be compiled and executed. The dependencies of this project are the following:

  • Coq: theorem prover that is used to also program the HLS tool.
  • OCaml: the OCaml compiler to compile the extracted files.
  • bbv: an efficient bit vector library.
  • dune: build tool for ocaml projects to gather all the ocaml files and compile them in the right order.
  • menhir: parser generator for ocaml.
  • findlib to find installed OCaml libraries.
  • GCC: compiler to help build CompCert.

These dependencies can be installed manually, or automatically through Nix.

Downloading CompCert +

Building Vericert

To build Vericert, the provided Makefile can be used. External dependencies are needed to build the project, which can be pulled in automatically with nix using the provided default.nix and shell.nix files.

The project is written in Coq, a theorem prover, which is extracted to OCaml so that it can then be compiled and executed. The dependencies of this project are the following:

  • Coq: theorem prover that is used to also program the HLS tool.
  • OCaml: the OCaml compiler to compile the extracted files.
  • bbv: an efficient bit vector library.
  • dune: build tool for ocaml projects to gather all the ocaml files and compile them in the right order.
  • menhir: parser generator for ocaml.
  • findlib to find installed OCaml libraries.
  • GCC: compiler to help build CompCert.

These dependencies can be installed manually, or automatically through Nix.

Downloading CompCert #

CompCert is added as a submodule in the lib/CompCert directory. It is needed to run the build process below, as it is the one dependency that is not downloaded by nix, and has to be downloaded together with the repository. To clone CompCert together with this project, you can run:

git clone --recursive https://github.com/ymherklotz/vericert
 

If the repository is already cloned, you can run the following command to make sure that CompCert is also downloaded:

git submodule update --init
 

Setting up Nix diff --git a/docs/index.html b/docs/index.html index a38e747..3ef9d95 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,4 +4,4 @@ The design shown in Figure 1 shows how Vericert leverages an existing verified C compiler called CompCert to perform this translation.">Docs | Vericert
Docs -

Vericert translates C code into a hardware description language called Verilog, which can then be synthesised into hardware, to be placed onto a field-programmable gate array (FPGA) or application-specific integrated circuit (ASIC).

Figure 1: Current design of Vericert, where HTL is an intermediate language representing a finite state machine with data-path (FSMD) and Verilog is the target language.

Figure 1: Current design of Vericert, where HTL is an intermediate language representing a finite state machine with data-path (FSMD) and Verilog is the target language.

The design shown in Figure 1 shows how Vericert leverages an existing verified C compiler called CompCert to perform this translation.

\ No newline at end of file +

Docs

Vericert translates C code into a hardware description language called Verilog, which can then be synthesised into hardware, to be placed onto a field-programmable gate array (FPGA) or application-specific integrated circuit (ASIC).

Figure 1: Current design of Vericert, where HTL is an intermediate language representing a finite state machine with data-path (FSMD) and Verilog is the target language.

Figure 1: Current design of Vericert, where HTL is an intermediate language representing a finite state machine with data-path (FSMD) and Verilog is the target language.

The design shown in Figure 1 shows how Vericert leverages an existing verified C compiler called CompCert to perform this translation.

\ No newline at end of file diff --git a/docs/using-vericert/index.html b/docs/using-vericert/index.html index c97296d..d410356 100644 --- a/docs/using-vericert/index.html +++ b/docs/using-vericert/index.html @@ -3,7 +3,7 @@ void matrix_multiply(int first[2][2], int second[2][2], int multiply[2][2]) { in void matrix_multiply(int first[2][2], int second[2][2], int multiply[2][2]) { int sum = 0; for (int c = 0; c < 2; c++) { for (int d = 0; d < 2; d++) { for (int k = 0; k < 2; k++) { sum = sum + first[c][k]*second[k][d]; } multiply[c][d] = sum; sum = 0; } } } int main() { int f[2][2] = {{1, 2}, {3, 4}}; int s[2][2] = {{5, 6}, {7, 8}}; int m[2][2] = {{0, 0}, {0, 0}}; matrix_multiply(f, s, m); return m[1][1]; } It can be compiled using the following command, assuming that vericert is somewhere on the path.">Using Vericert | Vericert
Using Vericert -

Vericert can be used to translate a subset of C into Verilog. As a simple example, consider the following C file (main.c):

void matrix_multiply(int first[2][2], int second[2][2], int multiply[2][2]) {
+

Using Vericert

Vericert can be used to translate a subset of C into Verilog. As a simple example, consider the following C file (main.c):

void matrix_multiply(int first[2][2], int second[2][2], int multiply[2][2]) {
     int sum = 0;
     for (int c = 0; c < 2; c++) {
 	for (int d = 0; d < 2; d++) {
-- 
cgit