ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems - PowerPoint PPT Presentation

About This Presentation
Title:

ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems

Description:

ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Binary Decision Diagrams (BDD) Outline Background Canonical representations BDD s Reduction ... – PowerPoint PPT presentation

Number of Views:249
Avg rating:3.0/5.0
Slides: 24
Provided by: M1156
Learn more at: http://www.ecs.umass.edu
Category:

less

Transcript and Presenter's Notes

Title: ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems


1
ECE 697B (667)Spring 2006Synthesis and
Verificationof Digital Systems
  • Binary Decision Diagrams
  • (BDD)

2
Outline
  • Background
  • Canonical representations
  • BDDs
  • Reduction rules
  • Construction of BDDs
  • Logic manipulation of BDDs
  • Application to verification and SAT
  • Reading
  • read one of the BDD tutorials available on class
    web site
  • Anderson, or
  • Somenzi

3
Common Representations
  • Boolean functions ( f B ? B )
  • Truth table, Karnaugh map
  • SoP, PoS, ESoP
  • Reed-Muller expansions (XOR-based)
  • Decision diagrams (BDD, ZDD, etc.)
  • Each minimal, canonical representation is
    characterized by
  • Decomposition type
  • Shannon, Davio, moment decomposition, Taylor
    exp., etc.
  • Reduction rules
  • Redundant nodes, isomorphic sub-graphs, etc.
  • Composition method (Apply, compose rule)
  • What they represent
  • Boolean functions (f B ? B)
  • Arithmetic functions (f B ? Int )
  • Algebraic expressions (f Int ? Int )

4
Binary Decision Diagrams (BDD)
  • Based on recursive Shannon expansion
  • f x fx x fx
  • Compact data structure for Boolean logic
  • can represents sets of objects (states) encoded
    as Boolean functions
  • Canonical representation
  • reduced ordered BDDs (ROBDD) are canonical
  • essential for verification

5
ROBDDs
  • Directed acyclic graph (DAG)
  • one root node, two terminals 0, 1
  • each node, two children, and a variable
  • Shannon co-factoring tree, except reduced and
    ordered (ROBDD)
  • Reduced
  • any node with two identical children is removed
  • two nodes with isomorphic BDDs are merged
  • Ordered
  • Co-factoring variables (splitting variables)
    always follow the same order along all paths
  • xi1 lt xi2 lt xi3 lt lt xin

6
Example
root node
a
f abacbcd
a
1
cbd
b
c
cbd
b
b
0
cd
d
db
c
c
c
d
b
b
d
0
1
0
1
  • Two different orderings, same function.

7
ROBDD
  • Ordered BDD (OBDD) Input variables are ordered -
    each path from root to sink visits nodes with
    labels (variables) in ascending order.

not ordered
ordered order a,c,b
a
a
c
c
c
b
b
b
c
1
1
0
0
  • Reduced Ordered BDD (ROBDD) - reduction rules
  • if the two children of a node are the same, the
    node is eliminated f vf vf
  • if two nodes have isomorphic graphs, they are
    replaced by one of them
  • These two rules make it so that each node
    represents a distinct logic function.

8
Efficient Implementation of BDDs
  • BDDs is a compressed Shannon co-factoring tree
  • f v fv v fv
  • leafs are constants 0 and 1
  • Three components make ROBDDs canonical (Proof
    Bryant 1986)
  • unique nodes for constant 0 and 1
  • identical order of case splitting variables along
    each paths
  • hash table that ensures
  • (node(fv) node(gv)) Ù (node(fv) node(gv)) Þ
    node(f) node(g)
  • provides recursive argument that node(f) is
    unique when using the unique hash-table

9
Onset is Given by all Paths to 1
F bac abacbac all paths to the 1
node
f
a
0
1
fa cbc
c
1
fa b
b
0
0
1
0
1
  • Notes
  • By tracing paths to the 1 node, we get a cover of
    pair wise disjoint cubes.
  • The power of the BDD representation is that it
    does not explicitly enumerate all paths rather
    it represents paths by a graph whose size is
    measures by its nodes and not paths.
  • A DAG can represent an exponential number of
    paths with a linear number of nodes.
  • BDDs can be used to efficiently represent sets
  • interpret elements of the onset as elements of
    the set
  • f is called the characteristic function of that
    set

10
Implementation
  • Variables are totally ordered If v lt w then v
    occurs higher up in the ROBDD
  • Top variable of a function f is a variable
    associated with its root node.
  • Example f ab abc abc. Order is (a lt b
    lt c).
  • fa b, f?a b

b is top variable of f
f
a
f
b
reduced
b
f does not depend on a, since fa f?a . Each
node is written as a triple f (v,g,h) where g
fv and h f?v . We read this triple
as f if v then g else h ite (v,g,h) vgv
h
0
1
0
1
v is top variable of f
11
BDD Construction
  • Reduced Ordered BDD

12
BDD Reduction Rules -1
  • Eliminate redundant nodes
  • (with both edges pointing to same node)

13
BDD Reduction Rules -2
  • Merge duplicate nodes (isomorphic subgraphs)
  • Nodes must be unique

14
BDD Construction contd
15
APPLY Operator
  • Apply F G, any Boolean operation
  • (AND, OR, XOR, ?)
  • Useful in constructing BDD for arbitrary Boolean
    logic
  • Any logic operation can be expressed using Apply
    (ITE)
  • Efficient algorithms, work directly on BDD graphs

16
Logic Manipulation using BDDs
  • Useful operators
  • Complement F F
  • (switch the terminal nodes)
  • Restrict Fxb F(xb) where b const

17
Useful BDD Operators Apply Operation
  • Basic operator for efficient BDD manipulation
    (structural)
  • Based on recursive Shannon expansion
  • F OP G x (Fx OP Gx) x(Fx OP Gx)
  • where OP OR, AND, XOR, etc

18
Apply Operation (contd)
  • Apply F G
  • where stands for any Boolean operator (AND,
    OR, XOR, ?)

?
  • Any logic operation can be expressed using only
    Restrict and Apply
  • Efficient algorithms, work directly on BDDs

19
Apply Operation - AND
20
Apply Operation - OR
21
Application to Verification
  • Equivalence Checking of combinational circuits
  • Canonicity property of BDDs
  • if F and G are equivalent, their BDDs are
    identical (for the same ordering of variables)

22
Application to SAT
  • Functional test generation
  • SAT, Boolean satisfiability analysis
  • to test for H 1 (0), find a path in the BDD to
    terminal 1 (0)
  • the path, expressed in function variables, gives
    a satisfying solution (test vector)
  • Problem size explosion

23
Efficient Implementation of BDDs
  • Unique Table
  • avoids duplication of existing nodes
  • Hash-Table hash-function(key) value
  • identical to the use of a hash-table in
    AND/INVERTER circuits
  • Computed Table
  • avoids re-computation of existing results

hash value of key
collision chain
hash value of key
No collision chain
Write a Comment
User Comments (0)
About PowerShow.com