25.02.2017 Views

Formal Verification with Yosys-SMTBMC Clifford Wolf

slides

slides

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

abccex.v<br />

yosys ­ql abccex.yslog \<br />

­p 'read_verilog ­formal abccex.v' \<br />

­p 'prep ­top abccex ­nordff' \<br />

­p 'write_smt2 abccex.smt2' \<br />

­p 'miter ­assert ­flatten abccex' \<br />

­p 'techmap; opt ­fast; abc; clean' \<br />

­p 'write_blif abccex.blif'<br />

Solving an optimized miter circuit <strong>with</strong> ABC,<br />

then creating a counterexample VCD file<br />

from ABC .cex file <strong>with</strong> <strong>Yosys</strong>-<strong>SMTBMC</strong>:<br />

yosys­abc ­c 'read_blif abccex.blif; strash; logic; undc; strash; zero;<br />

bmc3 ­F 100 ­v; undc ­c; write_cex ­n abccex.cex'<br />

...<br />

Params: FramesMax = 100. Start = 0. ConfLimit = 0. TimeOut = 0. SolveAll = 0.<br />

0 + : Var = 1. Cla = 0. Conf = 0. Uni = 0. 0 MB 4 MB 0.02 sec<br />

...<br />

26 + : Var = 9929. Cla = 40559. Conf = 61754. Uni = 23. 0 MB 9 MB 3.67 sec<br />

Runtime: CNF = 0.0 sec (0.3 %) UNSAT = 0.8 sec (21.1 %) SAT = 2.9 sec (77.9 %) UNDEC = 0.0 sec (0.0 %)<br />

LStart(P) = 10000 LDelta(Q) = 2000 LRatio(R) = 80 ReduceDB = 10 Vars = 9929 Used = 9929 (100.00 %)<br />

Buffs = 306. Dups = 0. Hash hits = 0. Hash misses = 9604. UniProps = 0.<br />

Output 0 of miter "abccex" was asserted in frame 26. Time = 3.67 sec<br />

! yosys­smtbmc ­t 100 ­s z3 ­­cex abccex.cex ­­dump­vcd abccex.vcd abccex.smt2<br />

## 0 0:00:00 Solver: z3<br />

## 0 0:00:00 Checking asserts in step 0..<br />

...<br />

## 0 0:00:00 Checking asserts in step 26..<br />

## 0 0:00:00 BMC failed!<br />

## 0 0:00:00 Assert failed in abccex: abccex.v:18<br />

## 0 0:00:00 Writing trace to VCD file: abccex.vcd<br />

## 0 0:00:00 Status: FAILED (!)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!