Skip to content

Commit 1d3f9b7

Browse files
Merge pull request YosysHQ#5687 from YosysHQ/nella/pdr-doc
Update help text for rename -witness and write_aiger -ywmap
2 parents 687a36a + 2c52546 commit 1d3f9b7

3 files changed

Lines changed: 42 additions & 12 deletions

File tree

backends/aiger/aiger.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -930,7 +930,9 @@ struct AigerBackend : public Backend {
930930
log(" make indexes zero based, enable using map files with smt solvers.\n");
931931
log("\n");
932932
log(" -ywmap <filename>\n");
933-
log(" write a map file for conversion to and from yosys witness traces.\n");
933+
log(" write a map file for conversion to and from yosys witness traces,\n");
934+
log(" also allows for mapping AIGER bad-state properties and invariant\n");
935+
log(" constraints back to individual formal properties by name.\n");
934936
log("\n");
935937
log(" -I, -O, -B, -L\n");
936938
log(" If the design contains no input/output/assert/flip-flop then create one\n");

docs/source/using_yosys/more_scripting/model_checking.rst

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ Symbolic model checking
33

44
.. todo:: check text context
55

6-
.. note::
7-
8-
While it is possible to perform model checking directly in Yosys, it
6+
.. note::
7+
8+
While it is possible to perform model checking directly in Yosys, it
99
is highly recommended to use SBY or EQY for formal hardware verification.
1010

1111
Symbolic Model Checking (SMC) is used to formally prove that a circuit has (or
@@ -117,3 +117,32 @@ Result with fixed :file:`axis_master.v`:
117117
118118
Solving problem with 159144 variables and 441626 clauses..
119119
SAT proof finished - no model found: SUCCESS!
120+
121+
Witness framework and per-property tracking
122+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
123+
124+
When using AIGER-based formal verification flows (such as the ``abc`` engine in
125+
SBY), Yosys provides infrastructure for tracking individual formal
126+
properties through the verification pipeline.
127+
128+
The `rename -witness` pass assigns public names to all cells that participate in
129+
the witness framework:
130+
131+
- Witness signal cells: `$anyconst`, `$anyseq`, `$anyinit`,
132+
`$allconst`, `$allseq`
133+
- Formal property cells: `$assert`, `$assume`, `$cover`, `$live`,
134+
`$fair`, `$check`
135+
136+
These public names allow downstream tools to refer to individual properties by
137+
their hierarchical path rather than by anonymous internal identifiers.
138+
139+
The `write_aiger -ywmap` option generates a map file for conversion to and from
140+
Yosys witness traces, and also allows for mapping AIGER bad-state properties and
141+
invariant constraints back to individual formal properties by name. This enables
142+
features like per-property pass/fail reporting (e.g. ``abc pdr`` with
143+
``--keep-going`` mode).
144+
145+
The `write_smt2` backend similarly uses the public witness names when emitting
146+
SMT2 comments. Cells whose ``hdlname`` attribute contains the ``_witness_``
147+
marker are treated as having private names for comment purposes, keeping solver
148+
output clean.

passes/cmds/rename.cc

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -254,18 +254,17 @@ struct RenamePass : public Pass {
254254
log("\n");
255255
log(" rename -enumerate [-pattern <pattern>] [selection]\n");
256256
log("\n");
257-
log("Assign short auto-generated names to all selected wires and cells with private\n");
258-
log("names. The -pattern option can be used to set the pattern for the new names.\n");
259-
log("The character %% in the pattern is replaced with a integer number. The default\n");
260-
log("pattern is '_%%_'.\n");
257+
log("Assigns auto-generated names to objects used in formal verification\n");
258+
log("that do not have a public name. This applies to all formal property\n");
259+
log("cells, $any*/$all* output wires, and their containing cells.\n");
261260
log("\n");
262261
log("\n");
263262
log(" rename -witness\n");
264263
log("\n");
265-
log("Assigns auto-generated names to all $any*/$all* output wires and containing\n");
266-
log("cells that do not have a public name. This ensures that, during formal\n");
267-
log("verification, a solver-found trace can be fully specified using a public\n");
268-
log("hierarchical names.\n");
264+
log("Assigns auto-generated names to objects used in formal verification\n");
265+
log("that do not have a public name. This applies to all formal property\n");
266+
log("cells ($assert, $assume, $cover, $live, $fair, $check), $any*/$all*\n");
267+
log("output wires, and their containing cells.\n");
269268
log("\n");
270269
log("\n");
271270
log(" rename -hide [selection]\n");

0 commit comments

Comments
 (0)