Vhdl Bounded Model Checker (VBMC): A Formal Verification Tool for - - PowerPoint PPT Presentation

vhdl bounded model checker vbmc a formal verification
SMART_READER_LITE
LIVE PREVIEW

Vhdl Bounded Model Checker (VBMC): A Formal Verification Tool for - - PowerPoint PPT Presentation

Vhdl Bounded Model Checker (VBMC): A Formal Verification Tool for VHDL Designs Ajith John, A. K. Bhattacharjee RCnD, BARC Supratik Chakraborty, CFDVS, IIT Bombay Introduction Design of modern computer based systems involves partitioning of


slide-1
SLIDE 1

Vhdl Bounded Model Checker (VBMC): A Formal Verification Tool for VHDL Designs

Ajith John, A. K. Bhattacharjee RCnD, BARC Supratik Chakraborty, CFDVS, IIT Bombay

slide-2
SLIDE 2

Introduction

Exhaustive simulation impossible in practice

Design of modern computer based systems involves partitioning

  • f system into hardware subsystems and software subsystems
slide-3
SLIDE 3

Introduction

Exhaustive simulation impossible in practice

Design of modern computer based systems involves partitioning

  • f system into hardware subsystems and software subsystems

Hardware subsystems are often implemented in Hardware Description Languages (HDL) such as VHDL, Verilog etc.

slide-4
SLIDE 4

Specifications

VHDL Program Synt hesis

Place & Route FPGA

Introduction

Exhaustive simulation impossible in practice

Design of modern computer based systems involves partitioning

  • f system into hardware subsystems and software subsystems

Hardware subsystems are often implemented in Hardware Description Languages (HDL) such as VHDL, Verilog etc. The programs written in VHDL are converted to hardware realizations in FPGA through a sequence of transformations

slide-5
SLIDE 5

VHDL Program Synt hesis

Place & Route FPGA

Introduction

Exhaustive simulation impossible in practice

Design of modern computer based systems involves partitioning

  • f system into hardware subsystems and software subsystems

Hardware subsystems are often implemented in Hardware Description Languages (HDL) such as VHDL, Verilog etc. The programs written in VHDL are converted to hardware realizations in FPGA through a sequence of transformations Correctness of the final FPGA implementation depends on the correctness of the VHDL program

Specifications

slide-6
SLIDE 6

VHDL Program Synt hesis

Place & Route FPGA

Introduction

Exhaustive simulation impossible in practice

Design of modern computer based systems involves partitioning

  • f system into hardware subsystems and software subsystems

Hardware subsystems are often implemented in Hardware Description Languages (HDL) such as VHDL, Verilog etc. The programs written in VHDL are converted to hardware realizations in FPGA through a sequence of transformations Correctness of the final FPGA implementation depends on the correctness of the VHDL program Ensuring the correctness (verification) of VHDL programs extremely important when used in safety-critical applications

Specifications

slide-7
SLIDE 7

Simulation (ModelSim, NCSim)

VHDL Program Synt hesis

Place & Route FPGA

Conventional Verification: Simulation

Specifications

slide-8
SLIDE 8

Simulation (ModelSim, NCSim)

VHDL Program Synt hesis

Place & Route FPGA

Conventional Verification: Simulation

Exhaustive simulation covering all possible input combinations impossible in practice

Specifications

slide-9
SLIDE 9

Simulation (ModelSim, NCSim)

VHDL Program Synt hesis

Place & Route FPGA

Conventional Verification: Simulation

Exhaustive simulation covering all possible input combinations impossible in practice VHDL Program

32-bit input 32-bit input

  • utput

232 * 232 = 264 possible input combinations !!

Specifications

slide-10
SLIDE 10

Simulation (ModelSim, NCSim)

VHDL Program Synt hesis

Place & Route FPGA

Conventional Verification: Simulation

Exhaustive simulation covering all possible input combinations impossible in practice

We cannot use exhaustive simulation to prove the functional correctness of the program

VHDL Program

32-bit input 32-bit input

  • utput

232 * 232 = 264 possible input combinations !!

Specifications

slide-11
SLIDE 11

VHDL Program Synt hesis

Formal Verification

Exhaustive simulation covering all possible input combinations impossible in practice

Formal Verificati

  • n

Formal verification proves / refutes the functional correctness of

the program using rigorous mathematical techniques

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

We cannot use exhaustive simulation to prove the functional correctness of the program

Specifications

slide-12
SLIDE 12

VHDL Program Synt hesis

Vhdl Bounded Model Checker

Indigenously developed tool for formal verification of VHDL designs

VBMC

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

Specifications

slide-13
SLIDE 13

VHDL Program Synt hesis

Vhdl Bounded Model Checker

Indigenously developed tool for formal verification of VHDL designs

VBMC

Expressed as Formal Specification (Property)

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

Specifications

slide-14
SLIDE 14

VHDL Program Synt hesis

Vhdl Bounded Model Checker

Indigenously developed tool for formal verification of VHDL designs

VBMC

Bound K (integer) (number

  • f clock cycles)

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

Expressed as Formal Specification (Property)

Specifications

slide-15
SLIDE 15

VHDL Program Synt hesis

Vhdl Bounded Model Checker

Indigenously developed tool for formal verification of VHDL designs

VBMC

Two possible

  • utcomes

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

Bound K (integer) (number

  • f clock cycles)

Expressed as Formal Specification (Property)

Specifications

slide-16
SLIDE 16

VHDL Program Synt hesis

Vhdl Bounded Model Checker

Indigenously developed tool for formal verification of VHDL designs

VBMC

Property satisfied for K clock cycles/

Two possible

  • utcomes

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

Bound K (integer) (number

  • f clock cycles)

Expressed as Formal Specification (Property)

Specifications

slide-17
SLIDE 17

VHDL Program Synt hesis

Vhdl Bounded Model Checker

Indigenously developed tool for formal verification of VHDL designs

VBMC

Property satisfied for K clock cycles/ Property violated with Counterexample (execution of program violating property)

Two possible

  • utcomes

Simulation (ModelSim, NCSim)

Exhaustive simulation covering all possible input combinations impossible in practice

Place & Route FPGA

Bound K (integer) (number

  • f clock cycles)

Expressed as Formal Specification (Property)

Specifications

slide-18
SLIDE 18

VBMC

VHDL program Property

Property satisfied/ Property violated with Counterexample (execution of program violating property)

VBMC: Internals

Bound, K

slide-19
SLIDE 19

VBMC

VHDL program Property

Property satisfied/ Property violated with Counterexample (execution of program violating property)

VBMC: Internals

Generation of transition relation

Bounded model checking Transition relation abstraction Steps inside VBMC

Bound, K

slide-20
SLIDE 20

Transition relation: relation between present and next states (R) of the program

Generation of Transition Relation

slide-21
SLIDE 21

Transition relation: relation between present and next states (R) of the program Using symbolic simulation: Involves simulation of the VHDL program with symbols as inputs, rather than concrete values

Generation of Transition Relation

slide-22
SLIDE 22

VHDL program

Transition relation: relation between present and next states (R) of the program Using symbolic simulation: Involves simulation of the VHDL program with symbols as inputs, rather than concrete values

Generation of Transition Relation

input d; output t; entity register is signal p; .... process(clk) if(clk'event) p<=d; process(clk) if(clk'event) t<=p; .... end register;

slide-23
SLIDE 23

input d; output t; entity register is signal p; .... process(clk) if(clk'event) p<=d; process(clk) if(clk'event) t<=p; .... end register; if_then_else(clk1≠clk0,p1=d1,p1=p0) ᐱ if_then_else(clk1≠clk0, t1=p0, t1=t0)

Transition relation R(state0, state1) VHDL program

Transition relation: relation between present and next states (R) of the program Using symbolic simulation: Involves simulation of the VHDL program with symbols as inputs, rather than concrete values

Generation of Transition Relation

slide-24
SLIDE 24

input d; output t; entity register is signal p; .... process(clk) if(clk'event) p<=d; process(clk) if(clk'event) t<=p; .... end register; if_then_else(clk1≠clk0,p1=d1,p1=p0) ᐱ if_then_else(clk1≠clk0, t1=p0, t1=t0)

Transition relation R(state0, state1) VHDL program

Transition relation: relation between present and next states (R) of the program Using symbolic simulation: Involves simulation of the VHDL program with symbols as inputs, rather than concrete values

Generation of Transition Relation

slide-25
SLIDE 25

input d; output t; entity register is signal p; .... process(clk) if(clk'event) p<=d; process(clk) if(clk'event) t<=p; .... end register; if_then_else(clk1≠clk0,p1=d1,p1=p0) ᐱ if_then_else(clk1≠clk0, t1=p0, t1=t0)

Transition relation R(state0, state1) VHDL program

Transition relation: relation between present and next states (R) of the program Using symbolic simulation: Involves simulation of the VHDL program with symbols as inputs, rather than concrete values

Generation of Transition Relation

slide-26
SLIDE 26

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles Check if the property is violated in k (bound) clock cycles

slide-27
SLIDE 27

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0)

Formula for initial states; i.e, state0 represents all initial states

Formula I derived from the property Check if the property is violated in k (bound) clock cycles

slide-28
SLIDE 28

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)

Transition Relation: Relation between present state state0 and next state state1 reachable in 1 clock cycle from initial states

Check if the property is violated in k (bound) clock cycles Formula I derived from the property

slide-29
SLIDE 29

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)

reachable in k clock cycles from initial states Transition Relation: Relation between present state state0 and next state state1

Check if the property is violated in k (bound) clock cycles Formula I derived from the property

slide-30
SLIDE 30

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)

Step-2: Check if a bad state ~Property is reachable in k clock cycles Check if the property is violated in k (bound) clock cycles

slide-31
SLIDE 31

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Step-2: Check if a bad state ~Property is reachable in k clock cycles Check if the property is violated in k (bound) clock cycles

slide-32
SLIDE 32

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Step-2: Check if a bad state ~Property is reachable in k clock cycles Check if the property is violated in k (bound) clock cycles

Verification Condition

slide-33
SLIDE 33

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Step-2: Check if a bad state ~Property is reachable in k clock cycles

Solution of Verification Condition => Execution violating

Property Verification Condition has no solution => No execution violating Property => Program satisfies property for K clock cycles Check if the property is violated in k (bound) clock cycles

Verification Condition

slide-34
SLIDE 34

Bounded Model Checking

Step-1: Find the states reachable in k clock cycles

I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Step-2: Check if a bad state ~Property is reachable in k clock cycles

SMT Solver No solutions: design safe up to k cycles of operation solution: counterexample

Check if the property is violated in k (bound) clock cycles

Verification Condition

slide-35
SLIDE 35

Simulation Vs Bounded Model Checking

Initial states: I Buggy states: ~Property

Consider a VHDL program and Property

slide-36
SLIDE 36

Simulation Vs Bounded Model Checking

Counterexample trace Initial states: I Buggy states: ~Property

Consider a VHDL program and Property

slide-37
SLIDE 37

Simulation

Counterexample trace Trace followed in simulation

Counterexample is missed in simulation

Buggy states: ~Property Initial states: I

Consider a VHDL program and Property

slide-38
SLIDE 38

Bounded Model Checking

Counterexample trace

R

I(state0) ∧R(state0, state1)

state0 : initial states state1: all states reachable in 1 clock cycle from initial states

Initial states: I Buggy states: ~Property

slide-39
SLIDE 39

Bounded Model Checking

Counterexample trace

R R

I(state0) ∧R(state0, state1)∧R(state1, state2)

state0 : initial states state2: all states reachable in 2 clock cycles from initial states

Initial states: I Buggy states: ~Property

slide-40
SLIDE 40

Bounded Model Checking

Counterexample trace

R R R

I(state0) ∧R(state0, state1)∧R(state1, state2)∧R(state2, state3)

state0 : initial states state3: all states reachable in 3 clock cycles from initial states

Buggy states: ~Property Initial states: I

slide-41
SLIDE 41

Bounded Model Checking

Counterexample trace

R R R R

I(state0) ∧R(state0, state1)∧R(state1, state2)∧R(state2, state3)∧R(state3, state4)

state0 : initial states state4: all states reachable in 4 clock cycles from initial states

Initial states: I Buggy states: ~Property

slide-42
SLIDE 42

Bounded Model Checking

Counterexample trace

Counterexample is found by BMC

R R R R

I(state0) ∧R(state0, state1)∧R(state1, state2)∧R(state2, state3)∧R(state3, state4)∧~Property

Initial states: I Buggy states: ~Property

slide-43
SLIDE 43

Transition Relation Abstraction

Optional optimization step

slide-44
SLIDE 44

Transition Relation Abstraction

Time to solve exponential in number of variables Optional optimization step I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Verification condition

slide-45
SLIDE 45

Transition Relation Abstraction

Can we simplify R intelligently ?

Time to solve exponential in number of variables Optional optimization step I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Verification condition

slide-46
SLIDE 46

Transition Relation Abstraction

Can we simplify R intelligently ? Do transition relation abstraction Eliminate variables from R so that it has fewer variables

Time to solve exponential in number of variables Optional optimization step I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

Verification condition

slide-47
SLIDE 47

Transition Relation Abstraction

Can we simplify R intelligently ? Do transition relation abstraction Eliminate variables from R so that it has fewer variables We use a novel algorithm for transition relation abstraction – to generate R', simplified (abstract) transition relation

Time to solve exponential in number of variables Optional optimization step I(state0) ∧R(state0, state1)∧....∧R(statek-1, statek)∧~Property

slide-48
SLIDE 48

Transition Relation Abstraction

Can we simplify R intelligently ? Do transition relation abstraction Eliminate variables from R so that it has fewer variables We use a novel algorithm for transition relation abstraction – to generate R', simplified (abstract) transition relation

Time to solve exponential in number of variables Optional optimization step I(state0) ∧R'(state0, state1)∧....∧R'(statek-1, statek)∧~Property

slide-49
SLIDE 49

Verification Steps using VBMC

FPGA Requirements Specification Find specifications to be checked Express as properties VHDL Program VBMC Set Verification Bound (K) = Number of Clock Cycles Property is not Satisfied Analyse counterexample Review program, property Increase K, until resources are exhausted Property is Satisfied for K cycles Counter example

slide-50
SLIDE 50

Verification Steps using VBMC

FPGA Requirements Specification Find specifications to be checked Express as properties VHDL Program VBMC Set Verification Bound (K) = Number of Clock Cycles Property is not Satisfied Analyse counterexample Review program, property Increase K, until resources are exhausted Property is Satisfied for K cycles Counter example

Manualy done Manualy done

slide-51
SLIDE 51

Other Formal Verification Tools

Existing Formal Verification Tools : Commercial : JasperGold, Incisive (Cadence) , Questa (Mentor Graphics) Academic : SMV, NuSMV (CMU), VIS, ABC (Berkely), PdTrav (Politecnico di Torino)

slide-52
SLIDE 52

Other Formal Verification Tools

Existing Formal Verification Tools : Commercial : JasperGold, Incisive (Cadence) , Questa (Mentor Graphics) Academic : SMV, NuSMV (CMU), VIS, ABC (Berkely), PdTrav (Politecnico di Torino) Problem with existing academic tools :

– Take input in gate-level (bit-level) formats like AIGs – Need to convert the RTL-level (word-level) constructs

(eg: +, -) in the program to gate-level and perform verification at gate-level Scaling issues for verification of designs with wide data paths

slide-53
SLIDE 53

VBMC

Word-level constructs in the VHDL program are kept at

word-level and verification at word-level (word-level verification) Transition relation abstraction generates word-level abstractions

slide-54
SLIDE 54

VBMC

Word-level constructs in the VHDL program are kept at

word-level and verification at word-level (word-level verification) Transition relation abstraction generates word-level abstractions

Scalable for verification of VHDL programs with wide data-

paths

slide-55
SLIDE 55

Applications of VBMC

Formal verification of VHDL programs used in boards developed at RCnD, ED in BARC and in NPCIL

slide-56
SLIDE 56

Limitations of VBMC

Supports only a subset of VHDL: Includes almost all synthesizable constructs Provides only bounded guarantee: Design is safe up to K clock cycles, No guarantee after K clock cycles

slide-57
SLIDE 57

57

A Quantifier Elimination Algorithm for Linear Modular Equations and

Disequations in Computer Aided Verification (CAV) 2011 Extending Quantifier Elimination to Linear Inequalities on Bit-Vectors in Tools and Algorithms for the Construction and Analysis of Systems (TACAS) 2013 Quantifier Elimination for Linear Modular Constraints in International Congress on Mathematical Software (ICMS) 2014 A Layered Algorithm for Quantifier Elimination from Linear Modular Constraints, Formal Methods in System Design (FMSD), Volume 49, Issue 3, 2016

VBMC: A Formal Verification Tool for VHDL Programs, BARC External

Technical Report, BARC/2014/E/010 Design and Application of a Formal Verification Tool for VHDL Designs, In BARC Newsletter, ISSN: 0976-2108, 2012

Publications

slide-58
SLIDE 58

Thank you Demo @ 3:30 pm