SlideShare a Scribd company logo
1 of 32
Download to read offline
1/33
Testing and Verification of VLSI Systems
Binary Decission Diagram (BDD)
Jaynaryan T Tudu
Indian Institute of Technology Tirupati, India
31st Jan, 2023
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
3/33
Verification Flow
Figure : Verification flow of the possible approaches
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
4/33
Formal Verification Methodology
Create a formal model for some system of interest:
Hardware
Communication Protocol
Software - specifically concurrent software
Describe formally a specification that we desire the model to
satisfy
Check whether the model satisfies the specification
- Theorem proving
- Model checking
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
5/33
SAT Formula of Basic Gates
The formal starts with formal representation. We use SATisfiability
expression to capture the correctness of a given design/function.
Figure : SAT formula
The formula are in CNF - conjunctive normal form.
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
6/33
Derivation of SAT and CNF
The boolean expression of the:
a → b is a + b
Example 1: Deriving CNF of c = a + b
if c is true, then at least one of its inputs a or b is true
if c is false, then both its inputs a and b are false
(c → (a + b)).(c → a.b)
(c + (a + b)).(c + (a.b))
(c + a + b).(c + (a).(c + b))
Example 2: Deriving CNF for r ↔ (p + q)
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
7/33
Circuit as SAT
Figure : Representing a large circuit as SAT
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
8/33
Circuit as SAT: XOR Gate
How to verify using simulation? How to verify using formal
method?
Figure : XOR gate using NAND
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
9/33
Circuit as SAT Formal Verification
Transformation of formulae to the specification of circuit
Apply mathematical reasoning and axioms
Figure : Mathematical Proof of correctness
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
10/33
Formal Verification Techniques
Deductive verification (theorem proving)
Axiom based proving.
Model Checking
Symbolic algorithm using binary decission diagram
Equivalence checking
Check whether two circuit are equivalent
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
11/33
Circuit Representation
As Boolean function
As Binary decission diagram
A boolean function with n variable:
F : {0, 1}n → 0, 1
The function can be further expressed with n-1 variables.
Fx1 (x2.....xn) = F(1, x2, x3, ......xn)
Fx0
1
(x2....xn) = F(0, x2, x3, ......xn)
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
12/33
Circuit Representation: BDD
Binary Decision Diagram:
Figure : Representing a large circuit as SAT
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
13/33
Binary Decision Diagram (BDD)
How to construct a BDD from a given specification of design/ckt?
Specification: Truth table or Written in HDL - functional
Figure : BDD constructed from a given specification in truth table
Description of BDD: Vertex represent Decision variable, Greenline
edge for value 0 and Redline edge for value 1, and leaf node for
function value. A Path is from root to leaf.
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
14/33
BDD: Variable Ordering
Examine for ordering of the variable, does it matter?
Example:
Figure : The variable ordering rule to be followed
Assign total ordering to variables: x1 < x2 < x3
Variable must appear in ascending order along all the paths.
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
15/33
BDD - Optimization of Size
Reduction Rule 1: Merge equivalent leaves
Figure : Size Reduction for a given BDD tree
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
16/33
BDD - Optimization of Size
Reduction Rule 2: Merge two or more isomorphic nodes. left node
x and right node x in the following example.
Example:
Figure : Isomorphic nodes: for which the input and output are same
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
17/33
BDD Optimization
Rule 3: Eliminate Redundant Nodes: Two consecuting nodes
connected with dual edges (0 and 1) can be merged
Example:
Figure : X2 is redundant of X3 and X3 in left is redundant to 0
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
18/33
Using BDD in Verification
One use we have seen on how BDD can be used to determine
SAT assignment
Can we use this for formal equivalence checking?
Can we check that two circuits with same functionality will
have some properties to say that they are equivalent or having
same functionality? (we are not so much concerned about
structure.)
Can the same functionality a circuit may leads to two or more
different kind of BDD?
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
19/33
Using BDD in Verification: Variable Ordering
Example: Are these two diagram represen the same functionality?
Figure : Two BDD with different looks having same functionality
How do we ensure they are indeed same?
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
20/33
Using BDD in Verification: Variable Ordering
Example: Are these two diagram represen the same functionality?
Figure : Two BDD with different looks having same functionality
How do we ensure they are indeed same?
Ans: can we find out one-to-one mapping among variables such
that the traversed path remain similar?
Example: a <=> b
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
21/33
Using BDD in Verification: Variable Ordering
Do this Example : a.(b + c)
Figure : Two differently looking spcifications for above expression
Can we use BDD to say that they are same?
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
22/33
OBDD: Ordered Binary Decision Diagram OBDD
Therefore, order of the variable can leads to differently looking
BDD.
Also, we have seen for the same variable order, we may get
different BDD! (optimized vs unoptimized)
Figure : BDD constructed from a given specification
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
23/33
OBDD: Ordered Binary Decision Diagram OBDD
Figure : BDD constructed from a given boolean expression: (X1 + X2).X3
Ordered BDD:
Let [x1, ..., xn] be an ordered list of variables without duplicates;
A BDD B has an ordering [x1, ..., xn] if
1. all variables of B occur in [x1, ..., xn]; and
2. if xj follows xi on a path in B then j > i
An ordered BDD (OBDD) is a BDD which has an ordering for some
list of variables.
The orderings of two OBBDs B and B’ are compatible if there are
no variables x, y such that: x is before y in the ordering for B, and y
is before x in the ordering for B’
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
24/33
OBDD: Ordered Binary Decision Diagram OBDD
Figure : BDD constructed from a given boolean expression: (X1 + X2).X3
For the above example, ordering is: X1 < X2 < X3
Theorem:
For a given ordering, the ROBDD representing a given function is
unique.
If B1 and B2 are two ROBDDs with compatible variable orderings
representing the same boolean function, then they have identical
structure.
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
25/33
Graph Isomorphism, ROBDD and Linear Complexity
Canonical representation of boolean function:
Theorem
For a given variable ordering, two functions are equivalent if and
only if graphs’ isomorphic can be tested in linear time. In
otherway: graph morphism for ROBDD for the same order can be
tested in linear time. (true for canonical representation.)
Exercise: Ordered BDD are same as the canonical boolean
expression!
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
26/33
OBDD and Size of BDD
- We have seen, order of variables do not have any impact on
functionality (needs an equivalence checking).
- Does the order of variable impacts the size of OBDD and the
ROBDD?
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
27/33
OBDD and Size of BDD
- We have seen, order of variables do not have any impact on functionality
(needs an equivalence checking).
- Does the order of variable impacts the size of OBDD and the ROBDD?
Example:
(a.b + c.d), construct OBDD, and ROBDD for the order
a < b < c < d and a < c < b < d
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
28/33
OBDD and Size of BDD
- We have seen, order of variables do not have any impact on functionality
(needs an equivalence checking).
- Does the order of variable impacts the size of OBDD and the ROBDD?
Example:
(a.b + c.d), construct OBDD, and ROBDD for the order
a < b < c < d and a < c < b < d
Figure : ROBDDs for two different orders of the same
specification/expression
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
29/33
OBDD and Size of BDD
One more example for Expression:
F(a1, a2, a3, b1, b2, b3) = (a1.b1) + (a2.b2) + (a3.b3)
Figure : BDD constructed from a given specification in truth table
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
30/33
BDD: Functionality and Structure
Binary Decision Diagram:
Figure : BDD Representing functionality
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
31/33
BDD: Multiple Entry nodes
Four bit adder Binary Decision Diagram : Verify whether this is
functionally adder or something else?
Figure : BDD constructed from a given specification in truth table
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
32/33
Usefulness of Canonical Representation
Absence of redundant variables: A boolean function f does
not depend on an input variable x if no nodes occur for x in
the ROBDD for f.
Semantic equivalence: Check f ≡ g by checking whether or
not the ROBDDs for f and g have identical structure.
Validity: Check if the BDD is identical to the one with just
the terminal node 1 and nothing else.
Satisfiability: Check if the BDD is not identical to the one
with just the terminal node 0 and nothing else.
Implication. Check if by for all x, f(x) → g(x) by checking
whether or not the ROBDD for f . g is constant 0.
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
33/33
Thank you
Formal verification Vs Simulation!
Thank You!
Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems

More Related Content

Similar to Vlsi.pdf

Module 2 logic gates
Module 2  logic gatesModule 2  logic gates
Module 2 logic gates
Deepak John
 
Name_siddhesh digital logic and application.pptx
Name_siddhesh digital logic and application.pptxName_siddhesh digital logic and application.pptx
Name_siddhesh digital logic and application.pptx
ssuser0f1a881
 
PF_IDETC_2012_Souma
PF_IDETC_2012_SoumaPF_IDETC_2012_Souma
PF_IDETC_2012_Souma
MDO_Lab
 

Similar to Vlsi.pdf (20)

Final Report
Final ReportFinal Report
Final Report
 
Module 2 logic gates
Module 2  logic gatesModule 2  logic gates
Module 2 logic gates
 
Xia Xiao-research paper
Xia Xiao-research paperXia Xiao-research paper
Xia Xiao-research paper
 
Yael Elmatad, Senior Data Scientist, Tapad at MLconf NYC - 4/15/16
Yael Elmatad, Senior Data Scientist, Tapad at MLconf NYC - 4/15/16Yael Elmatad, Senior Data Scientist, Tapad at MLconf NYC - 4/15/16
Yael Elmatad, Senior Data Scientist, Tapad at MLconf NYC - 4/15/16
 
REDUCED COMPLEXITY QUASI-CYCLIC LDPC ENCODER FOR IEEE 802.11N
REDUCED COMPLEXITY QUASI-CYCLIC LDPC ENCODER FOR IEEE 802.11N REDUCED COMPLEXITY QUASI-CYCLIC LDPC ENCODER FOR IEEE 802.11N
REDUCED COMPLEXITY QUASI-CYCLIC LDPC ENCODER FOR IEEE 802.11N
 
How to Speed Up Your Validation Process Without Really Trying?
How to Speed Up Your Validation Process Without Really Trying?How to Speed Up Your Validation Process Without Really Trying?
How to Speed Up Your Validation Process Without Really Trying?
 
Applying Regression Model to Predict the Effects of Shaft and Bearing Deviati...
Applying Regression Model to Predict the Effects of Shaft and Bearing Deviati...Applying Regression Model to Predict the Effects of Shaft and Bearing Deviati...
Applying Regression Model to Predict the Effects of Shaft and Bearing Deviati...
 
Binary decision diagrams
Binary decision diagramsBinary decision diagrams
Binary decision diagrams
 
A new efficient fpga design of residue to-binary converter
A new efficient fpga design of residue to-binary converterA new efficient fpga design of residue to-binary converter
A new efficient fpga design of residue to-binary converter
 
Newsletter 20.pdf
Newsletter 20.pdfNewsletter 20.pdf
Newsletter 20.pdf
 
Combinational Circuits Design in Digital System Design.pptx
Combinational Circuits Design in Digital System Design.pptxCombinational Circuits Design in Digital System Design.pptx
Combinational Circuits Design in Digital System Design.pptx
 
Name_siddhesh digital logic and application.pptx
Name_siddhesh digital logic and application.pptxName_siddhesh digital logic and application.pptx
Name_siddhesh digital logic and application.pptx
 
Free Ebooks Download
Free Ebooks Download Free Ebooks Download
Free Ebooks Download
 
PF_IDETC_2012_Souma
PF_IDETC_2012_SoumaPF_IDETC_2012_Souma
PF_IDETC_2012_Souma
 
A Configurable and Low Power Hard-Decision Viterbi Decoder in VLSI Architecture
A Configurable and Low Power Hard-Decision Viterbi Decoder in VLSI ArchitectureA Configurable and Low Power Hard-Decision Viterbi Decoder in VLSI Architecture
A Configurable and Low Power Hard-Decision Viterbi Decoder in VLSI Architecture
 
6_SQL.pdf
6_SQL.pdf6_SQL.pdf
6_SQL.pdf
 
Advanced Econometrics L13-14.pptx
Advanced Econometrics L13-14.pptxAdvanced Econometrics L13-14.pptx
Advanced Econometrics L13-14.pptx
 
Lec 08 - DESIGN PROCEDURE
Lec 08 - DESIGN PROCEDURELec 08 - DESIGN PROCEDURE
Lec 08 - DESIGN PROCEDURE
 
Multimedia lossy compression algorithms
Multimedia lossy compression algorithmsMultimedia lossy compression algorithms
Multimedia lossy compression algorithms
 
Reduced ordered binary decision diagram
Reduced ordered binary decision diagramReduced ordered binary decision diagram
Reduced ordered binary decision diagram
 

Recently uploaded

Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
chumtiyababu
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
AldoGarca30
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 

Recently uploaded (20)

Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Verification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptxVerification of thevenin's theorem for BEEE Lab (1).pptx
Verification of thevenin's theorem for BEEE Lab (1).pptx
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Introduction to Serverless with AWS Lambda
Introduction to Serverless with AWS LambdaIntroduction to Serverless with AWS Lambda
Introduction to Serverless with AWS Lambda
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLEGEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
GEAR TRAIN- BASIC CONCEPTS AND WORKING PRINCIPLE
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
School management system project Report.pdf
School management system project Report.pdfSchool management system project Report.pdf
School management system project Report.pdf
 
Computer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to ComputersComputer Lecture 01.pptxIntroduction to Computers
Computer Lecture 01.pptxIntroduction to Computers
 
AIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech studentsAIRCANVAS[1].pdf mini project for btech students
AIRCANVAS[1].pdf mini project for btech students
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 

Vlsi.pdf

  • 1. 1/33 Testing and Verification of VLSI Systems Binary Decission Diagram (BDD) Jaynaryan T Tudu Indian Institute of Technology Tirupati, India 31st Jan, 2023 Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 2. 3/33 Verification Flow Figure : Verification flow of the possible approaches Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 3. 4/33 Formal Verification Methodology Create a formal model for some system of interest: Hardware Communication Protocol Software - specifically concurrent software Describe formally a specification that we desire the model to satisfy Check whether the model satisfies the specification - Theorem proving - Model checking Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 4. 5/33 SAT Formula of Basic Gates The formal starts with formal representation. We use SATisfiability expression to capture the correctness of a given design/function. Figure : SAT formula The formula are in CNF - conjunctive normal form. Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 5. 6/33 Derivation of SAT and CNF The boolean expression of the: a → b is a + b Example 1: Deriving CNF of c = a + b if c is true, then at least one of its inputs a or b is true if c is false, then both its inputs a and b are false (c → (a + b)).(c → a.b) (c + (a + b)).(c + (a.b)) (c + a + b).(c + (a).(c + b)) Example 2: Deriving CNF for r ↔ (p + q) Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 6. 7/33 Circuit as SAT Figure : Representing a large circuit as SAT Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 7. 8/33 Circuit as SAT: XOR Gate How to verify using simulation? How to verify using formal method? Figure : XOR gate using NAND Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 8. 9/33 Circuit as SAT Formal Verification Transformation of formulae to the specification of circuit Apply mathematical reasoning and axioms Figure : Mathematical Proof of correctness Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 9. 10/33 Formal Verification Techniques Deductive verification (theorem proving) Axiom based proving. Model Checking Symbolic algorithm using binary decission diagram Equivalence checking Check whether two circuit are equivalent Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 10. 11/33 Circuit Representation As Boolean function As Binary decission diagram A boolean function with n variable: F : {0, 1}n → 0, 1 The function can be further expressed with n-1 variables. Fx1 (x2.....xn) = F(1, x2, x3, ......xn) Fx0 1 (x2....xn) = F(0, x2, x3, ......xn) Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 11. 12/33 Circuit Representation: BDD Binary Decision Diagram: Figure : Representing a large circuit as SAT Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 12. 13/33 Binary Decision Diagram (BDD) How to construct a BDD from a given specification of design/ckt? Specification: Truth table or Written in HDL - functional Figure : BDD constructed from a given specification in truth table Description of BDD: Vertex represent Decision variable, Greenline edge for value 0 and Redline edge for value 1, and leaf node for function value. A Path is from root to leaf. Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 13. 14/33 BDD: Variable Ordering Examine for ordering of the variable, does it matter? Example: Figure : The variable ordering rule to be followed Assign total ordering to variables: x1 < x2 < x3 Variable must appear in ascending order along all the paths. Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 14. 15/33 BDD - Optimization of Size Reduction Rule 1: Merge equivalent leaves Figure : Size Reduction for a given BDD tree Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 15. 16/33 BDD - Optimization of Size Reduction Rule 2: Merge two or more isomorphic nodes. left node x and right node x in the following example. Example: Figure : Isomorphic nodes: for which the input and output are same Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 16. 17/33 BDD Optimization Rule 3: Eliminate Redundant Nodes: Two consecuting nodes connected with dual edges (0 and 1) can be merged Example: Figure : X2 is redundant of X3 and X3 in left is redundant to 0 Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 17. 18/33 Using BDD in Verification One use we have seen on how BDD can be used to determine SAT assignment Can we use this for formal equivalence checking? Can we check that two circuits with same functionality will have some properties to say that they are equivalent or having same functionality? (we are not so much concerned about structure.) Can the same functionality a circuit may leads to two or more different kind of BDD? Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 18. 19/33 Using BDD in Verification: Variable Ordering Example: Are these two diagram represen the same functionality? Figure : Two BDD with different looks having same functionality How do we ensure they are indeed same? Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 19. 20/33 Using BDD in Verification: Variable Ordering Example: Are these two diagram represen the same functionality? Figure : Two BDD with different looks having same functionality How do we ensure they are indeed same? Ans: can we find out one-to-one mapping among variables such that the traversed path remain similar? Example: a <=> b Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 20. 21/33 Using BDD in Verification: Variable Ordering Do this Example : a.(b + c) Figure : Two differently looking spcifications for above expression Can we use BDD to say that they are same? Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 21. 22/33 OBDD: Ordered Binary Decision Diagram OBDD Therefore, order of the variable can leads to differently looking BDD. Also, we have seen for the same variable order, we may get different BDD! (optimized vs unoptimized) Figure : BDD constructed from a given specification Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 22. 23/33 OBDD: Ordered Binary Decision Diagram OBDD Figure : BDD constructed from a given boolean expression: (X1 + X2).X3 Ordered BDD: Let [x1, ..., xn] be an ordered list of variables without duplicates; A BDD B has an ordering [x1, ..., xn] if 1. all variables of B occur in [x1, ..., xn]; and 2. if xj follows xi on a path in B then j > i An ordered BDD (OBDD) is a BDD which has an ordering for some list of variables. The orderings of two OBBDs B and B’ are compatible if there are no variables x, y such that: x is before y in the ordering for B, and y is before x in the ordering for B’ Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 23. 24/33 OBDD: Ordered Binary Decision Diagram OBDD Figure : BDD constructed from a given boolean expression: (X1 + X2).X3 For the above example, ordering is: X1 < X2 < X3 Theorem: For a given ordering, the ROBDD representing a given function is unique. If B1 and B2 are two ROBDDs with compatible variable orderings representing the same boolean function, then they have identical structure. Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 24. 25/33 Graph Isomorphism, ROBDD and Linear Complexity Canonical representation of boolean function: Theorem For a given variable ordering, two functions are equivalent if and only if graphs’ isomorphic can be tested in linear time. In otherway: graph morphism for ROBDD for the same order can be tested in linear time. (true for canonical representation.) Exercise: Ordered BDD are same as the canonical boolean expression! Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 25. 26/33 OBDD and Size of BDD - We have seen, order of variables do not have any impact on functionality (needs an equivalence checking). - Does the order of variable impacts the size of OBDD and the ROBDD? Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 26. 27/33 OBDD and Size of BDD - We have seen, order of variables do not have any impact on functionality (needs an equivalence checking). - Does the order of variable impacts the size of OBDD and the ROBDD? Example: (a.b + c.d), construct OBDD, and ROBDD for the order a < b < c < d and a < c < b < d Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 27. 28/33 OBDD and Size of BDD - We have seen, order of variables do not have any impact on functionality (needs an equivalence checking). - Does the order of variable impacts the size of OBDD and the ROBDD? Example: (a.b + c.d), construct OBDD, and ROBDD for the order a < b < c < d and a < c < b < d Figure : ROBDDs for two different orders of the same specification/expression Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 28. 29/33 OBDD and Size of BDD One more example for Expression: F(a1, a2, a3, b1, b2, b3) = (a1.b1) + (a2.b2) + (a3.b3) Figure : BDD constructed from a given specification in truth table Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 29. 30/33 BDD: Functionality and Structure Binary Decision Diagram: Figure : BDD Representing functionality Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 30. 31/33 BDD: Multiple Entry nodes Four bit adder Binary Decision Diagram : Verify whether this is functionally adder or something else? Figure : BDD constructed from a given specification in truth table Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 31. 32/33 Usefulness of Canonical Representation Absence of redundant variables: A boolean function f does not depend on an input variable x if no nodes occur for x in the ROBDD for f. Semantic equivalence: Check f ≡ g by checking whether or not the ROBDDs for f and g have identical structure. Validity: Check if the BDD is identical to the one with just the terminal node 1 and nothing else. Satisfiability: Check if the BDD is not identical to the one with just the terminal node 0 and nothing else. Implication. Check if by for all x, f(x) → g(x) by checking whether or not the ROBDD for f . g is constant 0. Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems
  • 32. 33/33 Thank you Formal verification Vs Simulation! Thank You! Binary Decission Diagram (BDD) Jaynaryan T Tudu Testing and Verification of VLSI Systems