All articles

Formal Verification and AI Test Generation Work Together

Sunil Kumar
Formal verification and AI test generation

In a real chip workflow, formal and simulation run alongside each other, not as rival bets. A team writes a property for a 32-deep FIFO, waits an hour, and gets either a timeout or a proof limited to an arbitrary k-step bound. Meanwhile, the overnight regression reaches 94% functional coverage. It is easy to view both methods as competing claims on the same budget. That framing misses what each method can actually establish.

What Formal Proves

BMC and property proving with IC3/PDR algorithms are exhaustive within their defined problem scope. For an SVA assertion such as assert property (@(posedge clk) fifo_empty |-> !fifo_rd_en), a formal tool returning PROVEN establishes that the property holds on every legal reachability path in the design, not only on paths exercised by stimulus. That guarantee is qualitatively different from a simulation pass.

Formal is particularly effective on small fanout, precise temporal relationships, and state machines with bounded depth. Reset logic is a good example. Suppose a synchronizer and downstream handshake must clear within three cycles of reset assertion. Formal can examine every ordering of reset events. A simulation testbench is unlikely to apply reset at cycle 1 of a burst, halfway through a write, and during a power domain transition at the same time.

That advantage also defines formal's limit. The state space expands exponentially as state-holding elements increase. A full-chip SoC with dozens of clock domains, out-of-order execution pipelines, and distributed cache controllers requires heroic decomposition before formal can address it. Feeding a full-chip netlist to a model checker usually produces a timeout or a proof bounded at k=15, neither of which says much about system-level behavior.

Where Simulation Fills Gaps

Constrained random simulation with UVM scales beyond formal's reach. With a structured verification environment and coverage model, a compute farm can run hundreds of seeds overnight. Every seed samples another part of the constrained space, while the coverage database combines the results. The limitation is the coverage model: it records only the conditions someone specified. An uncovered arc omitted from a covergroup remains unseen.

This is why formal versus simulation is the wrong split. The useful question is which bugs each method is structurally able to find, and whether those bug classes overlap.

For the most part, they do not. Formal exposes tight temporal violations and bounded-reachability property failures that simulation may miss because they depend on ordering combinations constrained random rarely produces. Simulation exposes multi-agent interaction defects, performance loss under load, and behavior that appears only after thousands of cycles of system operation. Formal cannot run for thousands of cycles, while simulation cannot establish exhaustive proof.

A Working Integration Pattern

With early-access teams at BigEndian, the useful workflow has not been "run formal, then run simulation." The handoff is closer and starts before simulation. The formal model contributes in two ways.

First, it supplies abstract counterexamples. When bounded model checking finds a property failure, the tool emits a counterexample trace, a concrete input sequence that violates the property. That trace can become a directed test and seed a simulation campaign aimed at the scenario formal exposed.

Second, formal unreachability results can reduce the constrained random search space. A state proven unreachable needs no simulation budget. If your implementation cannot assert FIFO full and empty together, exclude that region from the constrained random constraints instead of spending seeds on an impossible condition.

Simulation-side coverage-directed test generation can pursue arcs that formal properties do not govern directly. Protocol sequencing among multiple agents, latency changes under backpressure, and multi-master arbitration corner cases belong structurally to simulation. The task is to find stimulus sequences likely to hit those uncovered arcs, a search problem where automated test generation is useful.

BigEndian's Place in the Stack

BigEndian's verification agent operates at the simulation layer while using formal property databases as context. Import the design's SVA property file with the RTL and coverage database, and the agent treats the formal property set as a boundary around work it should not repeat. Formally proven properties need no simulation budget. The agent instead targets coverage holes in areas the formal model did not certify.

That does not mean we replace your formal flow. We do not. Internal pilot data from 3 early-access teams showed coverage gains in simulation-only arcs, where the formal tool had no coverage and the constrained random environment could not reach within its standard seed budget. Complementary use is the point.

Avoiding Overinvestment

Formal verification is not automatically worth its setup cost. For simple control logic where constrained random reaches 98% functional coverage in one regression pass, building a formal environment may add overhead without paying back before tapeout. A stronger signal appears when UVM needs workaround constraints because certain stimulus combinations supposedly "never happen in practice." Excluding legal stimulus because it triggers unexplained failures points to a bug formal may find in two hours.

Simulation also cannot substitute for formal on safety-critical properties. A design headed for IEC 61508 or ISO 26262 review still requires formal verification of specified safety properties, whatever the simulation coverage numbers show. Coverage percentage is not a safety argument. Formal proof is.

Assign each method to the problems it handles efficiently: formal for bounded temporal properties in critical control logic, simulation with aggressive coverage for system-level interactions, and automated stimulus generation for the gap between a constrained random coverage plateau and arcs formal cannot reach.

Making the Two Flows Work Together

Infrastructure is the remaining obstacle. Formal tools emit VCD traces and counterexample files in tool-specific formats, while UVM testbenches consume SystemVerilog sequences and constrained random seeds. A translation layer must turn a formal counterexample into a UVM test. Most teams still perform that conversion manually, one failing property at a time.

Automating the handoff is part of our work. The technical conversion is manageable, but every manual step between formal and simulation is likely to be skipped under tapeout pressure. A formal bug may land in a spreadsheet and receive no follow-up because the simulation environment cannot replay its trace. Those escapes are avoidable.

The target is a flow that co-schedules formal and simulation from project start rather than treating them as sequential phases. Develop formal properties alongside the first UVM agents. Turn formal counterexamples into regression seeds. Use coverage-directed generation for the remaining space. Each method handles its suited problems, and the coverage database records their combined result.

Close Coverage Gaps

Use BigEndian with formal to find arcs your testbench misses.

Request Early Access