ECE 697B 667
Spring 2007
Synthesis and Verification
of Digital Systems
Unate Recursive Paradigm
1
ECE 667 - Synthesis & Verification - Lecture 11
Shannon Expansion
f : Bn → B
Shannon Expansion:
f xi f xi x i f xi
Theorem: F is a cover of f. Then
F% x i Fxi x i Fx i
We say that f (F) is expanded about xi.
xi is called the splitting variable.
ECE 667 - Synthesis & Verification - Lecture 11 2
Shannon Expansion (cont.)
Example F ab ac bc
F% aF aF a(b c bc) a(bc)
a a
ab ac abc abc
ac
bc
ab
c c
b b
a a
Cube bc ist split into two cubes
ECE 667 - Synthesis & Verification - Lecture 11 3
List of Cubes (Cover Matrix)
We often use matrix notation to represent a cover:
Example: F = ac + c’d + bcd’
a b c d ab c d
ac 1 2 1 2 1 - 1 -
c’d 2 2 0 1 or - - 0 1
bcd’ 2 1 1 0 - 1 1 0
• Each row represents a cube
• 1 means that the positive literal appears in the cube
• 0 means that the negative literal appears in the cube
• The 2 (or -) represents that the variable does not appear in the cube.
• Finding factors from matrix representation is easy.
ECE 667 - Synthesis & Verification - Lecture 11 4
Some Special Functions
Definition: A function f : Bn → B is symmetric with respect to
variables xi and xj iff
f(x1,…,xi,…,xj,…,xn) = f(x1,…,xj,…,xi,…,xn)
Definition: A function f : Bn → B is totally symmetric iff any
permutation of the variables in f does not change the function
Symmetry can be exploited in searching the binary decision tree
because: f f xi x j xi x j
- That means we can skip one of four sub-cases
- used in automatic variable ordering for BDDs
ECE 667 - Synthesis & Verification - Lecture 11 5
Unate Functions
Definition: A function f : Bn → B is positive unate in variable xi iff
f xi f xi
This is equivalent to monotone increasing in xi:
f (m − ) ≤ f (m + )
for all minterm pairs (m-, m+) where
m j m j , j i
mi 0
mi 1
For example, m-3=1001, m+3=1011 (where i =3)
ECE 667 - Synthesis & Verification - Lecture 11 6
Unate Functions
Similarly for negative unate
f xi f xi
f (m − ) ≥ f (m + )
monotone decreasing:
A function is unate in xi if it is either positive unate or negative unate in xi.
Definition: A function is unate if it is unate in each variable.
Definition: A cover F is positive unate in xi iff xi ∉ cj for all cubes cj∈F
ECE 667 - Synthesis & Verification - Lecture 11 7
Example - unateness
f ab bc ac f is positive unate in a,b :
mc+ f(ma+) ≥ f(ma-)
f(mb+) ≥ f(mb-)
c
b
on and negative unate in c:
a
off
mc- f(mc-) = 1 ≥ f(mc+) = 0
Minterms associated with c
mc- = (010) = 1
mc+ = (011) = 0
ECE 667 - Synthesis & Verification - Lecture 11 8
The Unate Recursive Paradigm
• Key pruning technique based on exploiting the properties of unate
functions
– based on the fact that unate leaf cases can be solved efficiently
• New case splitting heuristic
– splitting variable is chosen so that the functions at lower nodes
of the recursion tree become unate
ECE 667 - Synthesis & Verification - Lecture 11 9
The Unate Recursive Paradigm
Unate covers F have many extraordinary properties:
– If a cover F is minimal with respect to single-cube
containment, all of its cubes are essential primes.
– In this case F is the unique minimum cube representation of
its logic function.
– A unate cover represents the tautology iff it contains a cube
with no literals (constant 1).
– Positive unate: f = x fx + fx’
– Negative unate: f = fx + x’fx’
This type of implicit enumeration applies to many sub-problems
(prime generation, reduction, complementation, etc.).
ECE 667 - Synthesis & Verification - Lecture 11 10
Unate Recursive Paradigm
• Create cofactoring tree stopping at unate covers
– choose, at each node, the “most binate” variable for splitting
– recurse until no binate variable left (unate leaf)
• “Operate” on the unate cover at each leaf to obtain the result for that
leaf. Return the result
• At each non-leaf node, merge (appropriately) the results of the two
children.
a
b c
merge
• Main idea: Operation on unate leaf is computationally less complex
• Operations: complement, simplify, tautology, generate-primes,...etc.
ECE 667 - Synthesis & Verification - Lecture 11 11
Two Useful Theorems - Tautology
Theorem:
F 1 ( Fx j 1) ( Fx 1)
j
• Checking for tatutology for is simplified for unate functions
– Positive unate (f = x fx + fx’ ) f ≡ 1 ⇒ fx’ = 1
– Negative unate (f = fx + x’fx’) f ≡ 1 ⇒ fx = 1
Theorem: Let A be a unate cover matrix.
Then A≡1 if and only if A has a row of all “-”s.
Proof:
If. A row of all “-”s is the tautology cube.
Only if. Assume no row of all “-”s. Without loss of generality, suppose function is
positive unate. Then each row has at least one “1” in it. Consider the point
(0,0,…,0). This is not contained in any row of A. Hence A≠1.
ECE 667 - Synthesis & Verification - Lecture 11 12
Recursive Tautology – termination rules
ECE 667 - Synthesis & Verification - Lecture 11 13
Recursive Tautology - example
ECE 667 - Synthesis & Verification - Lecture 11 14
Recursive Complement Operation
Theorem: f x f x x f x
g x f x x f x
Proof:
f x f x x f x
f g 0
g f
f g 1
ECE 667 - Synthesis & Verification - Lecture 11 15
COMPLEMENT Operation
Algorithm COMPLEMENT(List_of_Cubes C) {
if(C contains single cube c) {
Cres = complement_cube(c) // generate one cube per
return Cres // literal l in c with ^l
}
else {
xi = SELECT_VARIABLE(C)
C0 = COMPLEMENT(COFACTOR(C,^xi)) Ù ^xi
C1 = COMPLEMENT(COFACTOR(C,xi)) Ù xi
return OR(C0,C1)
}
}
ECE 667 - Synthesis & Verification - Lecture 11 16
Recursive Complement – termination rules
ECE 667 - Synthesis & Verification - Lecture 11 17
Recursive Complement – example (split)
ECE 667 - Synthesis & Verification - Lecture 11 18
Recursive Complement – example (merge)
ECE 667 - Synthesis & Verification - Lecture 11 19
Incompletely Specified Boolean Functions
F = (f, d, r) : Bn → {0, 1, *}
where * represents a don’t care.
• f = onset function - f(x)=1 ↔ F(x)=1
• r = offset function - r(x)=1 ↔ F(x)=0
• d = don’t care function - d(x)=1 ↔ F(x)=*
(f,d,r) forms a partition of Bn, i.e.
• f + d + r = Bn
• fd = fr = dr = ∅ (pairwise disjoint)
ECE 667 - Synthesis & Verification - Lecture 11 20
Incompletely Specified Boolean Functions
A completely specified Boolean function g is a cover for F = (f,d,r) if
f ⊆ g ⊆ f+d
Note:
• gr=∅
• if x∈d , then g(x) = 0 or 1 (don’t care)
r f
• if x∈f , then g(x)=1
• if x∈r , then g(x)=0.
d
Also: r = f’d’ ⊆ g’ ⊆ f’
ECE 667 - Synthesis & Verification - Lecture 11 21
Example: Logic Minimization (single output)
Consider F(a,b,c)=(f,d,r), where f={abc, abc, abc} and d ={abc, abc}, and
the sequence of covers illustrated below:
F1= abc + abc+ abc
Expand abc→ a
on
off F2= a+abc + abc
Don’t care abc is redundant
a is prime
F3= a+abc
Expand abc → bc
F4= a+bc
ECE 667 - Synthesis & Verification - Lecture 11 22
Two-level minimization (multiple-outputs)
Initial representation: xyz f1 f2
f1 f2 0–0 01
011 111 011 111
01– 01
010 010 –11 10
101 101
1–1 10
010 110 010
110
000 100 000 100 Minimized cover:
f1
011 111 f2 011 111
xyz f1 f2
010 010
101 101 0–0 01
z 010 010 011 11
y 110 110
x 1–1 10
000 100 000 100
ECE 667 - Synthesis & Verification - Lecture 11 23