{"id":13831507,"url":"https://github.com/project-oak/silveroak","last_synced_at":"2025-10-01T02:31:02.951Z","repository":{"id":40012030,"uuid":"199936427","full_name":"project-oak/silveroak","owner":"project-oak","description":"Formal specification and verification of hardware, especially for security and privacy.","archived":true,"fork":false,"pushed_at":"2022-05-19T03:23:23.000Z","size":37837,"stargazers_count":124,"open_issues_count":37,"forks_count":20,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-09-23T21:32:02.878Z","etag":null,"topics":["coq","formal-verification","hardware"],"latest_commit_sha":null,"homepage":"","language":"Coq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/project-oak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-31T22:17:44.000Z","updated_at":"2024-09-22T04:16:06.000Z","dependencies_parsed_at":"2022-07-27T09:48:32.222Z","dependency_job_id":null,"html_url":"https://github.com/project-oak/silveroak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-oak%2Fsilveroak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-oak%2Fsilveroak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-oak%2Fsilveroak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/project-oak%2Fsilveroak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/project-oak","download_url":"https://codeload.github.com/project-oak/silveroak/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867670,"owners_count":16554395,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["coq","formal-verification","hardware"],"created_at":"2024-08-04T10:01:29.583Z","updated_at":"2025-10-01T02:31:00.707Z","avatar_url":"https://github.com/project-oak.png","language":"Coq","funding_links":[],"categories":["Coq"],"sub_categories":[],"readme":"# Silver Oak\n\nSilver Oak is a research project at Google Research exploring alternative\ntechniques for producing high assurance circuits and systems based on an\napproach that unifies specification, implementation and formal verification\nin a single system, specifically the [Coq](https://coq.inria.fr/) interactive\ntheorem prover. We follow an approach inspired by the vision set out by\n[Adam Chlipala](http://adam.chlipala.net/) at MIT in his book\n[Certified Programming with Dependent Types](http://adam.chlipala.net/cpdt/).\n\nThe Silver Oak project focuses on the design and verification of high assurance variants\nof some of the peripherals used in the [OpenTitan](https://opentitan.org/) silicon root of trust e.g.\nthe AES crypto-accelerator block. We focus on the specification, implementation\nand verification of low-level structural circuits built bottom up by composing\nbasic circuit elements (gates, registers, wires) using powerful higher order\ncombinators in the style of [Lava](https://dl.acm.org/doi/abs/10.1145/291251.289440).\nAnother Coq-based approache for producing hardware is\n[Kami](https://plv.csail.mit.edu/kami/) which encodes aspects of the\n[Bluespec](http://wiki.bluespec.com/) hardware description language as a EDSL in Coq.\nKami and Bluespec are powerful tools for designing processor-style control-orientated\ncircuits. We focus instead on \"network-style\" and \"daatpath\" low level circuits\ne.g. hardware accelerators for AES.\n\nA key design goal for our project is to produce hardware which are just as\nefficient as the existing blocks written by hardware engineers in SystemVerilog.\nConsequently our design decisions focus on giving the designer a lot of\ncontrol over the generated circuit netlist by using high level combinators\nto make low level circuit design more productive and more ameanble to\nformal verification. The EDSL we are developing for this task is called\nCava (Coq + Lava).\n\nOur verification work is focused on specification and verification of\ncircuit designs (i.e. \"programs\") and not currently on the \"compiler\" i.e.\nthe infrastructure that maps form Cava EDSL in Coq to SystemVerilog. Complementary\nwork is under way at other research groups that tackle the compiler\nverification challenge for hardware RTL synthesis to gates e.g.\n[Verified Compilation on a Verified Processor](https://ts.data61.csiro.au/publications/csiro_full_text/Loeoew_KTMNAF_19.pdf).\n\n## The Code\n\nThe code is currently very experimental and in constant flux! Please see the [contributing guide](CONTRIBUTING.md) for how to submit push\nrequests.\n\n## Pre-requisites\n\nPlease install the following components:\n\n* The [Coq proof assistant](https://coq.inria.fr/) version 8.13.0.\n* The [GHC Haskell compiler](https://www.haskell.org/ghc/) version 8.6 or later (note that if you install the [Haskell Platform](https://www.haskell.org/platform/) then you get Cabal, too).\n* [Cabal](https://www.haskell.org/cabal/) version 3.0.0.0 or later.\n* [Verilator](https://www.veripool.org/wiki/verilator) version 4.104 (as specified by the\n  [OpenTitan](https://docs.opentitan.org/doc/ug/install_instructions/#verilator) documentation).\n\nTo re-build the OpenTitan system with the Cava versions of the high assurance\nperipherals you will also need to install\n[OpenTitan](https://github.com/lowRISC/opentitan/blob/master/README.md). You\ncan follow the instructions\n[here](https://docs.opentitan.org/doc/ug/getting_started_verilator/).\n\n## Building\n\nTo build the Cava system and its examples and run tests, type `make` in the root directory of the repo.\n\n```console\n$ cd silveroak\n$ git submodule update --init --recursive\n$ make\n```\n\nTo remove all automatically generated files (this may be needed after upgrading Coq, for example):\n```console\n$ make cleanall\n```\n\nTo remove files generated as part of `silveroak`, but leave dependencies' in-tree compilation artifacts:\n```console\n$ make clean\n```\n\n## Updating git submodules\n\nAlthough infrequent, commits may update the git submodules used by this project.\nGit does not automatically update submodules, and so to cleanly update submodule\ndependencies run the `make update-third_party` rule.\n\n```console\n$ cd silveroak\n$ make update-third_party\n```\n\nor equivalently\n\n```console\n$ cd silveroak\n$ git submodule update --init --recursive\n$ make cleanall\n```\n\n## Building documentation\n\nDocumentation is either in automatically-built `.md` files under `docs/`, or in\nCoq files under `demos/` that are converted to HTML using the Alectryon tool.\nTo build these Alectryon files, you need to install Alectryon as an optional\ndependency. The procedure is:\n\n- Install [alectryon](https://github.com/cpitclaudel/alectryon) dependencies\n  following their README\n- Clone alectryon\n- Set an environment variable `ALECTRYON_PATH` to the path to your clone\n- Call `make html` from the `demos/` directory\n\n## Cava Examples\nSee [Cava Examples](https://github.com/project-oak/silveroak/blob/main/examples/README.md) for a few examples of circuits described in Cava, proofs about their behaviour and extraction to SystemVerilog circuits for simulation and FPGA implementation.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-oak%2Fsilveroak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fproject-oak%2Fsilveroak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fproject-oak%2Fsilveroak/lists"}