Design of Efficient 4×4 Quaternary Vedic Multiplier Using Current-Mode Multi-Valued Logic
Multi-Valued Logic
description
Transcript of Multi-Valued Logic
![Page 1: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/1.jpg)
1
Multi-Valued LogicMulti-Valued LogicUp to now…Up to now…two-valuedtwo-valued synthesis synthesis
– Binary variables take only values {0, 1}Binary variables take only values {0, 1}Multi-Valued synthesisMulti-Valued synthesis
– Multi-valued variable XMulti-valued variable Xii can take on can take on values values PPi i = {0,…,|P= {0,…,|Pii|-1} (integers - but |-1} (integers - but no ordering implied)no ordering implied)
– Symbolic variables take values from Symbolic variables take values from symbolic set, e.g. state: {ssymbolic set, e.g. state: {s00,s,s11,…,s,…,snn} or } or X: {a,b,c}.X: {a,b,c}.
![Page 2: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/2.jpg)
2
Multi-Valued LogicMulti-Valued Logic• Formally: Formally:
(sometimes called an (sometimes called an mv-functionmv-function).).• ProblemProblem: :
find the minimum (SOP) form for an find the minimum (SOP) form for an incompletely-specified function of incompletely-specified function of this kindthis kind
• Big News:Big News:Nothing (Nothing (muchmuch) changes) changes
,*}1,0{: 1 nPPF
![Page 3: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/3.jpg)
3
Example “Truth Table”Example “Truth Table”• PP11={0,1,2}, P={0,1,2}, P22={0,1} ={0,1}
• Here “2” means the value 2 and not {0,1}Here “2” means the value 2 and not {0,1}f(0,0) = 1f(0,0) = 1 f(2,1) = 1f(2,1) = 1f(1,0) = 0f(1,0) = 0 f(2,0) = *f(2,0) = * unspecifiedunspecified
(don’t cares) (don’t cares)
1 2X X0 0 10 1 11 0 01 1 12 02 1 1
![Page 4: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/4.jpg)
4
MV FunctionMV Function
offoffonon
Don’t Don’t carecare
3X
1X
2X
![Page 5: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/5.jpg)
5
TerminologyTerminology• Vertex:Vertex:
• Cube:Cube:
• Containment:Containment:
• Implicant:Implicant:
1A point of the space nP P
1A set , n i ic c c c P
( , cubes) iff ,When c is a vertex, , also say
i ic d c d c d id c c d
0c, F(v)vc all for that such Cube
![Page 6: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/6.jpg)
6
TerminologyTerminology• Onset minterm:Onset minterm:
• Prime Implicant:Prime Implicant:
• Cover of Cover of F F ::
1Vertex such that 1. If then each has exactly one member.
n
i
v f(v) v (c , ,c )c
cddc
that such implicant no is there that such Implicant
A set of implicants which togethercontain every onset minterm of f
![Page 7: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/7.jpg)
7
TerminologyTerminology• Prime Cover of Prime Cover of F F ::
• Distance of cubes Distance of cubes c,d c,d ::
• Supercube of Supercube of c,d c,d ::
Note:Note: All these definitions are exactly as they All these definitions are exactly as they were in the binary case.were in the binary case.
n
iii dcdc
1
,
prime is elements whoseof each cover,A
1 1, n nc d c d c d
![Page 8: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/8.jpg)
8
Notation-MV LiteralsNotation-MV LiteralsDefinitionDefinition - A multi-valued - A multi-valued literalliteral is a is a binary logic function of the formbinary logic function of the form
wherewhere
X ici
)()( 1 kiici XXX i
iij Pc
DefinitionDefinition - A - A cubecube can can be written as the product of MV-literals:be written as the product of MV-literals:
ncccc 21
ncn
cc XXX 2121
![Page 9: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/9.jpg)
9
Notation-MV LiteralsNotation-MV Literals• If cIf cii=P=Pii we may omit from the we may omit from the
expression (since =1)expression (since =1)iP
iXiP
iX
• Note analogy to two-valued case:Note analogy to two-valued case:
• Actually, multi-valued notation is superior Actually, multi-valued notation is superior to old (to old (binarybinary).).
{0}
{1}
{0,1} 1
ii
i i
i
X XX X
X
![Page 10: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/10.jpg)
10
ExampleExampleCan form rows marked Can form rows marked a a
(b)(b) as a single mv-cube as a single mv-cube implicantimplicant
ba112a02
b111001
ba110a100
XX 21
0 21
12
Cube {0,2}×{0,1}
Cube {0,1,2}×{1}
{ , }
{ }
a X
b X
FXXX }{},{}{ of implicant an is implicants prime are b and a Both
01
102
01
The following are cube covers of The following are cube covers of FF. . FF22 is a prime cover is a prime cover1 0 0
1 2 1 2
1 0,22 2 1
{ } { } { }
{ } { }
F X X XF X X
![Page 11: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/11.jpg)
11
Positional NotationPositional NotationExample:Example: cube cube
PP11={A,B,C,D}, P={A,B,C,D}, P22={R,S} (Symbolic) ={R,S} (Symbolic) {R}B}{A XX 2
,1
A B C D R SA B C D R SCube:Cube:1 1 0 0 1 01 1 0 0 1 0
• A cube does not depend on variable A cube does not depend on variable XXii if it has all if it has all 1’s in the set of columns associated with 1’s in the set of columns associated with XXii . .
• Each of the columns of a variable is called a Each of the columns of a variable is called a partpart of of that variable. There is one that variable. There is one partpart for each value a for each value a variable can take.variable can take.
• Extension of Extension of EspressoEspresso notation notation
![Page 12: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/12.jpg)
12
Positional NotationPositional Notation
(value=0) (value=1)(value=0) (value=1) 0 1 0 1 11 1 0 1 0 00 1 1 1 1 22
Extension of Extension of EspressoEspresso notation notation
Example:Example: XX1 1 XX2 2 XX33cc11 11110 00001 11111 11110 00001 11111 cc22 01100 00011 01010 01100 00011 01010 cc33 01010 00100 11111 01010 00100 11111 cc44 00110 01001 11010 00110 01001 11010 cc55 00001 11111 10110 00001 11111 10110
![Page 13: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/13.jpg)
13
Positional NotationPositional Notation
X1 X2 X3
cc11 11110 00001 1111111110 00001 11111cc22 01100 00011 0101001100 00011 01010cc33 01010 00100 1111101010 00100 11111 cc44 00110 01001 1101000110 01001 11010 cc55 00001 11111 1011000001 11111 10110
3X
1X
2X
5 Cubes1 2 3 4 5
![Page 14: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/14.jpg)
14
Minimization Problem for Minimization Problem for Multi-Valued LogicMulti-Valued Logic
Given: Given: a cover a cover FF of of and a cover and a cover DD of the don’t- of the don’t-care set d, care set d,
Find: Find: A minimum sum-of-products form for A minimum sum-of-products form for
Same problem as for two-valuedSame problem as for two-valued• Generate primes of (f+d)Generate primes of (f+d)• Generate covering tableGenerate covering table• Solve the covering table Solve the covering table (unate covering problem)(unate covering problem)
Same algorithms as for two-valuedSame algorithms as for two-valued (except for small (except for small details).details).
![Page 15: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/15.jpg)
15
Applications of Multi-Valued Applications of Multi-Valued LogicLogic
Theorem (Hong):Theorem (Hong): minimizing a two-valued (n input) minimizing a two-valued (n input) (m output)(m output) logic function logic function g g is equivalent to minimizing a is equivalent to minimizing a single binary-single binary-outputoutput MV-logic function: MV-logic function:
ff : {0,1} : {0,1} {0,1} {0,1} ... ... {0,…,m-1} {0,…,m-1} {0,1} {0,1}
Proof( sketch):Proof( sketch): Let g = {fLet g = {f00,…,f,…,fm-1m-1} be the multiple output function. Consider } be the multiple output function. Consider the the characteristiccharacteristic function f of the multiple output function, function f of the multiple output function, (defined on (n+1) variables with the last one, (defined on (n+1) variables with the last one, yy, being multi-, being multi-valued on {0,1,…,m-1} ) valued on {0,1,…,m-1} ) ::
1
0
( , ) 1 ( ) ( )m
ii
f x y y i f x
![Page 16: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/16.jpg)
16
Applications of Multi-Valued Applications of Multi-Valued LogicLogic
Note:Note: an implicant of g an implicant of g (the multi-output (the multi-output function)function) is a cube c in the is a cube c in the xx-space where each -space where each output is turned output is turned onon only if f only if fii(c)=1. Any output (c)=1. Any output not turned on means not turned on means no information no information (not (not offset),offset), since the each output is the OR of all of since the each output is the OR of all of its input cubes.its input cubes.
XX ff1 1 ff2 2 ff3 3 ff4 4 ff5 5 ff66
x-cube 0 1 0 1 1 0x-cube 0 1 0 1 1 0
gg
![Page 17: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/17.jpg)
17
Other Applications: Other Applications: Encoding ProblemsEncoding Problems
Other Applications:Other Applications:• Input Encoding problemInput Encoding problem
– bit-grouped PLA structurebit-grouped PLA structure• Output encoding problem?Output encoding problem?
– output phase optimization?output phase optimization?• State encoding problemState encoding problem
– Minimize symbolically to get constraints on a posssible Minimize symbolically to get constraints on a posssible binary encodingbinary encoding
– solve constraints to derive binary codesolve constraints to derive binary code– Re-minimize binary problemRe-minimize binary problem– Implement in binaryImplement in binary
![Page 18: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/18.jpg)
18
Multi-Valued Minimization Multi-Valued Minimization ExampleExample
1 2 3 1 2 3 1
1 2 3 1 2
2 3 1 2
3 1
3
1 2 3 1 2 3 1
2
0
1 3 1 2
1
3
3
2
2 3 2
X X X X X X X
X X X X X X X X X X X X
X X X X X X X X X X X
X X X X Xg
X
f
f
f
}1,0{}1,0{}2,1,0{}1,0{}1,0{}1,0{:
4321
: PPPPff
0 0 0 1 0 0 1 11 2 3 4 1 2 3 4
0 1 1 0 0 0 21 2 3 4
0 0 1 2 0 1
0 0 0 0 0 1 0 0 0 1 1 01 2 3 4 1 2 3
1
4 1 2 3 4
1 1 1 01 2 3 4
1 0
0 2 1 1 21 2 3 4
1 1
1 2 3 4 1 2
1 2 3 4 1 2 3 4
3 4
X X X X X X X XX X X X X X X X XX X X X X X X
X X X X X X X X X X X XX X X X
X XX X X
f
X XX
![Page 19: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/19.jpg)
19
Prime and irredundant SOP of f:Prime and irredundant SOP of f:
(five cubes 1+2+3+4+5)(five cubes 1+2+3+4+5)Equivalent to:Equivalent to:
Example - after minimizationExample - after minimization
14
13
02
}1,0{1
}2,1{4
}1,0{3
02
01
}2,0{4
03
}1,0{2
01
}2,0{4
13
12
11
}1,0{4
13
12
01
XXXXXXXXXXXX
XXXXXXXXf
31213212
32213211
313213210
432
541
321
XXXXXXXf
XXXXXXXf
XXXXXXXXf
![Page 20: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/20.jpg)
20
Example - after minimizationExample - after minimization
NoteNote: is not a prime of f: is not a prime of f00, but is a , but is a prime of f. Similarly for .prime of f. Similarly for .
321 XXX }2,0{4321 XXXX
321 XXX
ff00 f f11 f f22
![Page 21: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/21.jpg)
21
Shannon CofactorShannon Cofactor
Note:Note: this agrees with “standard” cofactor in the case of two- this agrees with “standard” cofactor in the case of two-valuedvaluedHintHint: check cases on d: check cases on dii, c, cii, e.g. if d, e.g. if dii=c=cii=1 (i.e. x=1 (i.e. xii in d and c) , then (c in d and c) , then (cdd))i i
== cci i ddi i = 2 = {0,1}= 2 = {0,1}Rationale:Rationale: Only Only carecare about value of c on subspace given by about value of c on subspace given by
dd. . ( d is don’t care)( d is don’t care)
Cofactor of cubeCofactor of cube cc with respect to cubewith respect to cube dd (c(cdd))
Note:Note:
otherwise if
nnd dcdc
dcc
11
\i i id P d
![Page 22: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/22.jpg)
22
Shannon Cofactor - ExampleShannon Cofactor - Example
Example:Example: space is {0,1} space is {0,1} {0,1,2} {0,1,2}
01
}2,1,0{2
01
}2,0{2
01 2
2}1,0{
1XXXXX XX
Cofactor of cover with respect to cube Cofactor of cover with respect to cube dd is ismccF 1
1 md d dF c c
Note:Note: Cofactor of a cover with respect to Cofactor of a cover with respect to another cover is not defined.another cover is not defined.
![Page 23: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/23.jpg)
23
Shannon Cofactor-ExampleShannon Cofactor-Example
}1{
3}1{
2}2,1{
1}1{
3}0{
2}1,0{
1
}1{3
}1{2
}2{1
}0{3
}0{2
}0{1
}1{3
}0{2
}0{1
XXXXXXXXXXXXXXXf dd
F = (f,r) and F = (f,r) and cubecube d = X d = X11{0,2}{0,2}
Consider the generalized cofactor: Consider the generalized cofactor: Co(F,d) = (fd,Co(F,d) = (fd,d, rd)d, rd)
Note:Note: We keep all the onset We keep all the onset (not in(not indd ) ) and project the care and project the care onset fd toonset fd tod. Also, as in the binary case, butd. Also, as in the binary case, butdf fØ
FF
Co(F,d)Co(F,d) ffdd
dd
ddf df
![Page 24: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/24.jpg)
24
Shannon Cofactor Expansion Shannon Cofactor Expansion Theorem (General Case)Theorem (General Case)
Theorem:Theorem: Let f be any function and {c Let f be any function and {c11, …, c, …, ctt}} any set any set of cubes which of cubes which partitionpartition the input space: the input space:
jicc
c
ji
t
i
i
for
and 11
ThenThen
t
ic
iifcf
1
![Page 25: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/25.jpg)
25
We immediately have:We immediately have:
Shannon Cofactor Expansion Shannon Cofactor Expansion Theorem (General Case)Theorem (General Case)
1 iff 1 for every , and icf f i
i.e. most Shannon cofactor results continue to i.e. most Shannon cofactor results continue to hold. However, hold. However, notenote , but , but
1
( )i
ti
ci
f c f
ccf f cc
c f c f
![Page 26: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/26.jpg)
26
Recursive Paradigm: Recursive Paradigm: Multi-Valued VersionMulti-Valued Version
1
1
Tautology( ) if 1 return true; if 0 return false;
Choose ,..., such that
1
for (i 1,...,t) if (
(don't need for
Tautol
this)
ogy( i
t
i j
t ii
c
i j
fff
c cc c
c
f
c c
) false)
return false; return true;
![Page 27: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/27.jpg)
27
Still Open:Still Open:• Unate leaves Unate leaves (what does unateness mean?)(what does unateness mean?)• Splitting choice Splitting choice (i.e. which { c(i.e. which { ci i })})• Unate ReductionUnate Reduction
Recursive Paradigm: MV Recursive Paradigm: MV versionversion
![Page 28: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/28.jpg)
28
Definition 1:Definition 1: f is said to be f is said to be weakly unateweakly unate in X in Xii if if there exists some value there exists some value jj, such that changing X, such that changing Xii from value = j to something else, does not cause from value = j to something else, does not cause f to decrease.f to decrease.
• Analog to unateness in two-valued case set j=0 Analog to unateness in two-valued case set j=0 and get monotone increasing; set j=1 and get and get monotone increasing; set j=1 and get monotone decreasingmonotone decreasing
In general:In general: detecting unateness is hard (obviously) detecting unateness is hard (obviously)Special case:Special case: unate cover unate cover
Unateness: Multi-ValuedUnateness: Multi-Valued
( , , ) ( , , ), i if X j f X k k j
![Page 29: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/29.jpg)
29
Definition 2:Definition 2: A cover F= c A cover F= c1 1 +…+ c+…+ ctt is said to be is said to be weakly unateweakly unate in X in Xii iff there is some iff there is some jj such that, for each such that, for each cube cube cckk, either:, either:
(monotone increasing from (monotone increasing from value j in variable Xvalue j in variable Xii))
Weakly-Unate CoverWeakly-Unate Cover
or
(universal set)
ki
ki i
j c
c P j (Xj (Xii))
cc11 01010 01010cc22 00100 00100. . 0100001000cct-1 t-1 11111 11111 cctt 11111 11111
![Page 30: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/30.jpg)
30
Analogy to two-value:Analogy to two-value:• Rewrite (binary to MV)Rewrite (binary to MV)
ExampleExample
Weakly-Unate CoverWeakly-Unate Cover
}1,0{
}1{
}0{
2 i
ii
ii
XXXXX
112100112100
ii XX
112011011
ii XX
Here j=1 i.e. monotone increasing from Here j=1 i.e. monotone increasing from j=1 (monotone j=1 (monotone decreasingdecreasing in X in Xi i ))
Here j=0 i.e. monotone increasing from Here j=0 i.e. monotone increasing from j=0 (monotone j=0 (monotone increasingincreasing in X in Xi i ))
![Page 31: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/31.jpg)
31
Easy to detect:Easy to detect:
Unate variables are those for whichUnate variables are those for which(Just looking for a column with all 0’s, except for rows of all 1’s)(Just looking for a column with all 0’s, except for rows of all 1’s)
Weakly-Unate CoverWeakly-Unate Cover
k
for each variable
for each cube c
(start with all values)
(if not all va if
\
lues )
(remove any val ue in )
i
i i
ki i
ki i i
i
k
Xv P
c P
v c cv
P
iv
![Page 32: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/32.jpg)
32
1. throw out rows of all 1’s1. throw out rows of all 1’s2. Look for column of all 0’s2. Look for column of all 0’s
Weakly-Unate CoverWeakly-Unate Cover
j (Xj (Xii)) cc11 01010 01010 cc22 00100 00100 .. 01000 01000 cct-1t-1 11111 11111 cctt 11111 11111
![Page 33: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/33.jpg)
33
F is F is weakly-unateweakly-unate in every variable. in every variable.
ExampleExample
}4,3,2,1,0{321
}3,2,0{3
}4,3,2,1,0{2
}4{1
}3,1,0{3
}4,1{2
}3,2{1
}4,3,2,1,0{3
}2{2
}3,1{1
}3,1{3
}4,3{2
}2,1{1
}3,2,1,0{3
}4{2
}4,3,2,1,0{1
PPPXXX
XXXXXXXXXXXXf
}4{},0{ 321 vvv
XX1 1 XX2 2 XX33cc11 11111 00001 11110 11111 00001 11110 cc22 01100 00011 01010 01100 00011 01010 cc33 01010 00100 11111 01010 00100 11111 cc44 00110 01001 11010 00110 01001 11010 cc55 00001 11111 10110 00001 11111 10110
![Page 34: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/34.jpg)
34
Theorem 1:Theorem 1: Let {c Let {c11, …, c, …, ctt} be a cube } be a cube partitionpartition as in Shannon as in Shannon expansion theorem. Then:expansion theorem. Then:
Proof:Proof: follows two-valued case exactly. follows two-valued case exactly.
Application to TautologyApplication to Tautology
1 iff 1 for every kcf f k
1 21 2
,
1
tt
c c c
i j
i
f c f c f c f
c c i j
c
(1)(1)
![Page 35: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/35.jpg)
35
Theorem 2:Theorem 2: Let f be Let f be weakly unateweakly unate in variable x in variable xi i from from value j. Then:value j. Then:
Analogous to for monotone increasing Analogous to for monotone increasing (from 0).(from 0).
Monotone TheoremMonotone Theorem
iXXPkff k
ij
i all for }{}{
xx ff
Proof:Proof:
We first show that is independent of . Let be any cover for . Then is a cover for . Each cube is either or has all 1's in the (When cofactoring bycube
part.
{k}i
{k} {k} {k}i i i
lix
l lx x x
i
f x {c }f {c } f c
x , 0 , 1 all 1's, because we add 1's
to all values \ ).{k} l li ik ik
i
x c cP {k}
(2)(2)
![Page 36: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/36.jpg)
36
Monotone TheoremMonotone Theorem
1
0
Let be an arbitrary point in the space excluding .
Let . Since is weakly unate from ,. By Shannon expansion
so
i
{l}i
i
{j} {k}i i
p{l}i x
l
v x
u x v,w x v f jf(u) f(w)
f x f
{ {
(since is indepen
( ) ( ) ( ) ( )
. Since is an arbitrary
point,
dent
t
of
h
)
en
j} k}i i
{j} {k}i
}
i
{ki
ix
x x
x x
f x
f u f v f w f v
v
f f
![Page 37: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/37.jpg)
37
Theorem 3:Theorem 3: (unate reduction)(unate reduction) f is weakly-unate in X f is weakly-unate in Xii, , and the “unate value” is j. Then f = 1 iff and the “unate value” is j. Then f = 1 iff
Weakly Unate Reduction Weakly Unate Reduction TheoremTheorem
Proof:Proof:
{ }
{
1{ }
0
Write
from (1), 1 iff 1 for every , and hence f 1 implies 1
If 1, then by (2) 1 and hence 1
( )
( ) ,
and so
i
ki
{k} { j }i i
j } {k} { j } {k}i ii i
pk
i Xk
x x
x xx x
f X f
f f k f
f f f f
f 1 by (1).
1{ j }iX
f
![Page 38: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/38.jpg)
38
Note this is exactly two-valued theorem:
1 1 1
except that here we are doing one unate variable at a time.Also note that
011010101
...
i
A XA B
T B
X
F
{0 }
0
0... ... ...11111
0011011111
1111111111
because does not intersect with the first 3 cubes.
i
i
X
{ }i
XF
x
Weakly Unate Reduction Weakly Unate Reduction TheoremTheorem
![Page 39: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/39.jpg)
39
Definition 3:Definition 3: Cover c Cover c1 1 + … + c+ … + ctt is weakly-unate iff it is weakly-unate iff it is weakly-unate in is weakly-unate in allall variables. variables.
Theorem 4 :Theorem 4 : cc11+ …+c+ …+ctt weakly-unate then c weakly-unate then c11+ …+c+ …+ctt =1 iff c=1 iff cjj=1 for =1 for somesome cube j. cube j.
Proof.Proof. Follows from reduction theorem. Follows from reduction theorem.Thus for weakly unate cover, can tell immediately.Thus for weakly unate cover, can tell immediately.
Tautology for Weakly Unate Tautology for Weakly Unate CoverCover
111 means nPPj j
nc c X X
1111110110011
111110101011
111100110101
1100110110011
101110101011
010100110101
Vertex Vertex 1000 0100 01001000 0100 0100 not covered. not covered.
![Page 40: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/40.jpg)
40
Reduction in One StepReduction in One Step
11Form cube where
(i.e.if is "binate")
(unate part o
(Unate reduction. Gets r
f variable
id of cubes with 0 in any of { } par
)
1 iff 1
ts)
nμ μn
i i ii
i i
i
c
c X XP v X
μv X
v
f f
c exactly as in two-valued algorithmc exactly as in two-valued algorithm
c is cube of unate variables, e.g.c is cube of unate variables, e.g.then Athen Acc=0. Hence f=0. Hence fcc=(T B).=(T B).
BTXA
f
0110102122021201
cA
![Page 41: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/41.jpg)
41
Revised TautologyRevised Tautology
1
Tautology( ) while if 1 return true; if 0 return false;
Choose ,.
( is weakly unate in some variables)
(some cube partition of space).., for ( 1 )
c
t
F
F FFF
c ci ,...,t
F
if (Tautology( ) false)
return false; return true;
icf
Left open:Left open: how to split?how to split?i.e. how to choose ci.e. how to choose c11, …, c, …, ctt where c where ci i c cj j = = , and , and ccii =1 =1..
![Page 42: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/42.jpg)
42
““Split by value” Split by value”
– Gets rid of variable XGets rid of variable Xii in a single step. in a single step.
Methods of SplittingMethods of Splitting
}0{iX
}1{iX }2{
iX
}3{iX
![Page 43: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/43.jpg)
43
““Split by parts”Split by parts”q, s partition Pq, s partition Pi i (e.g. q={0,1}, s={2,3}(e.g. q={0,1}, s={2,3}
– May get to unate leaves May get to unate leaves (somewhat)(somewhat) more quickly more quickly– More freedom to choose good partitions -don’t need to More freedom to choose good partitions -don’t need to
entirely eliminate variable Xentirely eliminate variable Xii at a node before splitting on X at a node before splitting on Xkk..In practice, “split by parts” is usedIn practice, “split by parts” is used
Methods of SplittingMethods of Splitting
qiX s
iXq s
ii
q si i XX
f X f X f
![Page 44: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/44.jpg)
44
Cover F = Cover F = 1 1 +…+ +…+ |F||F|
Goal:Goal: get to weakly unate leaves as fast as possible get to weakly unate leaves as fast as possible
Definition 4:Definition 4: ActiveActive value of variable X value of variable Xii::
(Any value (Any value k of k of X Xii with all 1’s in column is with all 1’s in column is notnot activeactive))
Choose variable with most active valuesChoose variable with most active values
(Note: all (Note: all inactiveinactive values can be equivalently grouped values can be equivalently grouped into into oneone value.) value.)
Choice of Splitting VariableChoice of Splitting Variable
{ | ( ) such that }kij k j
![Page 45: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/45.jpg)
45
Tie breaks Tie breaks (|F| is number of cubes)(|F| is number of cubes)– Variables Variables ii maximizing maximizing
(“Smallest” variable = most 0’s in columns)(“Smallest” variable = most 0’s in columns)
– Variables minimizingVariables minimizing
(least “2’s”)(least “2’s”)
Choice of Splitting VariableChoice of Splitting Variable
| | | |
1 1
| \ | | |F F
j ji i i
j j
P
||
1
F
j
jiiP
![Page 46: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/46.jpg)
46
Cover F=cCover F=c11+…+ c+…+ ctt, variable X, variable Xii
• Goal: Like to find Goal: Like to find partitionpartition q, s of P q, s of Pii such that: such that:
is minimized.is minimized.
• Hard problem! Use heuristicHard problem! Use heuristic• ““Fast to compute” more important than quality...Fast to compute” more important than quality...
Choice of PartitionChoice of Partition
| | | |q sii XX
F F
qiX s
iX
F
qiX
F siX
Fs not actives not active q not activeq not active
Heuristic:Heuristic:• m m activeactive values in X values in Xii
• q gets first m/2 active q gets first m/2 active values, s the restvalues, s the rest
This reduces the number This reduces the number of active values on of active values on each side by halfeach side by half
![Page 47: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/47.jpg)
47
Weakly-unate good enough for Weakly-unate good enough for tautologytautology based based algorithms, but…algorithms, but…
• F weakly-unate F weakly-unate F Fcc weakly-unate weakly-unate
ExampleExample: F is weakly unate cover.: F is weakly unate cover.
Strongly Unate FunctionsStrongly Unate Functions
XX1 1 XX2 2 XX3 3 XX3 3
10 11 11 111 10 11 11 111 FF = 11 10 10 100 = 11 10 10 100 11 11 10 010 11 11 10 010
cc = 11 11 10 110 = 11 11 10 110
10 11 11 111 10 11 11 111 FFcc = 11 10 11 101 = 11 10 11 101 11 11 11 011 11 11 11 011
FFcc is not weakly unate in X is not weakly unate in X33. (But in . (But in this example, fthis example, fcc is!) is!)
(However, this also holds for f and (However, this also holds for f and ffcc as well as well
i.e. f can be weakly unatei.e. f can be weakly unate in a variable but fin a variable but fc c may not be).may not be).
![Page 48: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/48.jpg)
48
F weakly-unate F weakly-unate does not implydoes not imply every prime of f essential. every prime of f essential. ExampleExample: f = { p1,p2,p3,p4,p5 }: f = { p1,p2,p3,p4,p5 }
p1,…, p5 are all primes.p1,…, p5 are all primes.– P1 essentialP1 essential– p2 nonessentialp2 nonessential– p3 essentialp3 essential– p4 nonessentialp4 nonessential– p5 essentialp5 essential
Strongly Unate FunctionsStrongly Unate Functions
p1p1 11111 00001 11110 11111 00001 11110 p2p2 01100 00011 01010 01100 00011 01010 p3p3 01010 00100 11111 01010 00100 11111 p4p4 00110 01001 11010 00110 01001 11010 p5p5 00001 11111 10110 00001 11111 10110
Weakly unate in all variablesWeakly unate in all variablesA column of all 1’s indicates A column of all 1’s indicates
a value that is a value that is not activenot active..
5 4 3 2 1Cubes 5
![Page 49: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/49.jpg)
49
f weakly-unate f weakly-unate doesdoes not not implyimply ff weakly-unate. weakly-unate.
All these are primes.All these are primes.
Need stronger condition...Need stronger condition...
Strongly Unate FunctionsStrongly Unate Functions
00110 01000 0010100110 01000 00101 11111 00001 0000111111 00001 00001 00001 11110 0100100001 11110 01001
f f == 01100 00010 1010101100 00010 10101 11000 11000 1111111000 11000 11111 10110 10100 1111110110 10100 11111 10010 10010 1111110010 10010 11111
![Page 50: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/50.jpg)
50
Stongly Unate functionsStongly Unate functions
Definition 5:Definition 5: f is f is strongly-unatestrongly-unate in X in Xii iff there is some iff there is some total order total order << on P on Pii such that, for j<k in P such that, for j<k in Pii
Thus “increasing” XThus “increasing” Xii (from value j to value k, if j<k)(from value j to value k, if j<k) doesn’t decrease f.doesn’t decrease f.
}{}{ ki
ji XX
ff
Example:Example: strongly unate cover strongly unate cover (order is from left to right i.e. (order is from left to right i.e. 1<2<3 on 1<2<3 on allall variables) variables)
Can detect strongly unate cover by the existence of a value Can detect strongly unate cover by the existence of a value order for each Porder for each Pii, where the 0’s are on the left for all cubes., where the 0’s are on the left for all cubes.
111 011 1111111 011 1111f f == 011 001 1111011 001 1111
001 111 0011001 111 0011
![Page 51: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/51.jpg)
51
• f strongly-unate f strongly-unate f weakly-unate f weakly-unate• f strongly-unate f strongly-unate ff strongly-unate strongly-unate• f strongly-unate f strongly-unate f fcc strongly-unate strongly-unate• f strongly-unate f strongly-unate every prime of f essential.. every prime of f essential..
But:But:• Weakly-unate applies to a cover more oftenWeakly-unate applies to a cover more often
– easier to computeeasier to compute– good enough for good enough for tautologytautology based algorithms based algorithms
Strongly unate Strongly unate notnot used in two-level logic used in two-level logic minimization algorithms (so far).minimization algorithms (so far).
Strongly Unate Functions: Strongly Unate Functions: PropositionsPropositions
![Page 52: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/52.jpg)
52
Use basic logic synthesis algorithmUse basic logic synthesis algorithm1.1. Generate all primesGenerate all primes2.2. Form covering tableForm covering table3.3. Solve covering tableSolve covering table
Steps (2)-(3) are same as in binary caseSteps (2)-(3) are same as in binary case
Exact MinimizationExact Minimization
![Page 53: Multi-Valued Logic](https://reader035.fdocuments.us/reader035/viewer/2022062218/56815cca550346895dcad6c7/html5/thumbnails/53.jpg)
53
Use Espresso-IIUse Espresso-II• Irredundant, Reduce, LastgaspIrredundant, Reduce, Lastgasp
(Unchanged because (Unchanged because tautologytautology based) based)• Essential Primes essentially unchangedEssential Primes essentially unchanged
(minor technical differences in expression)(minor technical differences in expression)• ExpandExpand
Minor difference from Espresso-IIMinor difference from Espresso-IICan’t use blocking matrix BCan’t use blocking matrix Bcc when expanding when expanding
cube c.cube c.– May be able to expand cMay be able to expand cii even if column j is in a minimal even if column j is in a minimal
column cover of Bcolumn cover of Bcc. .
Heuristic MinimizationHeuristic Minimization