Skip to content

Hosted Breakspec is in private beta. Ask for access

Docsengine

Formal properties

This check is optional. It runs the properties that are already in your repository with Yosys and an SMT solver.

What the check does

Breakspec does not write these properties. You list the assertions that your repository already has. For each group, Breakspec runs bounded model checking from reset to the depth you set. If that passes, it then tries an induction proof at the same depth.

The tools are Yosys, yosys-smtbmc and an SMT solver (Bitwuzla or Z3). A review needs no configuration file. Add this check when you want your properties to run on each review.

What Yosys reads

  • Yosys reads the files of the group as SystemVerilog, in formal mode. Breakspec sets the define FORMAL unless the group lists its own defines.
  • Yosys reads immediate assertions: assert, assume and cover statements in procedural code.
  • Concurrent SVA is not read yet. A property with a sequence makes the check inconclusive.
  • Yosys reads only the files that the group lists. Put a property file in that list, with the top module that contains the assertions.
  • The engine is yosys-smtbmc. It uses the first solver it finds, in this order: Bitwuzla, Yices, Z3.
  • The default depth is 20 clock cycles. Each solver run stops after 900 seconds by default.

What the configuration needs

List the property groups under hardware.formal in .breakspec/config.yaml. Each group names the top module, the source files, the assertions and the depth in clock cycles.

.breakspec/config.yaml
hardware:  formal:    - name: fifo_order      top: sync_fifo_formal      files: [rtl/sync_fifo.sv, formal/sync_fifo_props.sv]      params: { W: 8, DEPTH: 4 }      asserts: [p_fifo_order, p_fifo_overrun]      depth: 24

This example is from our sample project. See Configuration.

Results

resultmeaningshown as
ProvenThe induction proof succeeds. The property holds in all states the design can reach, under the assumptions in the property file.Proven
Bounded passThe solver finds no violation within the depth. The induction proof does not succeed.Tested
CounterexampleThe solver finds a sequence of inputs that breaks the property.Violated
InconclusiveThe solver stops before a result, for example at the time limit.Inconclusive

A bounded pass is reported as Tested, with its depth. It is never reported as Proven. The record also says why the induction proof did not succeed.

Counterexample waveforms

When a property fails, the solver gives the sequence of inputs that breaks it. Breakspec saves that sequence as a VCD file and keeps it with the finding. The finding shows the signals from the waveform, cycle by cycle. You can open the VCD file in a waveform viewer such as GTKWave.

Run the check yourself

console
$ breakspec check formal

See Command line for the other commands and Evidence for how a review states what it ran.