SlideShare a Scribd company logo
Formal Verification in VLSI
Dilawar Singh
Indian Institute of Technology Bombay
November 28, 2010
Dilawar Singh Formal Verification in VLSI
About
These slides were evolved
during Testing and
Verification of VLSI
course offered by Prof. M. P.
Desai at IIT Bombay. It deals
with non-technicalities of the
’formal verification’ rather
than theories and principles.
Some comments are
unprofessionally
personal.Reader discretion is
advised. :-)
Figure: From
http://shemesh.larc.nasa.gov/images/humor-sneak-
a-peek.jpg
Dilawar Singh Formal Verification in VLSI
Formal Verification
Traditionally one discovers error in software and hardware by
testing all possible combination e.g. using simulation.1
Since VLSI systems are too large, one can test only a (tiny?)
fraction of them in practice. And this is when computer
computer runs faster than Chacha Chaudhary’s Brain.
Besides, everything runs on simulation is orders of magnitude
slower than the real hardware, so pre-silicon testing is limited.
That is why so little new design are coming out of industries.
Testing has become way too costly. Over 25% of total cost.
Formal verification is an alternative that proves
mathematically that given VLSI system will work as intended.
Testing is for fault detection.Formal Verification is fault
avoidance technique.
1
I’m done simulating; Now what?, Kantrowiz M and Noack Lisa, DEC
Dilawar Singh Formal Verification in VLSI
Exhaustiveness
In 1914, Littlewood proved that π(n) − li(n) changes sign
infinitely often, where pi(n) is the number of primes ≤ n and
li(n) =
n
0
du
ln u though first instant of sign change occurs when
n ≥ 1.39822 × 10316 discovered by Bays & Hudson (2000).
Exhaustive testing using brute force may miss some
errors which can be detected by formal verification.
Most notable example is Pentium FDIV Bug
It’s good to be paranoid while verifying.
Dilawar Singh Formal Verification in VLSI
Formal Models
Specification First of all, we need to write down how my
system should behave. Mathematical Description.
Kripke Structures.
Formal verification that aims to prove the correctness of
design with respect to a given mathematical formal
specifications.
However, checking against a reference does not mean that
reference is correct. Sanity check of the reference is required.
Dilawar Singh Formal Verification in VLSI
How hard is formal verification
Writing out complete
proof for correctness is
like defeating Tai Lung
without a dragon scroll.
And even one has one,
not necessarily one can
use it.
Assumptions and special
cases must be made
explicit. Even for small
undertaking, this is a big
task. Figure: Stick to details and
procedures. Not everyone is gifted!
Dilawar Singh Formal Verification in VLSI
Theorem Provers
It would be great if one can prove or
even generate a proof using computer.
It will reduce the risk of mistakes and
can automate some part of it for a
large system.
Downside: People may become
dumber at a cost of smarter planet.
There are many software package
available for this purpose. A very good
list can be found here.a
a
http://www.cs.indiana.edu/formal-methods-
education/Tools/ Figure: From
http://shemesh.larc.nasa.gov/images/humor-whole-
truth.jpg
Dilawar Singh Formal Verification in VLSI
Verification - Hardware V/S Software
In recent years, formal hardware
verification have become very
important part of development
process. Almost all of the leading
companies use them but software
companies are still lagging. a
Why?
Probably because they can get away
with it. A faulty software does not
throw you our of business. Microsoft
Windows is still around.
Its easy to write patches for software.
Almost impossible for a hardware.
a
Formal methods : State of Art and Future
Directions, Clarke and Wing, CMU.
Figure: A faulty hardware (and
or (= xor?)) faulty software) can
make your machine life miserable.
Take care!
Dilawar Singh Formal Verification in VLSI
Combinational Comparison
One very fundamental question is whether two given
combinational circuits are equivalent for a given input
combination. For example, output of a synthesis tool modified
by a designer to reduce the gate.
Task is that optimised and unoptimised circuits are
equivalent. This can be done by verifying truth table.
Tautology checking.
Though this can be automated, but in practice, working with
truth table are tedious and inefficient.
Dilawar Singh Formal Verification in VLSI
Efficient tautology checking
Tautology is NP-complete problem. One have to find
heuristics for given cases till someone gives an efficient
algorithm to solve these problems.
Divide the circuit and solve for smaller parts.
In practice, Binary Decision Diagrams are efficient. They also
give a canonical representation for a given boolean formula
with a specific variable ordering. 2
Other methods are Integer Programming, Davis-Putnam
procedures.
Symbolic simulation is also a candidate. They have been
inefficient till now.
2
Bounded Model Checking, Armien Biere et al. Advances in computers,
2003
Dilawar Singh Formal Verification in VLSI
Symbolic Trajectory Evaluation
One can write specification in a restricted temporal logic
specifying the behavior over bounded-length trajectories
(sequence of circuit state).
One example : if the circuit satisfy the property P then after
n transition it will satisfy the property Q. E.g. if P (a counter
is reset) is true then Q (the output is n) will be true after n
transitions.
The the circuit can be checked for this specification. If this
does not hold true then a witness will be found.
Dilawar Singh Formal Verification in VLSI
Temporal Logic Model Checking
In general, specification can be written in more general
temporal logic without the limitation of bounded
trajectories.Hardware is reduced to a state transition system in
which at every state, one checks whether a given atomic
formula holds or not.
Linear Temporal Logic (LTL) and Computation Tree Logic
(CTL) can be used to describe the behaviour.
In CTL, behaviour can be specified by quantifying both over
future and over all range of possible states transition
sequence. Kripke Structure are natural for these specification.
Since every transition system is coded up with combination of
boolean variables, BDD are used to represent them. There are
many BDD packages available. 3
For example, EGf means that there exists a paths for which f
holds in every state. A path is a sequence of possible state
transition.
3
http://vlsicad.eecs.umich.edu/BK/Slots/cache/www.itu.dk/research/buddy/index.
Dilawar Singh Formal Verification in VLSI
Example : Kripke Structure
Kripke structure K = (S, I, T, L) .
S is the set of states; I ⊆ S is the set
of initial states; T ⊆ S × S is the
transition relations and L: S → P(A)
is the labeling function, where A is the
set of atomic proposition, and P(A)
denotes the power-set of A i.e. for a
state s ∈ S the set L(s) is made of the
atomic proposition that holds in s.
S = {00, 01, 10, 11}
I = {00}
T = {(00, 01), (00, 11), (01, 00), (01, 10),
(10, 11), (10, 01), (11, 10), (11, 00), (10, 00)}
Figure: A finite State Machine!
Dilawar Singh Formal Verification in VLSI
Example : Temporal representation
Let xnext is the next state and x is the
current state of two bit vector.
Assuming that both up and down can
not be 0 at same time,
xp(0) = ¬x(0) (1)
xp(1) = x(0) x(1) (2)
xm(0) = ¬x(0) (3)
xm(1) = ¬(x(1) ¬x(0)) (4)
T(xnext, x): xnext = (up ∧ ¬down ∧ xp)(5)
∨(¬up ∧ down ∧ xm) ∨ (up ∧ down ∧ xn)(6)
f : T holds.
EGf is true. In fact for every path f is
true i.e. AGf holds.
Figure: A finite State Machine!
Dilawar Singh Formal Verification in VLSI
Model Checking
In model checking, one builds a finite model of a system and
check that a desired property holds in that system. This is
done by search exhaustively (and some times wisely), if it does
not hold and a counterexample is produced. That is its
greatest strength to able to produce and error and thus
suitable for debugging. Since model is finite, it will terminate.
It is mostly used in hardware and protocol verification.
Two approaches are genrally used in model checking,
TEMPORAL MODEL CHECKING (we have seeb them ) and
‘find and automation and compare to the specification to
determine whether or not its behaviour conforms to that
specification . For example, Language Inclusion (Har’El and
Krushan, 19941], refinement ordering [Cleaveland et all. 93],
observal equivalence [Cleaveland et all 93, Fernandez, 96, Roy
and de Simone 90].
Vardi and Wolper [1986] have shown how the temporal model
checking problem could be recast in terms of automata, thus
Dilawar Singh Formal Verification in VLSI
Theorem Proving V/s Model Checking
Two well established approach to verification are model
checking and theorem proving. Model checking is very fast
but can handle finite states.
When theorem proving fails, unlike Model Checking, it does
not produce a counter-example.
Model checking is much faster than theorem proving. But the
problem is STATE EXPLOSION. There are heuristics to
improve this though [Krushan 1994; Krushan 1994] and
semantic minimization (Elseaidy et al. 1996] to eliminate
unnecessary states from a system modeling. Using this
method one has verified 10120 reachable states.
Theorem proving can deal with infinite state space. It uses
structural induction to prove over infinite domains.
Dilawar Singh Formal Verification in VLSI
Blah Blah
The overreaching goal of formal methods is to help engineers
construct more reliable systems. A global property is broken
into local properties which are conceptually easier to handle.
Abstraction is also needed. Hardware specification can written
down in more abstract language like Esteral (good for control
engineering freaks).
Combination of mathematical theories is also a very less
explored area. One solid concepts from one discipline can find
application in another numerous fields, graph theory is one of
the most remarkable example of it.
Who can forget to include better data structures and
algorithms.
Rather than building models for some specific problem, one
can ambitiously romanticise “meta-tools” which themselves
can produce or change themselves to handle a particular
problem domain. Integration of available methods?
Dilawar Singh Formal Verification in VLSI
Tools
In the hand of a Jedi Knight a simple looking light saber is
more efficient that a million dollar weapon. How to use your
available tool efficiently, one should learn through practice.
Anyone who have mastered vim editor will probably agree
with me.
A list of available tools are given here
http://www.cs.indiana.edu/formal-methods-
education/Tools/.
Dilawar Singh Formal Verification in VLSI

More Related Content

What's hot

Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
Sameh El-Ashry
 
A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design
chiportal
 
ASIC Design Flow
ASIC Design FlowASIC Design Flow
ASIC Design Flow
RiseTime Semiconductors
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
Ramdas Mozhikunnath
 
Uvm presentation dac2011_final
Uvm presentation dac2011_finalUvm presentation dac2011_final
Uvm presentation dac2011_finalsean chen
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICs
Dr. Shivananda Koteshwar
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
Gireesh Kallihal
 
Timing Analysis
Timing AnalysisTiming Analysis
Timing Analysis
rchovatiya
 
2019 2 testing and verification of vlsi design_verification
2019 2 testing and verification of vlsi design_verification2019 2 testing and verification of vlsi design_verification
2019 2 testing and verification of vlsi design_verification
Usha Mehta
 
System verilog assertions (sva) ( pdf drive )
System verilog assertions (sva) ( pdf drive )System verilog assertions (sva) ( pdf drive )
System verilog assertions (sva) ( pdf drive )
sivasubramanian manickam
 
CPU Verification
CPU VerificationCPU Verification
CPU Verification
Ramdas Mozhikunnath
 
ASIC Design.pdf
ASIC Design.pdfASIC Design.pdf
ASIC Design.pdf
Ahmed Abdelazeem
 
PowerPlanning.pdf
PowerPlanning.pdfPowerPlanning.pdf
PowerPlanning.pdf
Ahmed Abdelazeem
 
UVM TUTORIAL;
UVM TUTORIAL;UVM TUTORIAL;
UVM TUTORIAL;
Azad Mishra
 
Verification Challenges and Methodologies
Verification Challenges and MethodologiesVerification Challenges and Methodologies
Verification Challenges and Methodologies
Dr. Shivananda Koteshwar
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
Amal Khailtash
 
Introduction to System verilog
Introduction to System verilog Introduction to System verilog
Introduction to System verilog
Pushpa Yakkala
 
Complete ASIC design flow - VLSI UNIVERSE
Complete ASIC design flow - VLSI UNIVERSEComplete ASIC design flow - VLSI UNIVERSE
Complete ASIC design flow - VLSI UNIVERSE
VLSIUNIVERSE
 
Basics of Functional Verification - Arrow Devices
Basics of Functional Verification - Arrow DevicesBasics of Functional Verification - Arrow Devices
Basics of Functional Verification - Arrow Devices
Arrow Devices
 

What's hot (20)

Functional verification techniques EW16 session
Functional verification techniques  EW16 sessionFunctional verification techniques  EW16 session
Functional verification techniques EW16 session
 
A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design A comprehensive formal verification solution for ARM based SOC design
A comprehensive formal verification solution for ARM based SOC design
 
ASIC Design Flow
ASIC Design FlowASIC Design Flow
ASIC Design Flow
 
SOC Verification using SystemVerilog
SOC Verification using SystemVerilog SOC Verification using SystemVerilog
SOC Verification using SystemVerilog
 
Uvm presentation dac2011_final
Uvm presentation dac2011_finalUvm presentation dac2011_final
Uvm presentation dac2011_final
 
Verification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICsVerification challenges and methodologies - SoC and ASICs
Verification challenges and methodologies - SoC and ASICs
 
ASIC design verification
ASIC design verificationASIC design verification
ASIC design verification
 
Timing Analysis
Timing AnalysisTiming Analysis
Timing Analysis
 
2019 2 testing and verification of vlsi design_verification
2019 2 testing and verification of vlsi design_verification2019 2 testing and verification of vlsi design_verification
2019 2 testing and verification of vlsi design_verification
 
SOC design
SOC design SOC design
SOC design
 
System verilog assertions (sva) ( pdf drive )
System verilog assertions (sva) ( pdf drive )System verilog assertions (sva) ( pdf drive )
System verilog assertions (sva) ( pdf drive )
 
CPU Verification
CPU VerificationCPU Verification
CPU Verification
 
ASIC Design.pdf
ASIC Design.pdfASIC Design.pdf
ASIC Design.pdf
 
PowerPlanning.pdf
PowerPlanning.pdfPowerPlanning.pdf
PowerPlanning.pdf
 
UVM TUTORIAL;
UVM TUTORIAL;UVM TUTORIAL;
UVM TUTORIAL;
 
Verification Challenges and Methodologies
Verification Challenges and MethodologiesVerification Challenges and Methodologies
Verification Challenges and Methodologies
 
SystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features SummarySystemVerilog OOP Ovm Features Summary
SystemVerilog OOP Ovm Features Summary
 
Introduction to System verilog
Introduction to System verilog Introduction to System verilog
Introduction to System verilog
 
Complete ASIC design flow - VLSI UNIVERSE
Complete ASIC design flow - VLSI UNIVERSEComplete ASIC design flow - VLSI UNIVERSE
Complete ASIC design flow - VLSI UNIVERSE
 
Basics of Functional Verification - Arrow Devices
Basics of Functional Verification - Arrow DevicesBasics of Functional Verification - Arrow Devices
Basics of Functional Verification - Arrow Devices
 

Similar to Formal verification

SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynote
Shiva Nejati
 
A Survey of functional verification techniques
A Survey of functional verification techniquesA Survey of functional verification techniques
A Survey of functional verification techniques
IJSRD
 
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCLOCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCLLionel Briand
 
Dsp
DspDsp
DBTest 2013 - In Data Veritas - Data Driven Testing for Distributed Systems
DBTest 2013 - In Data Veritas - Data Driven Testing for Distributed SystemsDBTest 2013 - In Data Veritas - Data Driven Testing for Distributed Systems
DBTest 2013 - In Data Veritas - Data Driven Testing for Distributed Systems
Mihir Gandhi
 
MetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systemsMetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systems
Lawrence Paulson
 
Verification and validation of knowledge bases using test cases generated by ...
Verification and validation of knowledge bases using test cases generated by ...Verification and validation of knowledge bases using test cases generated by ...
Verification and validation of knowledge bases using test cases generated by ...
Waqas Tariq
 
Annotated Bibliography .Guidelines Annotated Bibliograph.docx
Annotated Bibliography  .Guidelines Annotated Bibliograph.docxAnnotated Bibliography  .Guidelines Annotated Bibliograph.docx
Annotated Bibliography .Guidelines Annotated Bibliograph.docx
justine1simpson78276
 
Specification based or black box techniques
Specification based or black box techniquesSpecification based or black box techniques
Specification based or black box techniques
M HiDayat
 
OS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGES
OS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGESOS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGES
OS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGES
IJCSES Journal
 
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Lionel Briand
 
Specification based or black box techniques
Specification based or black box techniquesSpecification based or black box techniques
Specification based or black box techniques
Yoga Pratama Putra
 
Coverage and Introduction to UVM
Coverage and Introduction to UVMCoverage and Introduction to UVM
Coverage and Introduction to UVM
Dr. Shivananda Koteshwar
 
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Daniel Katz
 
Building a new CTL model checker using Web Services
Building a new CTL model checker using Web ServicesBuilding a new CTL model checker using Web Services
Building a new CTL model checker using Web Services
infopapers
 
Test for AI model
Test for AI modelTest for AI model
Test for AI model
Arithmer Inc.
 
50134147-Knowledge-Representation-Using-Rules.ppt
50134147-Knowledge-Representation-Using-Rules.ppt50134147-Knowledge-Representation-Using-Rules.ppt
50134147-Knowledge-Representation-Using-Rules.ppt
ssuserec53e73
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and Model
Md. Hasan Imam Bijoy
 

Similar to Formal verification (20)

SSBSE 2020 keynote
SSBSE 2020 keynoteSSBSE 2020 keynote
SSBSE 2020 keynote
 
A Survey of functional verification techniques
A Survey of functional verification techniquesA Survey of functional verification techniques
A Survey of functional verification techniques
 
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCLOCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
OCLR: A More Expressive, Pattern-Based Temporal Extension of OCL
 
Dsp
DspDsp
Dsp
 
DBTest 2013 - In Data Veritas - Data Driven Testing for Distributed Systems
DBTest 2013 - In Data Veritas - Data Driven Testing for Distributed SystemsDBTest 2013 - In Data Veritas - Data Driven Testing for Distributed Systems
DBTest 2013 - In Data Veritas - Data Driven Testing for Distributed Systems
 
MetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systemsMetiTarski's menagerie of cooperating systems
MetiTarski's menagerie of cooperating systems
 
Verification and validation of knowledge bases using test cases generated by ...
Verification and validation of knowledge bases using test cases generated by ...Verification and validation of knowledge bases using test cases generated by ...
Verification and validation of knowledge bases using test cases generated by ...
 
Annotated Bibliography .Guidelines Annotated Bibliograph.docx
Annotated Bibliography  .Guidelines Annotated Bibliograph.docxAnnotated Bibliography  .Guidelines Annotated Bibliograph.docx
Annotated Bibliography .Guidelines Annotated Bibliograph.docx
 
Specification based or black box techniques
Specification based or black box techniquesSpecification based or black box techniques
Specification based or black box techniques
 
Dill may-2008
Dill may-2008Dill may-2008
Dill may-2008
 
OS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGES
OS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGESOS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGES
OS VERIFICATION- A SURVEY AS A SOURCE OF FUTURE CHALLENGES
 
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
Evaluating Model Testing and Model Checking for Finding Requirements Violatio...
 
Specification based or black box techniques
Specification based or black box techniquesSpecification based or black box techniques
Specification based or black box techniques
 
Coverage and Introduction to UVM
Coverage and Introduction to UVMCoverage and Introduction to UVM
Coverage and Introduction to UVM
 
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
Legal Analytics Course - Class 6 - Overfitting, Underfitting, & Cross-Validat...
 
Simulation
SimulationSimulation
Simulation
 
Building a new CTL model checker using Web Services
Building a new CTL model checker using Web ServicesBuilding a new CTL model checker using Web Services
Building a new CTL model checker using Web Services
 
Test for AI model
Test for AI modelTest for AI model
Test for AI model
 
50134147-Knowledge-Representation-Using-Rules.ppt
50134147-Knowledge-Representation-Using-Rules.ppt50134147-Knowledge-Representation-Using-Rules.ppt
50134147-Knowledge-Representation-Using-Rules.ppt
 
Introduction to System, Simulation and Model
Introduction to System, Simulation and ModelIntroduction to System, Simulation and Model
Introduction to System, Simulation and Model
 

More from DIlawar Singh

Sexual love
Sexual loveSexual love
Sexual love
DIlawar Singh
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDLDIlawar Singh
 
Indian Middle Class : A bird-view
Indian Middle Class : A bird-viewIndian Middle Class : A bird-view
Indian Middle Class : A bird-viewDIlawar Singh
 
Towards Microelectrode Arrays for Retinal Prosthesis
Towards Microelectrode Arrays for Retinal ProsthesisTowards Microelectrode Arrays for Retinal Prosthesis
Towards Microelectrode Arrays for Retinal Prosthesis
DIlawar Singh
 
On Coding Guidelines
On Coding GuidelinesOn Coding Guidelines
On Coding Guidelines
DIlawar Singh
 

More from DIlawar Singh (6)

Sexual love
Sexual loveSexual love
Sexual love
 
Notes on Simulation and GHDL
Notes on Simulation and GHDLNotes on Simulation and GHDL
Notes on Simulation and GHDL
 
Indian Middle Class : A bird-view
Indian Middle Class : A bird-viewIndian Middle Class : A bird-view
Indian Middle Class : A bird-view
 
Towards Microelectrode Arrays for Retinal Prosthesis
Towards Microelectrode Arrays for Retinal ProsthesisTowards Microelectrode Arrays for Retinal Prosthesis
Towards Microelectrode Arrays for Retinal Prosthesis
 
On cmos fabrication
On cmos fabricationOn cmos fabrication
On cmos fabrication
 
On Coding Guidelines
On Coding GuidelinesOn Coding Guidelines
On Coding Guidelines
 

Recently uploaded

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Formal verification

  • 1. Formal Verification in VLSI Dilawar Singh Indian Institute of Technology Bombay November 28, 2010 Dilawar Singh Formal Verification in VLSI
  • 2. About These slides were evolved during Testing and Verification of VLSI course offered by Prof. M. P. Desai at IIT Bombay. It deals with non-technicalities of the ’formal verification’ rather than theories and principles. Some comments are unprofessionally personal.Reader discretion is advised. :-) Figure: From http://shemesh.larc.nasa.gov/images/humor-sneak- a-peek.jpg Dilawar Singh Formal Verification in VLSI
  • 3. Formal Verification Traditionally one discovers error in software and hardware by testing all possible combination e.g. using simulation.1 Since VLSI systems are too large, one can test only a (tiny?) fraction of them in practice. And this is when computer computer runs faster than Chacha Chaudhary’s Brain. Besides, everything runs on simulation is orders of magnitude slower than the real hardware, so pre-silicon testing is limited. That is why so little new design are coming out of industries. Testing has become way too costly. Over 25% of total cost. Formal verification is an alternative that proves mathematically that given VLSI system will work as intended. Testing is for fault detection.Formal Verification is fault avoidance technique. 1 I’m done simulating; Now what?, Kantrowiz M and Noack Lisa, DEC Dilawar Singh Formal Verification in VLSI
  • 4. Exhaustiveness In 1914, Littlewood proved that π(n) − li(n) changes sign infinitely often, where pi(n) is the number of primes ≤ n and li(n) = n 0 du ln u though first instant of sign change occurs when n ≥ 1.39822 × 10316 discovered by Bays & Hudson (2000). Exhaustive testing using brute force may miss some errors which can be detected by formal verification. Most notable example is Pentium FDIV Bug It’s good to be paranoid while verifying. Dilawar Singh Formal Verification in VLSI
  • 5. Formal Models Specification First of all, we need to write down how my system should behave. Mathematical Description. Kripke Structures. Formal verification that aims to prove the correctness of design with respect to a given mathematical formal specifications. However, checking against a reference does not mean that reference is correct. Sanity check of the reference is required. Dilawar Singh Formal Verification in VLSI
  • 6. How hard is formal verification Writing out complete proof for correctness is like defeating Tai Lung without a dragon scroll. And even one has one, not necessarily one can use it. Assumptions and special cases must be made explicit. Even for small undertaking, this is a big task. Figure: Stick to details and procedures. Not everyone is gifted! Dilawar Singh Formal Verification in VLSI
  • 7. Theorem Provers It would be great if one can prove or even generate a proof using computer. It will reduce the risk of mistakes and can automate some part of it for a large system. Downside: People may become dumber at a cost of smarter planet. There are many software package available for this purpose. A very good list can be found here.a a http://www.cs.indiana.edu/formal-methods- education/Tools/ Figure: From http://shemesh.larc.nasa.gov/images/humor-whole- truth.jpg Dilawar Singh Formal Verification in VLSI
  • 8. Verification - Hardware V/S Software In recent years, formal hardware verification have become very important part of development process. Almost all of the leading companies use them but software companies are still lagging. a Why? Probably because they can get away with it. A faulty software does not throw you our of business. Microsoft Windows is still around. Its easy to write patches for software. Almost impossible for a hardware. a Formal methods : State of Art and Future Directions, Clarke and Wing, CMU. Figure: A faulty hardware (and or (= xor?)) faulty software) can make your machine life miserable. Take care! Dilawar Singh Formal Verification in VLSI
  • 9. Combinational Comparison One very fundamental question is whether two given combinational circuits are equivalent for a given input combination. For example, output of a synthesis tool modified by a designer to reduce the gate. Task is that optimised and unoptimised circuits are equivalent. This can be done by verifying truth table. Tautology checking. Though this can be automated, but in practice, working with truth table are tedious and inefficient. Dilawar Singh Formal Verification in VLSI
  • 10. Efficient tautology checking Tautology is NP-complete problem. One have to find heuristics for given cases till someone gives an efficient algorithm to solve these problems. Divide the circuit and solve for smaller parts. In practice, Binary Decision Diagrams are efficient. They also give a canonical representation for a given boolean formula with a specific variable ordering. 2 Other methods are Integer Programming, Davis-Putnam procedures. Symbolic simulation is also a candidate. They have been inefficient till now. 2 Bounded Model Checking, Armien Biere et al. Advances in computers, 2003 Dilawar Singh Formal Verification in VLSI
  • 11. Symbolic Trajectory Evaluation One can write specification in a restricted temporal logic specifying the behavior over bounded-length trajectories (sequence of circuit state). One example : if the circuit satisfy the property P then after n transition it will satisfy the property Q. E.g. if P (a counter is reset) is true then Q (the output is n) will be true after n transitions. The the circuit can be checked for this specification. If this does not hold true then a witness will be found. Dilawar Singh Formal Verification in VLSI
  • 12. Temporal Logic Model Checking In general, specification can be written in more general temporal logic without the limitation of bounded trajectories.Hardware is reduced to a state transition system in which at every state, one checks whether a given atomic formula holds or not. Linear Temporal Logic (LTL) and Computation Tree Logic (CTL) can be used to describe the behaviour. In CTL, behaviour can be specified by quantifying both over future and over all range of possible states transition sequence. Kripke Structure are natural for these specification. Since every transition system is coded up with combination of boolean variables, BDD are used to represent them. There are many BDD packages available. 3 For example, EGf means that there exists a paths for which f holds in every state. A path is a sequence of possible state transition. 3 http://vlsicad.eecs.umich.edu/BK/Slots/cache/www.itu.dk/research/buddy/index. Dilawar Singh Formal Verification in VLSI
  • 13. Example : Kripke Structure Kripke structure K = (S, I, T, L) . S is the set of states; I ⊆ S is the set of initial states; T ⊆ S × S is the transition relations and L: S → P(A) is the labeling function, where A is the set of atomic proposition, and P(A) denotes the power-set of A i.e. for a state s ∈ S the set L(s) is made of the atomic proposition that holds in s. S = {00, 01, 10, 11} I = {00} T = {(00, 01), (00, 11), (01, 00), (01, 10), (10, 11), (10, 01), (11, 10), (11, 00), (10, 00)} Figure: A finite State Machine! Dilawar Singh Formal Verification in VLSI
  • 14. Example : Temporal representation Let xnext is the next state and x is the current state of two bit vector. Assuming that both up and down can not be 0 at same time, xp(0) = ¬x(0) (1) xp(1) = x(0) x(1) (2) xm(0) = ¬x(0) (3) xm(1) = ¬(x(1) ¬x(0)) (4) T(xnext, x): xnext = (up ∧ ¬down ∧ xp)(5) ∨(¬up ∧ down ∧ xm) ∨ (up ∧ down ∧ xn)(6) f : T holds. EGf is true. In fact for every path f is true i.e. AGf holds. Figure: A finite State Machine! Dilawar Singh Formal Verification in VLSI
  • 15. Model Checking In model checking, one builds a finite model of a system and check that a desired property holds in that system. This is done by search exhaustively (and some times wisely), if it does not hold and a counterexample is produced. That is its greatest strength to able to produce and error and thus suitable for debugging. Since model is finite, it will terminate. It is mostly used in hardware and protocol verification. Two approaches are genrally used in model checking, TEMPORAL MODEL CHECKING (we have seeb them ) and ‘find and automation and compare to the specification to determine whether or not its behaviour conforms to that specification . For example, Language Inclusion (Har’El and Krushan, 19941], refinement ordering [Cleaveland et all. 93], observal equivalence [Cleaveland et all 93, Fernandez, 96, Roy and de Simone 90]. Vardi and Wolper [1986] have shown how the temporal model checking problem could be recast in terms of automata, thus Dilawar Singh Formal Verification in VLSI
  • 16. Theorem Proving V/s Model Checking Two well established approach to verification are model checking and theorem proving. Model checking is very fast but can handle finite states. When theorem proving fails, unlike Model Checking, it does not produce a counter-example. Model checking is much faster than theorem proving. But the problem is STATE EXPLOSION. There are heuristics to improve this though [Krushan 1994; Krushan 1994] and semantic minimization (Elseaidy et al. 1996] to eliminate unnecessary states from a system modeling. Using this method one has verified 10120 reachable states. Theorem proving can deal with infinite state space. It uses structural induction to prove over infinite domains. Dilawar Singh Formal Verification in VLSI
  • 17. Blah Blah The overreaching goal of formal methods is to help engineers construct more reliable systems. A global property is broken into local properties which are conceptually easier to handle. Abstraction is also needed. Hardware specification can written down in more abstract language like Esteral (good for control engineering freaks). Combination of mathematical theories is also a very less explored area. One solid concepts from one discipline can find application in another numerous fields, graph theory is one of the most remarkable example of it. Who can forget to include better data structures and algorithms. Rather than building models for some specific problem, one can ambitiously romanticise “meta-tools” which themselves can produce or change themselves to handle a particular problem domain. Integration of available methods? Dilawar Singh Formal Verification in VLSI
  • 18. Tools In the hand of a Jedi Knight a simple looking light saber is more efficient that a million dollar weapon. How to use your available tool efficiently, one should learn through practice. Anyone who have mastered vim editor will probably agree with me. A list of available tools are given here http://www.cs.indiana.edu/formal-methods- education/Tools/. Dilawar Singh Formal Verification in VLSI