All Projects → ymherklotz → vericert

ymherklotz / vericert

Licence: GPL-3.0 license
A formally verified high-level synthesis tool based on CompCert and written in Coq.

Programming Languages

Coq
218 projects
ocaml
1615 projects
SystemVerilog
227 projects
scheme
763 projects
tcl
693 projects
shell
77523 projects

Projects that are alternatives of or similar to vericert

ruby-vpi
Ruby interface to IEEE 1364-2005 Verilog VPI
Stars: ✭ 15 (-76.19%)
Mutual labels:  verification, verilog
Logic
CMake, SystemVerilog and SystemC utilities for creating, building and testing RTL projects for FPGAs and ASICs.
Stars: ✭ 149 (+136.51%)
Mutual labels:  verification, verilog
Riscv
RISC-V CPU Core (RV32IM)
Stars: ✭ 272 (+331.75%)
Mutual labels:  verification, verilog
pcievhost
PCIe (1.0a to 2.0) Virtual host model for verilog
Stars: ✭ 22 (-65.08%)
Mutual labels:  verification, verilog
Coqhammer
CoqHammer: An Automated Reasoning Hammer Tool for Coq - Proof Automation for Dependent Type Theory
Stars: ✭ 157 (+149.21%)
Mutual labels:  coq, verification
Cocotb
cocotb, a coroutine based cosimulation library for writing VHDL and Verilog testbenches in Python
Stars: ✭ 740 (+1074.6%)
Mutual labels:  verification, verilog
Awesome Open Hardware Verification
A List of Free and Open Source Hardware Verification Tools and Frameworks
Stars: ✭ 103 (+63.49%)
Mutual labels:  verification, verilog
Cosette
Cosette is an automated SQL solver.
Stars: ✭ 533 (+746.03%)
Mutual labels:  coq, verification
Ergo
The Language for Smart Legal Contracts
Stars: ✭ 108 (+71.43%)
Mutual labels:  coq, verification
Perennial
Verifying concurrent crash-safe systems
Stars: ✭ 57 (-9.52%)
Mutual labels:  coq, verification
koika
A core language for rule-based hardware design 🦑
Stars: ✭ 103 (+63.49%)
Mutual labels:  semantics, coq
Fpga readings
Recipe for FPGA cooking
Stars: ✭ 164 (+160.32%)
Mutual labels:  coq, verilog
async fifo
A dual clock asynchronous FIFO written in verilog, tested with Icarus Verilog
Stars: ✭ 117 (+85.71%)
Mutual labels:  verification, verilog
qcert
Compilation and Verification of Data-Centric Languages
Stars: ✭ 50 (-20.63%)
Mutual labels:  verification
libvata
VATA Tree Automata Library
Stars: ✭ 23 (-63.49%)
Mutual labels:  verification
imm
Intermediate Memory Model (IMM) and compilation correctness proofs for it
Stars: ✭ 15 (-76.19%)
Mutual labels:  coq
Hard-JPEG-LS
FPGA-based JPEG-LS image compressor.
Stars: ✭ 52 (-17.46%)
Mutual labels:  verilog
VerificationCodeBox
验证码 && 密码 校验View(类似于支付宝、网商银行等密码校验框)
Stars: ✭ 25 (-60.32%)
Mutual labels:  verification
ARM9-compatible-soft-CPU-core
This ARMv4-compatible CPU core is written in synthesiable verilog.It could launch uCLinux and Linux in MODELSIM. It has high Dhrystone benchmark value: 1.2 DMIPS/MHz. It could be utilized in your FPGA design as one submodule, if you master the interface of this .v file. This IP core is very compact. It is one .v file and has only less 1800 lines.
Stars: ✭ 42 (-33.33%)
Mutual labels:  verilog
vboard
Virtual development board for HDL design
Stars: ✭ 32 (-49.21%)
Mutual labels:  verilog

 

A formally verified high-level synthesis (HLS) tool written in Coq, building on top of CompCert. This ensures the correctness of the C to Verilog translation according to our Verilog semantics and CompCert’s C semantics, removing the need to check the resulting hardware for behavioural correctness.

Features

Currently all proofs of the following features have been completed.

  • all int operations,
  • non-recursive function calls,
  • local arrays and pointers
  • control-flow structures such as if-statements, for-loops, etc…

Building

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.
  • 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 Vericert and 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, and check it out at the correct revision, you can run:

git clone -b v1.2.2 --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 and the correct branch is checked out:

git checkout v1.2.2
git submodule update --init

Setting up Nix

Nix is a package manager that can create an isolated environment so that the builds are reproducible. Once nix is installed, it can be used in the following way.

To open a shell which includes all the necessary dependencies, one can use:

nix-shell

which will open a shell that has all the dependencies loaded.

Makefile build

If the dependencies were installed manually, or if one is in the nix-shell, the project can be built by running:

make -j8

and installed locally, or under the PREFIX location using:

  make install

Which will install the binary in ./bin/vericert by default. However, this can be changed by changing the PREFIX environment variable, in which case the binary will be installed in $PREFIX/bin/vericert.

Running

To test out vericert you can try the following examples which are in the test folder using the following:

./bin/vericert test/loop.c -o loop.v
./bin/vericert test/conditional.c -o conditional.v
./bin/vericert test/add.c -o add.v

Citation

If you use Vericert in any way, please cite it using our OOPSLA’21 paper:

@inproceedings{herklotz21_fvhls,
  author = {Herklotz, Yann and Pollard, James D. and Ramanathan, Nadesh and Wickerson, John},
  title = {Formal Verification of High-Level Synthesis},
  year = {2021},
  number = {OOPSLA},
  numpages = {30},
  month = {11},
  journal = {Proc. ACM Program. Lang.},
  volume = {5},
  publisher = {Association for Computing Machinery},
  address = {New York, NY, USA},
  doi = {10.1145/3485494}
}

License

This project is licensed under GPLv3. The license can be seen in LICENSE.

The following external code and its license is present in this repository:

Copyright (c) 2008,2009,2010 Jean-Baptiste Tristan and INRIA
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].