Plan formal verification of an ASIC IP from its design specification alone, check compliance with the standards it follows, write the test plan and the SVA limited to the keywords of the chosen formal tool, then run a tool the user supplies after the plan is approved. Use when the user asks to plan, write assertions for or run formal verification of an IP.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Vlsit Formal Verification?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nguyenquanicd-vlsit-formal-verification)
---
name: vlsit-formal-verification
description: Plan formal verification of an ASIC IP from its design specification alone, check compliance with the standards it follows, write the test plan and the SVA limited to the keywords of the chosen formal tool, then run a tool the user supplies after the plan is approved. Use when the user asks to plan, write assertions for or run formal verification of an IP.
compatibility: Python 3.8 or later using the standard library only, on Windows or Linux. Windows PowerShell 5.1 (Windows) or POSIX sh (Linux, macOS) is used only to locate or install Python. A formal tool is needed only for the run step, and the network only to download a standard or a tool the user approved.
---
# Formal verification
<!-- VLSIT_TERMINOLOGY_START -->
Terminology: SystemVerilog Assertions (SVA); Register-Transfer Level (RTL); Application-Specific Integrated Circuit (ASIC); Intellectual Property (hardware IP) (IP). Read [reference/vlsit_glossary.md](reference/vlsit_glossary.md) before using this skill. Expand abbreviations on first use in generated prose; preserve code identifiers and resolve context-dependent meanings from the specification.
<!-- VLSIT_TERMINOLOGY_END -->
This skill turns a design specification into a formal verification plan and a set of SVA properties, and after the user approves the plan it runs a formal tool and reports the result in detail. The only design input is the specification: it needs no RTL to plan or to write the properties. It does not write or change RTL, and it does not run any tool before the plan is approved.
Three ideas run through the workflow. First, every SVA keyword must belong to the subset that the chosen tool accepts (groups allowed, opt-in and forbidden, in a tool profile). Second, a design that claims an industry standard is checked against that standard unless its specification states a limitation. Third, each specified behavior becomes one long, integrated property, not many small ones.
Reply to the user in the language they use. The plan, the SVA and the report are in English.
If instructions differ, follow them in this order: [rule.md](rule.md) first, then this file, then the files in `reference/`.
## Workflow
### 1. Read the rules
Read [rule.md](rule.md) completely before doing anything else. Every rule in it is mandatory.
### 2. Find Python
Every script in `scripts/` is Python 3 and uses only the standard library. Locate a working Python before running any of them:
```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File "<skill folder>\scripts\vlsit_find_python.ps1"
```
```sh
sh "<skill folder>/scripts/vlsit_find_python.sh"
```
The first line is for Windows, the second for Linux and macOS. The locator prints the full path of a working Python 3 (called `<python>` below) and exits 0, or prints `NOT FOUND` and exits 3. Do not continue without Python and do not guess a path. Tell the user that Python 3 is needed and let them choose: install it themselves (python.org, or `vlsit_find_python.sh --options` for the command of each Linux family), or let you install it with `vlsit_find_python.ps1 -Install` (uses winget) or `vlsit_find_python.sh --install` (uses the system package manager). Run the install only after they agree, then run the locator again.
### 3. Collect the inputs, the tool and the profile
Ask, in the question format of [reference/vlsit_question_bank.md](reference/vlsit_question_bank.md) (options with explanations and an open choice, R-004): the specification file and its revision, a new output folder, the formal tool, and the development profiles the tool build supports (R-019). Look for an installed tool:
```powershell
<python> "<skill folder>\scripts\vlsit_formal_run.py" find-tool
```
If a Q3AFORMAL executable is found or the user gives one, use the profile [reference/vlsit_tool_profile_q3aformal.json](reference/vlsit_tool_profile_q3aformal.json) and read [reference/vlsit_tool_profile_q3aformal.md](reference/vlsit_tool_profile_q3aformal.md). To confirm that the build accepts exactly what the profile says, run the probes into a new work folder; a mismatch is fixed in the profile before any SVA is written (R-020):
```powershell
<python> "<skill folder>\scripts\vlsit_formal_run.py" probe --exe "<tool>" --probes "<skill folder>\reference\vlsit_tool_probes_q3aformal.json" --work "<new folder>"
```
If the user has another tool, ask for its documentation and build its profile as a copy of the JSON file (R-021); validate it with `vlsit_sva_lint.py profile-check`. If the user has no tool yet, do not stop: plan and write the SVA with the Q3AFORMAL profile, and at the run step suggest the tool (step 10). Write the profile choice and the user's confirmation into the plan.
### 4. Extract the specification facts
```powershell
<python> "<skill folder>\scripts\vlsit_formal_spec.py" extract "<spec>" --json "<output>\spec_facts.json"
```
It lists the ports with direction and width, clocks, resets, parameters, requirement IDs, limitation lines and the standards that the text names, each with its line. Read the specification itself to complete and correct the list; the script finds candidates. Ask about every gap or ambiguity that changes a property (R-004). Record each stated limitation as an excluded item (R-006).
### 5. Review the specification in depth
Read [reference/vlsit_spec_review_guide.md](reference/vlsit_spec_review_guide.md). The review asks whether an exact property can be written from each sentence of the specification (R-035):
```powershell
<python> "<skill folder>\scriptslsit_spec_review.py" scan "<spec>" --json "<output>\spec_scan.json"
<python> "<skill folder>\scriptslsit_spec_review.py" init --scan "<output>\spec_scan.json" --out "<output>\<design>_spec_review.md" --title "<design>" --spec-name "<spec file>" --date <YYYY-MM-DD>
```
The scan lists candidates; read the whole specification against the checklist, add what no pattern finds, drop what does not apply, and replace every `<<FILL ...>>` with facts of this design. Each finding gives the locator, what is missing, **why it matters for the SVA** (the property it blocks or distorts), the **risk if the specification is not updated** (the wrong result that follows), the information requested, a suggested specification text, the interim handling and a severity (R-036). Check and show the report:
```powershell
<python> "<skill folder>\scriptslsit_spec_review.py" check "<output>\<design>_spec_review.md"
<python> "<skill folder>\scriptslsit_spec_review.py" status "<output>\<design>_spec_review.md"
```
Give the report to the user and ask them to answer or to update the specification, with the questions in the format of the question bank (R-004). Record each answer in the finding's `Resolution` field; after the user updates the specification, run steps 4 and 5 again on the new revision. No property rests on an open Blocker (R-037); for a Major or Minor finding that stays open, record the interim assumption and go on.
### 6. Standards and compliance
Read [reference/vlsit_standards_compliance.md](reference/vlsit_standards_compliance.md). Confirm with the user which standards the design follows and their revisions (R-007), then:
```powershell
<python> "<skill folder>\scripts\vlsit_formal_spec.py" standards "<spec>" --docs "<folder of the user's standard documents>"
```
For each standard without a document, ask the user to provide it; when the user has none, propose a download (file, source, size, licence) and download only after approval (R-008, R-011). Build the compliance matrix: every checkable rule of the standard gets a property with its clause (R-009, R-010), except the rules that a limitation of the specification excludes, recorded as `Not verified` with the locator.
### 7. Write the test plan and the SVA
Read [reference/vlsit_test_plan_template.md](reference/vlsit_test_plan_template.md) and [reference/vlsit_sva_style_guide.md](reference/vlsit_sva_style_guide.md). Write `<design>_formal_test_plan.md` with the sections of R-012 (the review findings and their resolutions are its section 3), the property inventory CSV and the SVA file (`<design>_formal.sv`): one explicit clock per property (R-025), labels `as_`, `am_`, `c_` (R-026), signals as `$root.<top>.<port>` (R-027), reset as explicit conditions (R-022), assumptions only on inputs with their source (R-014), a cover for every assertion (R-015), and each behavior as one long integrated property (R-023). Create the inventory with `vlsit_formal_inventory.py init`, then fill it.
If the user's profile or confirmation allows an opt-in group, put the properties that use it in a separate group, because the tool checks them with a different command (R-019).
### 8. Check the plan, the SVA and the inventory
```powershell
<python> "<skill folder>\scripts\vlsit_sva_lint.py" check "<sva>" --profile "<profile>" --ports "<output>\spec_facts.json" --emit "<output>\lint.json"
<python> "<skill folder>\scripts\vlsit_formal_inventory.py" check "<inventory>" --requirements "<requirements file>" --sva-emit "<output>\lint.json"
<python> "<skill folder>\scripts\vlsit_formal_inventory.py" check-plan "<plan>"
```
Add `--allow-profile <name>` to the lint only for an opt-in profile the user confirmed. Fix every `ERROR`; read each `WARN` (a `SMALL` warning means the property should absorb more of its behavior, R-023). The requirements file has one requirement ID per line, and `ID | Not required (confirmed by user, YYYY-MM-DD): reason` for an excluded one (R-013). To feed the existing verification flow, export the formal rows with `vlsit_formal_inventory.py to-vplan`.
### 9. Get the plan approved
Present the plan, the SVA and the inventory to the user: the facts, the standards and the compliance matrix, the properties and covers, the configuration and the bounds, the open questions, and what the proof will not show. Ask for approval with options (approved, approved with changes, not approved). On approval, record it, with the approver and the date, in the plan (R-028) and in the approval file:
```powershell
<python> "<skill folder>\scripts\vlsit_formal_run.py" approve --plan "<plan>" --approver "<name as the user gave it>" --out "<output>\approval.json"
```
The approval holds for that exact plan: editing the plan afterwards makes the run refuse, and the user approves again.
### 10. Run the tool
Read [reference/vlsit_tool_install_q3aformal.md](reference/vlsit_tool_install_q3aformal.md). If the user gave a tool (a path or a link) use it. If the user has none, suggest Q3AFORMAL with its GitHub link and ask whether to download and install it, stating the file, source, size and licence; proceed only on a yes (R-029). Prepare the tool project (for Q3AFORMAL a `.q3a` manifest with the top module, the RTL sources, `property_source` for the SVA file and the `option profile` line of an opt-in group; the RTL file list and the binding come from the user, R-027), then run:
```powershell
<python> "<skill folder>\scripts\vlsit_formal_run.py" run --exe "<tool>" --project "<project.q3a>" --inventory "<inventory>" --plan "<plan>" --approval "<output>\approval.json" --out-dir "<new results folder>" --engine pdr --timeout-ms 600000
```
It refuses to run without a valid approval (exit 3). Each assert and cover row runs once; the script keeps the standard output, the raw status, the exit code, the evidence folder and the counterexample bundle. For another tool use `--tool custom --command-template ...` with the pass and fail expressions the user confirmed. Never change a property or an assumption to make a run pass (R-032). If a property is rejected by the tool, report the diagnostic and stop for the user's decision (R-020).
### 11. Report the result
```powershell
<python> "<skill folder>\scripts\vlsit_formal_inventory.py" update "<inventory>" --results "<results>\results.json" --out "<new inventory>"
<python> "<skill folder>\scripts\vlsit_formal_report.py" generate --inventory "<new inventory>" --results "<results>\results.json" --out "<report>" --title "<design>"
<python> "<skill folder>\scripts\vlsit_formal_report.py" check "<report>" --results "<results>\results.json"
```
Read [reference/vlsit_report_template.md](reference/vlsit_report_template.md). Fill every marked hole: for each failed property read the counterexample from its bundle, write the trace step by step, classify the likely cause and suggest an action (R-031); complete the compliance conclusion and the limits. State a bounded or missing result as it is (R-030).
### 12. Verify against the rules
Check the result against every rule ID in [rule.md](rule.md). Run the checks that name a script, and inspect the rest by hand. Report which rules were verified and how, and say plainly what could not be verified (for example, no tool was run, or a profile row was not probed).
## Reference
Read a file only when the step needs it.
| File | Read it when |
|---|---|
| [reference/vlsit_question_bank.md](reference/vlsit_question_bank.md) | Step 3 and any question to the user: options, explanations, open choice |
| [reference/vlsit_tool_profile_q3aformal.md](reference/vlsit_tool_profile_q3aformal.md) | Steps 3 and 7: the allowed, opt-in and forbidden keywords of Q3AFORMAL and how they were verified |
| [reference/vlsit_tool_profile_q3aformal.json](reference/vlsit_tool_profile_q3aformal.json) | Read by `vlsit_sva_lint.py`; copy it to start the profile of another tool |
| [reference/vlsit_tool_probes_q3aformal.json](reference/vlsit_tool_probes_q3aformal.json) | Step 3: one probe per profile rule for `vlsit_formal_run.py probe` |
| [reference/vlsit_spec_review_guide.md](reference/vlsit_spec_review_guide.md) | Step 5: the review checklist, the finding format with reason and risk, severity, what to do when the user does not answer |
| [reference/vlsit_standards_compliance.md](reference/vlsit_standards_compliance.md) | Step 6: identify standards, obtain documents, handle limitations, fill the matrix |
| [reference/vlsit_test_plan_template.md](reference/vlsit_test_plan_template.md) | Step 7: the plan outline |
| [reference/vlsit_sva_style_guide.md](reference/vlsit_sva_style_guide.md) | Step 7: long integrated properties, reset, assumptions, cover, naming |
| [reference/vlsit_tool_install_q3aformal.md](reference/vlsit_tool_install_q3aformal.md) | Step 10: find, suggest, download and install Q3AFORMAL; use another tool |
| [reference/vlsit_report_template.md](reference/vlsit_report_template.md) | Step 11: report sections and cause classes |
| [reference/vlsit_glossary.md](reference/vlsit_glossary.md) | Defining abbreviations and terms |
## Scripts
Run each script as `<python> "<skill folder>/scripts/<script>.py" <action>` (use `\` in the path on Windows). A Python script runs the same way on both systems; a script in any other language needs a twin for the other system.
| Script | Run it when |
|---|---|
| `scripts/vlsit_find_python.ps1` (Windows) and `scripts/vlsit_find_python.sh` (Linux, macOS) | Before the first Python script, and again after Python was installed |
| `scripts/vlsit_formal_spec.py` | Steps 4 to 6: `extract` the facts of the specification; `standards` to see which documents the user provided |
| `scripts/vlsit_sva_lint.py` | Steps 3 and 8: `check` SVA against a profile; `list` or `profile-check` a profile |
| `scripts/vlsit_spec_review.py` | Step 5: `scan` the specification, `init` the review report, `check` it, `status` of the open blockers |
| `scripts/vlsit_formal_inventory.py` | Steps 7, 8 and 11: `init`, `check`, `check-plan`, `to-vplan`, `update` |
| `scripts/vlsit_formal_run.py` | Steps 3, 9 and 10: `find-tool`, `probe`, `approve`, `run`, `tools` |
| `scripts/vlsit_formal_report.py` | Step 11: `generate` and `check` the report |
Exit codes: 0 success, 1 findings (or a mismatch), 2 bad input, 3 prerequisite missing (no Python, no tool, or no valid approval).
## Output
Everything goes into the new folder the user named: `<design>_spec_review.md` (the review report), `<design>_formal_test_plan.md`, `<design>_formal.sv`, the property inventory CSV, `spec_facts.json`, `lint.json`, `approval.json`, the results folder (`results.json`, logs, evidence, bundles), the updated inventory and `<design>_formal_report.md`. Tell the user where each file is, the lint and inventory results, whether the plan is approved, and, after a run, the counts by status and the failures with their cause classes.