{"id":21161900,"url":"https://github.com/princetonuniversity/autosva","last_synced_at":"2025-07-09T14:31:48.861Z","repository":{"id":82064515,"uuid":"353737142","full_name":"PrincetonUniversity/AutoSVA","owner":"PrincetonUniversity","description":"AutoSVA is a tool to automatically generate formal testbenches for unit-level RTL verification. The goal is to, based on annotations made in the signal declaration section of an RTL module, generate liveness properties so that the module would eventually make forward progress. ","archived":false,"fork":false,"pushed_at":"2024-03-29T13:00:14.000Z","size":59757,"stargazers_count":73,"open_issues_count":0,"forks_count":22,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-17T09:39:10.405Z","etag":null,"topics":["design","methodology-development","rtl","sva","systemverilog","verification","verilog"],"latest_commit_sha":null,"homepage":"https://blog.yosyshq.com/p/community-spotlight-autosva/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrincetonUniversity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-01T15:02:53.000Z","updated_at":"2024-10-09T20:20:37.000Z","dependencies_parsed_at":"2024-01-17T07:59:57.427Z","dependency_job_id":"f2fb1c1c-5867-4a52-91e6-d0ef5ffc4776","html_url":"https://github.com/PrincetonUniversity/AutoSVA","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2FAutoSVA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2FAutoSVA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2FAutoSVA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrincetonUniversity%2FAutoSVA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrincetonUniversity","download_url":"https://codeload.github.com/PrincetonUniversity/AutoSVA/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225562135,"owners_count":17488588,"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":["design","methodology-development","rtl","sva","systemverilog","verification","verilog"],"created_at":"2024-11-20T13:18:38.833Z","updated_at":"2024-11-20T13:18:39.377Z","avatar_url":"https://github.com/PrincetonUniversity.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![AutoSVA Logo](/docs/autosva_logo.png?raw=true)\n\n# NEW WORK!\n**Check out our latest [paper](https://parallel.princeton.edu/papers/marcelo_autocc_camera_ready.pdf). AutoCC:** a methodology that leverages FPV to automatically discover covert channels in hardware that is time-shared between processes. AutoCC operates at RTL to exhaustively examine any machine state left by a process after a context switch that creates an execution difference. The AutoCC [github](https://github.com/morenes/AutoCC) contains the artifacts of the papers and the flow generation methodology, based on AutoSVA, enjoy!\n\n\n# AutoSVA Overview\n\nAutoSVA was build with the goal of making Formal Property Verification (FPV) more accesible for hardware designers. AutoSVA brings a simple language to make annotations in the signal declaration section of a module interface. This enables our to generate Formal Testbenches (FT) that check that transactions between hardware RTL modules follow their interface especifications. It does not check full correctness of the design but it automatically generate liveness properties (prevent duplicated responses, prevent requests being dropped) and some safety-relate properties of transactions, like data integrity, transaction invariants, uniqueness, stability... To understand this more fully you can read the [paper](https://arxiv.org/abs/2104.04003). AutoSVA is publised at the 58th ACM/IEEE Design Automation Conference ([DAC'21](https://ieeexplore.ieee.org/document/9586118/)) December 2021.\n\nThis [3 minute video](https://mediacentral.princeton.edu/media/AutoSVA%3A%20Democratizing%20Formal%20Verification%20of%20Hardware%20Module%20Interactions%2C%20Marcelo%20Vera%2C%20GS%20(2311653)/1_43nlgm4f) summarizes the AutoSVA approach\n\nTo cite our paper, please use:\n\n    @inproceedings{orenes2021autosva,\n    title={AutoSVA: Democratizing Formal Verification of RTL Module Interactions},\n    author={Orenes-Vera, Marcelo and Manocha, Aninda and Wentzlaff, David and Martonosi, Margaret},\n    booktitle={2021 58th ACM/IEEE Design Automation Conference (DAC)},\n    pages={535--540},\n    year={2021},\n    organization={IEEE}\n    }\n\n\n## AutoSVA Script parameters\n\nThe AutoSVA tool is based on a Python script, which takes the next arguments\n\n    Required argument\n      -f FILENAME, --filename FILENAME\n                            Path to DUT RTL module file.\n    Optional arguments\n      -h, --help            show this help message and exit\n      -src SOURCE [SOURCE ...], --source SOURCE [SOURCE ...]\n                        Path to source code folder where submodules are.\n      -i INCLUDE, --include INCLUDE\n                        Path to include folder that DUT and submodules use.\n      -as SUBMODULE_ASSERT [SUBMODULE_ASSERT ...], --submodule_assert SUBMODULE_ASSERT [SUBMODULE_ASSERT ...]\n                        List of submodules for which ASSERT the behavior of\n                        outgoing transactions.\n      -am SUBMODULE_ASSUME [SUBMODULE_ASSUME ...], --submodule_assume SUBMODULE_ASSUME [SUBMODULE_ASSUME ...]\n                        List of submodules for which ASSUME the behavior of\n                        outgoing transactions (ASSUME can constrain the DUT).\n      -x [XPROP_MACRO], --xprop_macro [XPROP_MACRO]\n                        Generate X Propagation assertions, specify argument to\n                        create property under \u003cMACRO\u003e (default none)\n      -tool [TOOL]      Backend tool to use [jasper|sby] (default sby)\n\nFor example:\n\n    python autosva.py -f \u003cDUT_PATH/DUT_NAME.v\u003e -v -src \u003cSRC_PATH\u003e -i \u003cINCLUDE_PATH\u003e\n\nYou can set the flag -v to generate the verbose output and see the parsing process\n\nOnce the FT is generated, you can run the FT on SBY like this:\n\n    ./run.sh \u003cDUT_NAME\u003e\n\n## Troubleshooting\n\nSVA files at the Formal Testbench (FT) are auto-generated every time you execute autosva_py on a DUT_NAME, but manual commands can be added manually to ft_\u003cDUT_NAME\u003e/FPV.sby, for example, to solve the next cases:\n\nA. When SBY is elaborating the project, if it complains about any RTL submodule or include not being found, add its path manually (more info at [SymbiYosys ReadTheDocs](https://symbiyosys.readthedocs.io/en/latest/))\n\nB. Alternatively, you can add blackbox \u003csubmodule\u003e for those submodule if you want to blackbox them\n\nC. If the RTL needs some defines to be set, do so also by appending \"read -define \u003cNAME\u003e=1\" after \"read -verific\"\n\n## Reproduce Results at Ariane\n\n### Requirements\n\n1. Python version 2 or superior\n2. A formal tool backend (two tools options are currently supported, you **only need one**)\n    * SymbiYosys (SBY) with Verific, e.g. provided by Tabby CAD at www.yosyshq.com (to **run with -tool sby**)\n    * JasperGold version \u003e= 2015.12 (to **run with -tool jg**)\n\n\n### Commands\n\n    # Clone the Ariane repository with the annotations to the modules\n    git clone https://github.com/morenes/cva6.git ariane\n    cd ariane\n    git checkout autosva\n    git submodule update --init --recursive --force src\n    cd ..\n\n    # Set DUT_ROOT and AUTOSVA_ROOT env variable\n    export DUT_ROOT=$PWD/ariane\n    export AUTOSVA_ROOT=$PWD\n\n    # Enter AutoSVA folder and run scripts to update relative Formal Testbenches (FT)\n    cd autosva \n    ./setup_ariane.sh\n    ./run.sh mmu      # lsu_lookup_transid_was_a_request shows the ghost response bug\n    \n\n## Quickstart tutorial. Reproduce the steps.\n\nIn the [14 minute Youtube tutorial](https://www.youtube.com/watch?v=Gb5wT1D7dxU) we create a Formal Property Verification (FPV) testbench for a FIFO queue. We show step by step how to generate it by adding 3 lines of code of annotations and simply pressing the play button. **Our transaction abstraction is applicable to many more modules, and out explicit annotations provide flexibility of names and interface styles, e.g. we support annotating when interfaces use structs, or when transactions do not seem obvious at first.**\n    \n### Commands used\n\n    export DUT_ROOT=$PWD/quickstart \n    export AUTOSVA_ROOT=$PWD\n    \n Then we added the following annotations to the fifo.v inside the quickstart folder\n    \n     /*AUTOSVA \n     fifo: in -IN\u003e out\n     [INFLIGHT_IDX-1:0] in_transid = fifo.buffer_head_reg\n     [INFLIGHT_IDX-1:0] out_transid = fifo.buffer_tail_reg\n     */\n \n Then we run the autosva tool, what will generate the formal testbench called 'ft_fifo':\n    \n     python autosva.py -f fifo.v -x XPROP -tool sby      #For SymbiYosys\n     python autosva.py -f fifo.v -x XPROP -tool jasper   #For JasperGold\n\n(To target JasperGold, use -tool jasper instead of -tool sby)\n    \n Then we run the formal property verification tool. We use the run script to run the fifo FT\n    \n     source run_sby.sh fifo   #For SymbiYosys\n     source run_jg.sh fifo    #For JasperGold\n    \n To watch the waveforms of a Counterexample (CEX) in SBY we use\n    \n     gtkwave ft_fifo/FPV_prv/engine_0/trace.vcd \u0026\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincetonuniversity%2Fautosva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprincetonuniversity%2Fautosva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprincetonuniversity%2Fautosva/lists"}