Professional Documents
Culture Documents
Chittaranjan Mandal
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 1 / 565
Table of Parts I
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 2 / 565
Table of Parts II
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 3 / 565
Part I
VLSI CAD
1 Complexity notations
2 NP complete problems
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 4 / 565
Complexity notations
Section outline
1 Complexity notations
Asymtotic upper bound
Other upper bounds
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 5 / 565
Complexity notations Asymtotic upper bound
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 6 / 565
Complexity notations Asymtotic upper bound
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 6 / 565
Complexity notations Asymtotic upper bound
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 6 / 565
Complexity notations Asymtotic upper bound
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 7 / 565
Complexity notations Asymtotic upper bound
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 7 / 565
Complexity notations Asymtotic upper bound
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 7 / 565
Complexity notations Other upper bounds
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 8 / 565
NP complete problems
Section outline
2 NP complete problems
CNF satisfiability (SAT)
Nondeterministic algorithm
3-SAT and SAT
Polynomial time reducibility
NP completeness
A few reductions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 9 / 565
NP complete problems CNF satisfiability (SAT)
= (x _ y _ u _ v ) ^ (x _ z _ w _ v )
F
This formula is easily satisfied, x = 1 and z = 1 satisfies F
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 10 / 565
NP complete problems Nondeterministic algorithm
Nondeterministic algorithm
In decision problems we aim to decide whether or not a statement is true
A nondeterminstic algorithm for a decision problem has two phases:
1 (nondeterministically) guessing values of decision variables (each
in O (1) time)
2 checking feasibility of the candidate solution
It terminates unsuccessfully iff there exists no set of choices leading to a
feasible solution
If the checking stage of a nondeterministic algorithm is of poly time in
the size of the input, this algorithm is called an NP (nondeterministic
polynomial) algorithm, the problem is said to be in the class NP
A deterministic interpretation of a non-deterministic algorithm can be
made by allowing sufficient (e.g. exponential) parallelism in computation
In optimisation problems we aim to find the solution with the best
possible score according to some scoring scheme can be either
maximization or minimization TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 11 / 565
NP complete problems Nondeterministic algorithm
SAT
/ / n o n d e t e r m i n i s t i c guessing
f o r each d i s t i n c t Boolean v a r i a b l e i n F
f v a l : = choose ( 0 , 1 ) ;
i f val = 0 f
Assign f a l s e t o t h e Boolean v a r i a b l e ;
g else f
Assign t r u e t o t h e Boolean v a r i a b l e ;
g
g
/ / checking
E v a l u a t e F u s i n g t h e guessed t r u t h v a l u e s
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 12 / 565
NP complete problems 3-SAT and SAT
GY
ITU
IAN INST
KH
ARAGPUR
above construction in poly time
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 13 / 565
NP complete problems 3-SAT and SAT
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 14 / 565
NP complete problems Polynomial time reducibility
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
1
that can be programmed into a Turing m/c
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 15 / 565
NP complete problems NP completeness
NP completeness
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 16 / 565
NP complete problems A few reductions
A few reductions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 17 / 565
CAD and VLSI
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 18 / 565
CAD and VLSI Moores Law
Moores Law
GY
ITU
IAN INST
KH
that need to be handled are increasing at an exponential pace (locally,
ARAGPUR
IND
19 5 1
yog, km s kOflm^
not asymptotically)
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 19 / 565
CAD and VLSI Moores Law
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 20 / 565
CAD and VLSI Design flow
HDL
RTL Synthesis
physical design
layout
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 21 / 565
CAD and VLSI Design flow
costs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 22 / 565
CAD and VLSI Design flow
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 23 / 565
CAD and VLSI Books
Books
Algorithms for VLSI Design Automation; Sabih H. Gerez; John Wiley &
Sons, (ISBN) 978-0-471-98489-4
High-level synthesis: introduction to chip and system design; D D Gajski,
N D Dutt, A C-H Wu, S Y-L Lin; Kluwer Academic Publishers, (ISBN)
978-0-7923-9194-4
An introduction to physical design; M. Sarrafzadeh, C.K. Wong;
McGrawHill, (ISBN) 978-0-0705-7194-5
Practical Problems in VLSI Physical Design Automation; Sung Kyu Lim;
Springer, (ISBN) 978-1-4020-6626-9
Logic Synthesis; Srinivas Devadas, Abhijit Ghosh; McGrawHill, (ISBN)
978-0-07016500-7
Chandan Karfa, Dipankar Sarkar, Chittaranjan Mandal, Verification and
Synthesis of Digital Circuits: High-level Synthesis and Equivalence
Checking; C Karfa, D Sarkar, C Mandal; LAMBERT Academic TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
Publishing, (ISBN) 978-3-8383-9813-6
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 24 / 565
VLSI design choices
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 25 / 565
VLSI design choices Design choices
Design choices
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 26 / 565
VLSI design choices Design choices
Design choices
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 26 / 565
VLSI design choices Standard cell based design
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 27 / 565
VLSI design choices Macro cells
Macro cells
Hard macro
Precompiled component that can be instantiated in a
design
Detailed model of component available for simulation
at various levels
Layout-level details may not be supplied to protect IP
Tied to a particular fab, low flexibility
Firm macro
Netlist is supplied
Physical design done at site
More flexibility of layout, less IP protection
Soft macro
RTL design is supplied
Logic design done at site TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 28 / 565
VLSI design choices Macro cells
Macro cells
Hard macro
Precompiled component that can be instantiated in a
design
Detailed model of component available for simulation
at various levels
Layout-level details may not be supplied to protect IP
Tied to a particular fab, low flexibility
Firm macro
Netlist is supplied
Physical design done at site
More flexibility of layout, less IP protection
Soft macro
RTL design is supplied
Logic design done at site TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 28 / 565
VLSI design choices Macro cells
Macro cells
Hard macro
Precompiled component that can be instantiated in a
design
Detailed model of component available for simulation
at various levels
Layout-level details may not be supplied to protect IP
Tied to a particular fab, low flexibility
Firm macro
Netlist is supplied
Physical design done at site
More flexibility of layout, less IP protection
Soft macro
RTL design is supplied
Logic design done at site TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 28 / 565
VLSI design choices Design flow
Design flow
HDL
RTL Synthesis
physical design
layout
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 29 / 565
VLSI design choices Design flow
costs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
Floor planning Routing Output
IND
Placement
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 30 / 565
VLSI design choices Evolution of design abstraction
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 31 / 565
Iterative improvement search
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 32 / 565
Iterative improvement search
Iterative Improvement
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 33 / 565
Iterative improvement search Hill-climbing
Hill-climbing
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 34 / 565
Iterative improvement search Randomized Hill-climbing
Randomized Hill-climbing
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 35 / 565
Iterative improvement search Simulated Annealing
Simulated Annealing
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 36 / 565
Iterative improvement search Genetic Algorithm
Genetic Algorithm
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 37 / 565
Part II
8 Scheduling in HLS
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 39 / 565
RTL v/s HLS Designing using HDLs
GY
ITU
IAN INST
KH
ARAGPUR
IND
behaviour modern HDLs have provision for both
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 40 / 565
RTL v/s HLS Dataflow model
Dataflow model
Dataflow model may be timed or untimed
Given times may be used for simulation
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 41 / 565
RTL v/s HLS Prevelance of RTL
Prevelance of RTL
Before advent of Verilog and VHDL, designer had to work out all
the details
Large part of the design is mechanical formation of data paths,
derivation of controller (just a finite state transducer)
Verilog and VHDL represented a major advance at the time of
introduction
Designer could now create the RTL design
Mechanical steps of data path formation and controller generation
could be done by the tool
Even at RTL design could be at varying levels of details FU
formation may or may not have been done
Accepted practice in design community now
But do we really think in RTL terms?
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 42 / 565
RTL v/s HLS Relevance of HLS
Relevance of HLS
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 43 / 565
RTL v/s HLS Behavioural specification to RTL
GY
ITU
IAN INST
KH
ARAGPUR
u := v7 - v6;
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 44 / 565
RTL v/s HLS Behavioural specification to RTL
Sample datapath
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 45 / 565
RTL v/s HLS Behavioural specification to RTL
Sample controller
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 46 / 565
RTL v/s HLS Behavioural specification to RTL
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 47 / 565
RTL v/s HLS Behavioural specification to RTL
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 48 / 565
RTL v/s HLS RTL v/s HLS
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 49 / 565
How HLS works
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 50 / 565
How HLS works Steps in HLS
Steps in HLS
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 51 / 565
How HLS works Steps in HLS
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 52 / 565
How HLS works Sequencing of HLS steps
Position of some of the steps are obvious the first step and last
step
Other steps have interdependencies
Scheduling requires knowledge of available resources
FU allocation requires knowledge of distribution of operations (in
time)
Storage allocation depends on dataflows across time steps
Interconnect allocation depends on dataflows between datapath
elements depends on scheduling and FU/storage
allocation/binding
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 53 / 565
How HLS works Resolution of dependencies
Resolution of dependencies
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 54 / 565
How HLS works Intermediate representation
Intermediate representation
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 55 / 565
How HLS works Intermediate representation
Example (DFG of do-while block of diffeq example (rather that the while block))
v1 := u * dx; v2 := 3 * x;
v3 := 3 * y; v5 := v1 * v2;
v6 := dx * v3; v7 := u - v5;
u := v7 - v6;
v4 := u * dx; // v4=v1, redundant
y := y + v4;
x := x + dx;
v11 := x < a;
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 56 / 565
How HLS works Intermediate representation
I5
read(p1, dx);
read(p2, x); B1 10
read(p1, y);
v1 := u * dx;
read(p2, u);
v2 := 3 * x;
read(p3, a);
v3 := 3 * y;
v5 := v1 * v2;
C1 v6 := dx * v3;
v7 := u - v5;
x < a ?;
u := v7 - v6;
BBs are in 3-address form; v4 := u * dx;
B2 3 each basic block has a single entry y := y + v4;
point and a single exit point; x := x + dx;
write(p1, x);
write(p1, u);
TECHNO
OF LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
write(p2, y); 19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 57 / 565
Scheduling in HLS
Section outline
8 Scheduling in HLS
Types of scheduling algorithms
Considerations for scheduling for HLS
ASAP scheduling
ALAP scheduling
List scheduling
Simple LP formulation of ASAP scheduling
Complexity of scheduling
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 58 / 565
Scheduling in HLS Types of scheduling algorithms
GY
ITU
IAN INST
KH
ARAGPUR
Simulated annealing based
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 59 / 565
Scheduling in HLS Considerations for scheduling for HLS
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 60 / 565
Scheduling in HLS ASAP scheduling
ASAP scheduling
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 61 / 565
Scheduling in HLS ALAP scheduling
ALAP scheduling
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 62 / 565
Scheduling in HLS List scheduling
List scheduling
Operations that are ready to be scheduled are maintained in a list
hence list scheduling
A record of resources marked as busy or available is maintained
An operation is selected from the list if a resource for it is available
Ties between operations are resolved on the basis of metrics,
such as the freedom and number of successors
Scheduling goes on until all operations in the BB are scheduled
It is not enough to only look at FU resources
Storage requirements are also important, but much harder to
predict
Desirable to schedule operations to reduce storage requirements
also
List scheduling reduces to ASAP schedule, in the absence of TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
resource constraints; it heuristically reduces scheduling time
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 63 / 565
Scheduling in HLS Simple LP formulation of ASAP scheduling
GY
ITU
IAN INST
KH
ARAGPUR
IND
Resource constraints can be handled with more complicated ILP models
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 64 / 565
Scheduling in HLS Complexity of scheduling
Complexity of scheduling
Theorem
The problem of scheduling a set of chains corresponding to two different types of operations in
two FUs (one for each type of operation) given a deadline D is NP-complete.
Corollary
The problem of scheduling a single rooted binary tree of two operation types on two FUs, one of
each type, is NP-complete.
Theorem
Absolute approximation of scheduling DAGs is NP-hard for the problem of minimization of
schedule length.
Theorem
Absolute approximation of scheduling DAGs with multiple operation types, given a deadline, is
NP-hard for the problem of minimization of the number of FUs.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
From: Complexity Analysis and Algorithms for Data Path Synthesis, C Mandal 19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 65 / 565
Force directed scheduling
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 66 / 565
Force directed scheduling Outline of FDS
Outline of FDS
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 67 / 565
Force directed scheduling Outline of FDS
FDS example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 68 / 565
Force directed scheduling Force computation for FDS
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 69 / 565
Force directed scheduling Force computation for FDS
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 70 / 565
Force directed scheduling Example of force computation
Example
Attempt to schedule multiplication (v6 ) preceeding last subtraction
in time step 2
self force in time step 2: (1 + 2 + 2 + 3)
1 1 1
(1 2)
1
= 1:167
self force in time step 3: ( 12 + 3)
1
(0 12 ) = :417
predecessor force in time step 1 (as its preceeding is now
constrained to this time step): (1 + 1 + 12 + 31 ) (1 12 ) = 1:417
predecessor force in time step 2:
(1 + 21 + 12 + 31 ) (0 12 ) = 1:617
Net force: 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 71 / 565
Force directed scheduling FDS for multiple BB designs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 72 / 565
Force directed scheduling FDS for multiple BB designs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 73 / 565
Force directed scheduling FDS for multiple BB designs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 74 / 565
Force directed scheduling FDS for multiple BB designs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 75 / 565
Force directed scheduling FDLS
FDLS
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 76 / 565
Allocation and binding
Section outline
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 77 / 565
Allocation and binding Notion of allocation and binding
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 78 / 565
Allocation and binding Illustration of allocation and binding
o1 ; o3 ) ADD1
o2 ; o4 ) ADD2
a ) r1
b; e; g ) r2
c; f ; h ) r3
d ) r4
ADD1 output ) r2
ADD2 output ) r3
Commutativity of Datapath derived after allocation
operations may be and binding
used to simplify
interconnections Scheduled operations
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 79 / 565
Allocation and binding Formulation of allocation-binding
Formulation of allocation-binding
GY
ITU
Graph colouring is NP-complete, by
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 80 / 565
Allocation and binding Conflict-Compatibility duality
Conflict-Compatibility duality
Conflict graph indicates nodes that cannot be combined
Aim is to form colour classes of vertices; no pair of vertices in a colour class are adjacent
Compatibility graph indicates nodes that can be combined
Aim is to form cliques of vertices; each pair of vertices in a clique are adjacent
One graph can be converted to the other by complementing the set of edges
Algorithm are given for colouring or for clique formation
o1 o2 o1 o2
o3 o4 o3 o4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 81 / 565
Allocation and binding Variable compatibility graph
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 82 / 565
Allocation and binding Register allocation by left edge
Example
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 83 / 565
Allocation and binding A total HLS example
Jaap Hofstede
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 84 / 565
Allocation and binding A total HLS example
#define m1
#define m2
#define m3
#define m4
main()
{ float t, i1, o1, d1=0.0, d2=0.0;
while (1) {
in(i1);
t = i1 + m3*d2 + m1*d1;
o1 = t + m4*d2 + m2*d1;
d2 = d1; d1 = t;
out(o1);
}
}
Specification in C
2 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 85 / 565
Allocation and binding A total HLS example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 86 / 565
Allocation and binding A total HLS example
D1 D2
m1 m3 m2 m4
:=
C4 C3 C6 C5
I1
+ +
C1 C7
+
C2
+
C8
D2 D1 O1
ASAP (4)
4 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 87 / 565
Allocation and binding A total HLS example
D1 D2
m3
C3
m1 I1 m2 m4
+
C4 C1 C6 C5
:= + +
C2 C7
+
C8
D2 D1 O1
ALAP (4)
5 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 88 / 565
Allocation and binding A total HLS example
m3
C3
m1 I1
+
C4 C1
m2
+
C2
C6
m4
:= ??
C5
+
C7
+
C8
1 Adder, 1 multiplier (6)
D2 D1 O1 6 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 89 / 565
Allocation and binding A total HLS example
m3
C3
m1
C4
I1 m2
+
C1
C6
m4
:= +
C2 C5
+
C7
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 90 / 565
Allocation and binding A total HLS example
D1 N2 N1 D2
I1 m2
+
C1
C6
m4
:= +
C2 C5
m3
+
C7
C3
m1
+ 1 Adder, 1 multiplier (4)
C4 C8
loop pipeline
N1 D2 N2 D1 O1 8 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 91 / 565
Allocation and binding A total HLS example
D1 N2 N1 D2
I1 m2
+
C1
C6
V1 V2
m4
:= +
C2 C5
V3 V4 V5
m3
+
C7
C3
V6 V7
m1
+
C4 C8
V8 V9
9 Registers included
N1 D2 N2 D1 O1
9 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 92 / 565
Allocation and binding A total HLS example
1 2 3 4
V1
V2
V3
V4
V5
V6
V7
V8
V9
Lifetimes of registers
10 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 93 / 565
Allocation and binding A total HLS example
3:=
5 1+
4+
8 7+ 2 6
9+
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 94 / 565
Allocation and binding A total HLS example
R4
R1 R2
3
5 1
R5
4
8 7 2 6
R6
9
R3
Clique partitioning
12 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 95 / 565
Allocation and binding A total HLS example
I1I1 R3 m2 R5
R2 R1 m4 R4
R3 R1 m3 R4
R5 R2 m1 R5
Numbers
are time 1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
steps
Corresponding
non-optimised
data path +
Numbers
are time 1,3 4 2 2 2,4 1,3
steps
R2 R6 R5 R4 R1 R3
R2 R5 R4 R1 R3 13
O1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 96 / 565
Allocation and binding A total HLS example
I1
R3 I1 m2 R5
R2 R1 m4 R4
R3 R1 m3 R4
R2 R5 m1 R5
1 2 3 4 1 2 3 4 1 2 3 4 1 2 3 4
Multiplexers
optimised by
commutative +
property
R2 R6 R5 R4 R1 R3
R2 R5 R4 R1 R3 14
O1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 97 / 565
Allocation and binding A total HLS example
I1
R3 I1 m2 R5
R2 R1 m4 R4
m3
R5 m1
M1 M2 M3 M4
Size of
multiplexers
reduced +
R2 R6 R5 R4 R1 R3
R2 R5 R4 R1 R3 15
O1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 98 / 565
Allocation and binding A total HLS example
Controller-1
All six registers have an enable input, ena
Rx.ena
M1 and M4 have 1 control input, s:
Mx.s
M2 and M3 have 2 control inputs, s1 and s0:
Mx.s1 and Mx.s0
Controller has four states:
State1, State2, State3, State4
16 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 99 / 565
Allocation and binding A total HLS example
Controller-2
enable M1 M2 M3 M4
State R1 R2 R3 R4 R5 R6 s s1 s0 s1 s0 s
1 0 1 1 0 0 0 0 0 0 0 0 0
2 1 0 0 1 1 0 1 0 1 0 1 1
3 0 1 1 0 0 0 0 0 1 1 0 1
4 1 0 0 0 0 1 1 1 0 1 1 0
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 100 / 565
Allocation and binding Register-interconnect optimisation
Register-interconnect optimisation
Initially each variable is trivially mapped to a single register
Subsequently, sets of variables are merged to reduce the number
of registers in the design
Each set of variables is a clique in the variable compatibility graph
With the merger of a pair of registers it becomes necessary to
update
the compatibility information of the variables
the interconnection information of the design
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 101 / 565
Allocation and binding Register-interconnect optimisation
Register-interconnect optimisation
Initially each variable is trivially mapped to a single register
Subsequently, sets of variables are merged to reduce the number
of registers in the design
Each set of variables is a clique in the variable compatibility graph
With the merger of a pair of registers it becomes necessary to
update
the compatibility information of the variables
the interconnection information of the design
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 101 / 565
Allocation and binding Register-interconnect optimisation
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 102 / 565
Allocation and binding Algorithm for RIO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 103 / 565
Allocation and binding Algorithm for RIO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 104 / 565
Allocation and binding Algorithm for RIO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 105 / 565
Allocation and binding Illustration of RIO
Illustration of RIO
Example
v3 = v1 + v2 v 12 = v 1
v5 = v3 v4
v6 = v3 + v5 v 7 = v 8=v 5
op = v 4 & v 7
Let the two FUs used for this design be h+, -, &i and h/i
Thus the operations +, - and and are realized on the same FU, while
/ is realized on the other FU
The final assignment is made to op which is an output port
The life times are as follows:
L means that the variable is live TE
OF
TECHNO
LO
GY
ITU
D means that the variable is dead
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 106 / 565
Allocation and binding Illustration of RIO
GY
ITU
IAN INST
KH
merging
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 107 / 565
Allocation and binding Illustration of RIO
Example (contd.)
The merged variable takes the name v1
In the second iteration the following edges are found satisfying the clique
factor for a four member clique: hv5 ; v6 i; hv5 ; v7 i; hv2 ; v3 i; hv2 ; v6 i;
hv2 ; v7 i; hv2 ; v5 i; hv4 ; v5 i:
Among these edges hv2 ; v5 i has the one of the maximum multiplexer
saving and one of the least deletable edge count.
Thus this edge is selected for merging
The merged variable takes the name v2
In the third iteration the following edges are found satisfying the clique
factor for a three member clique: hv1 ; v6 i; hv1 ; v7 i; hv2 ; v6 i; hv2 ; v7 i;
hv4 ; v6 i; hv4 ; v7 i TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 108 / 565
Allocation and binding Illustration of RIO
Example (contd.)
We select edge hv1 ; v6 i which has the one of the maximum multiplexer
saving and one of the least deletable edge count.
The merged variable takes the name v1
Finally the edges hv2 ; v7 i; hv4 ; v7 i and hv8 ; v7 i satisfy the clique factor for
a two member clique
The edge hv2 ; v7 i is selected
The merged variable takes the name v2 .
The final groupings turn out to be hv1 ; v3 ; v6 i; hv2 ; v5 ; v7 i; hv4 i and hv8 i:
For this grouping four multiplexer channels are needed
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 109 / 565
Allocation and binding ILP for resource constrained scheduling
GY
ITU
IAN INST
KH
the finishing time
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 110 / 565
Allocation and binding ILP for resource constrained scheduling
GY
ITU
IAN INST
KH
ARAGPUR
IND
variables
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 111 / 565
Structured architecture synthesis
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 112 / 565
Structured architecture synthesis Why SA?
Why SA?
Interconnect prediction is poor, so go for a datapath framework with
predictable interconnection structure
Sum of component costs may be reduced but the real interconnect cost
of real estate occupied by buses is mostly overlooked
Synthesis technique to synthesis datapath in one-go scope for greater
optimality
FUs are formed as the schedule progresses
Data transfers between A-blocks need to be scheduled using available
buses
Use stochastic optimisation, because too many decisions are involved
In this case genetic algorithm has been used details skipped
Inherit some scheduling decisions, use multiple heuristics for solution
completion and iterate several times
High level architectural parameters taken from user, details of design
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 113 / 565
Structured architecture synthesis A-Block based datapaths
Global Buses
F. U. Local Memory
A-Block
Global Memory
Controller
F. U. Local Memory
A-Block
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 114 / 565
Structured architecture synthesis A-Block details
A-Block details
global
buses
mux1
mux2
in registers
switches
ALU
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
to controller
19 5 1
Hardconnection
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 115 / 565
Structured architecture synthesis Scheduling decision for SA
times of fetching
source operands *
an operation
...
Group of operations
to be scheduled in TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
the same Ablock.
IND
19 5 1
yog, km s kOflm^
Sample schedule
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 117 / 565
Part III
Equivalence checking
15 FSMD model
16 Computation paths
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 119 / 565
Finite state machine model Finite automata
Finite automata
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 120 / 565
Finite state machine model Finite automata
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 121 / 565
Finite state machine model FA illustrated
FA illustrated
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 122 / 565
Finite state machine model FA illustrated
FA illustrated
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 122 / 565
Finite state machine model Non-uniqueness of FA representation
0 0 0 0 0 0 0
0 0
1 1
OE OO OE OO
1 1
Both the m/cs accept the same language of strings over
= f0; 1g
In that sense the two FA are equivalent but not identical
FA optimisation results in another optimised by equivalent FA
Optimiser might have flaws FA equivalence is an important TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
problem
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 123 / 565
Determining equivalence of two finite automata
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 124 / 565
Determining equivalence of two finite automata Notion of equivalence of finite automata
Definition
Two finite automata (FA) over are equivalent if they accept the same
set of strings over .
By corollary, when two FA are not equivalent, with both the FA starting
from the initial state, there must be a string w for which one of the two
FA reaches a final/accepting state, while the other FA does not.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 125 / 565
Determining equivalence of two finite automata Procedure for FA equivalence
Consider two FA M0 = ; S0 ; s00 ; 0 ; F0 and M1 = ; S1 ; s10 ; 1 ; F1
Construct a table with jj + 1 columns; each column is for pairs of
states for the form hp; q i, where p 2 S0 ; q 2 S1 ;
the last columns are associated with symbols in , one each
if a row has hp; q i in the first column, then the tuple hpa ; q a i is
formed so that pa = 0 (p; a) and q a = 1 (q ; a)
a1 ::: ajj
hp; q i hpa1 ; q a1 i : : : hpajj ; q ajj i
:::
for each tuple hp; q i in any of the last jj columns of any row, a
new row with hp; q i in the first column is introduced, if it not
already present
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 126 / 565
Determining equivalence of two finite automata Procedure for FA equivalence
construction of the table is started with the row for s00 ; s01
construction of the table terminates because there are at most
S0 S1 distinct tuples of states (and therefore rows in the table)
construction of the table is prematurely terminated if a tuple
hpa ; q a i is generated such that pa 2 F0 ^ q a 2= F1 or
pa 2= F0 ^ q a 2 F1
if construction terminates abruptly then M0 = M1, otherwise
M0 M1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 127 / 565
Determining equivalence of two finite automata Illustration of FA equivalence
Illustration of FA equivalence
Example
c c
p1 q1 c q4
c
d d d c
c
c
d d
d
p2 p3 q2 q3
c
M0 M1
c d M0 and M1 are not equivalent
hp1; q1i hp1; q1i hp2; q2i as p1 is a final state, while q3
hp2; q2i hp3; q4i hp1; q3i
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
is a non-final state
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 128 / 565
Finite state transducers
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 129 / 565
Finite state transducers Automata and transducers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 130 / 565
Finite state transducers Moore machine
Moore machine
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 131 / 565
Finite state transducers Mealy machine
Mealy machine
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 132 / 565
Finite state transducers Equivalence of m/c classes
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 133 / 565
FSMD model
Section outline
15 FSMD model
Overview
FSMD model
FSMD model for GCD computation
Why use FSMDs
Why FSMD rather than FSM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 134 / 565
FSMD model Overview
Overview
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 135 / 565
FSMD model Overview
Scope of application
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 136 / 565
FSMD model FSMD model
FSMD
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 137 / 565
FSMD model FSMD model
FSMD (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 138 / 565
FSMD model FSMD model
FSMD (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 139 / 565
FSMD model FSMD model
FSMD (contd.)
GY
ITU
outer loop.
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 140 / 565
FSMD model FSMD model for GCD computation
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
end
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 141 / 565
FSMD model FSMD model for GCD computation
else
y1 ( y 1=2;
else if(even(y 2)) then
y 2 ( y 2=2;
else if(y1 > y 2) then
y 1 ( y 1 y 2;
else
y 2 ( y 2 y 1;
end if;
end loop;
res ( res y 1;
yout ( res;
end loop mainloop;
end process main_process;
end behv; TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 142 / 565
FSMD model FSMD model for GCD computation
q04
q06
even(y1)=
!even(y2)=
q05
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
q03
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 143 / 565
FSMD model FSMD model for GCD computation
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 144 / 565
FSMD model FSMD model for GCD computation
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 145 / 565
FSMD model Why FSMD rather than FSM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 146 / 565
FSMD model Why FSMD rather than FSM
Inclusion of data states into the state space leads to the state
explosion
An n-bit datapath results in a number of states of the order 2kn ; a
data path usually has a good number of such registers
The benifit of having a tractable formulation is lost due to state
explosion
Important to keep data states out of state space representation
Even otherwise, FSM modeling may not be suitable for analysing
equivalence
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 147 / 565
FSMD model Why FSMD rather than FSM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 148 / 565
Computation paths
Section outline
16 Computation paths
Notion of paths
Condition of execution of a path
Simple data transformation of a path
Computation of R and r
Illustration of path construction
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 149 / 565
Computation paths Notion of paths
Path from qm to qn
A finite transition sequence.
All intermediate qj are distinct, qn may be equal to
qm .
R Condition of execution of
Logical expression over variables.
If R is satisfied at the beginning of , then is
executed.
r Data transformation over
r = hS ; O i, where
S is transformation of variables
O is the output list along the path .
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 150 / 565
Computation paths Notion of paths
Path from qi to qj
Definition
A (finite) path from qi to qj , where qi ; qj 2 Q, is a finite transition
sequence of states of the form hqi = q1 ! c1 q2 c2 : : : cn 1 qn = qj i such
! !
that 8l ; 1 l n 1; 9cl 2 2S such that f (ql ; cl ) = ql +1 , and qk ,
1 k n 1, are all distinct.
The end state of the path, i.e., qn , may be identical to any state qk ,
i k n 1, along the path.
A path does not cross itself, but may terminate on an intermediate
node.
The condition that needs to be satisfied for making a transition
from qi to qi +1 is ci
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 151 / 565
Computation paths Condition of execution of a path
Definition
Let = hql0 c0 ql1 c1 ql2 : : :
! ! ck
!1 qlk i be a path.
The condition of execution R of the path is a logical expression over
I [ V such that R is satisfied by the (initial) data state at ql0 iff the path
is traversed.
R is the weakest precondition of the path .
Example
The condition of execution R of the path of the FSMD figure is
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 152 / 565
Computation paths Simple data transformation of a path
Definition
It is an ordered tuple hei i of algebraic expressions over the variables in
V and the inputs in I such that the expression ei represents the value
of the variable vi after the execution of the path in terms of the initial
data state (i.e., the values of the variables at the initial control state) of
the path
Example
The data transformation s of the path in the FSMD figure is
hP00; P10=2; 1i, where the order of the variables is y 1 y2 res.
This definition needs to be extened to capture outputs that are
generated to encompass the overall data transformation of a path. TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 153 / 565
Computation paths Computation of R and r
Computation of R and r
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 154 / 565
Computation paths Computation of R and r
Example
q0 ?
After the assignment a a+5
/a a+5
suppose a > 18 is true in q1
What condition must be true in q0 ?
q1 a > 18
That can be computed as
(a + 5) > 18 ) a > 13
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 155 / 565
Computation paths Illustration of path construction
forward substitution
c1 (v )=v ( g1 (v )
[c3 (g2 (v )) ^ c2 (v ); g3 (g2 (v ))] qi +1 [c1 (v ); g1 (v )]
backward substitution
c2 (v )=v ( g2 (v )
[c3 (v ); g3 (v )] qi +2 [c2 (g1 (v )) ^ c1 (v ); g2 (g1 (v ))]
c3 (v )=v ( g3 (v )
GY
ITU
IAN INST
KH
ARAGPUR
g3 (g2 (g1 (v )))]
IND
19 5 1
yog, km s kOflm^
Definition
It is the ordered pair hs ; O i, where s is the simple data
transformation of and the output list
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 157 / 565
Modeling of systems using FSMDs
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 158 / 565
Modeling of systems using FSMDs Computation in an FSMD
Computation in an FSMD
A finite walk from the reset state back to itself without intermediate
occurrences of the reset state.
Computation can be represented as concatenation of paths. Two
computations c1 and c2 are equivalent if Rc1 = Rc2 ^ rc1 = rc2 .
Checking Rc1 = Rc2 ^ rc1 = rc2 could involve the whole of integer
arithmetic which is an undecidable problem (validity problem of
first order logic).
In this work, we use a syntactic approximation normal forms for
expressions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 159 / 565
Modeling of systems using FSMDs Capturing inputs
Capturing inputs
It is assumed that the inputs and the outputs occur through named
ports.
The i th input from port P is a value represented as Pi .
Thus, if some variable v stores an input from port P (for the i th
time along a path), it is equivalent to the assignment v ( Pi .
The variable y 1 in the GCD algorithm of the example is updated
by the 0th input from the port P0. This is shown as y 1 ( P00 in
the corresponding FSMD in the FSMD figure.
Similarly, the variable y2 stores the 0th input from the port P1 and
is shown accordingly as y 2 ( P10 in the FSMD in the FSMD
figure.
In essence, Pi s comprise the input variable set I. TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 160 / 565
Modeling of systems using FSMDs Path equivalence
Correctness problem
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 161 / 565
Modeling of systems using FSMDs Path equivalence
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 162 / 565
FSMD equivalence
Section outline
18 FSMD equivalence
Basic equivalence checking method
Corresponding states
Equivalence of two FSMDs
Illustration of path equivalence
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 163 / 565
FSMD equivalence Basic equivalence checking method
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 164 / 565
FSMD equivalence Corresponding states
Corresponding states
Definition
Let M0 = hQ0 ; q00 ; I ; V0 ; O ; f0 ; h0 i and
M1 = hQ1 ; q10 ; I ; V1 ; O ; f1 ; h1 i be two FSMDs having identical input
and output sets, I and O, respectively, and q0i ; q0k 2 Q0 and
q1j ; q1l 2 Q1 .
The respective reset states q00 ; q10 are corresponding states.
If q0i 2 Q0 and q1j 2 Q1 are corresponding states and there exist
q0k 2 Q0 and q1l 2 Q1 such that, for some path from q0i to q0k in
M0 , there exists a path from q1j to q1l in M1 such that ' ,
then q0k and q1l are corresponding states.
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 165 / 565
FSMD equivalence Equivalence of two FSMDs
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 166 / 565
FSMD equivalence Illustration of path equivalence
Example
(
q10
(
q00 / v1 3*x
( u * dx ( ( v6 u*dx
( 3*dx
(( (
- / v0 u*dx, v1 3*x, 1. v1
( u*dx
1. v0 q11
( 3*x v3 3*y, v6 u*dx,
( 2. v6
( u*dx
2. v1 x x+dx
( x+dx (
/ v0 u*dx
3. v0
( 3*y
3. x q01 v3 3*y
(3*y ( ( q12
(
4. v3
( v0*v1
4. v3 - / v2 v0*v1, v5 dx*v3
( u*dx ( (
/ v2 v0*v1 5. v2
( y+v6
5. v6 y y+v6
( v0*v1 q02 q13
y y+v6
6. y
( u-v2
6. v2
( dx * v3 ( u-v2 ((
7. v4
( dx*v3
7. v5 / v4 u-v2
( y+v6
-/v4
v5 dx*v3 8. v5
( x+dx
8. y
( u -v2
q03 q14
( v4-v5 / x ( x+dx 9. x
( v4 - v5
9. v4
10. u ( v4 -v5 q04
-/u
q15
u ( v4-v5 10. u
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 167 / 565
FSMD equivalence Illustration of path equivalence
Example
The FSMDs M0 and M1 are shown in parts (b) and (c) of the
figure, respectively.
It is clear from the figures that the order of the operations are
changed by the scheduler; for example, the operations
x ( x + dx is moved from the 3rd step to the 9th step.
Also, the scheduler introduces one state in the scheduled
behaviour; specifically, the FSMD M0 has five states whereas the
FSMD M1 has six states.
A new state is inserted in the scheduled behaviour due to
resource constraints.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 168 / 565
FSMD equivalence Illustration of path equivalence
Example
> = (
!(y 1 == y 2) & !even(y1)& !even(y 2)
&!y 1 y 2 y2 y2 y1
q00 q10
=OUT yout ; res =y 1 ( P0 ; y 2 ( P10 , =y 1 ( P0; y 2 ( P1; res ( 1 !(y 1 == y2) &
( y 2==2
!even(y 1)
res ( 1 0
( ) even(y 2)
y 2=res ( res y 1
y2
y1 > y2 =
y 2=res ( res yq1
y1
y 1 ( y1
==
y1 == y2 q11
01
=
!(y 1 == y 2) & even(y 1)
= ( res 2
&even(y 2)
(
even(y 2)
( y 1=2;
res
( =
( == ;
res res !(
2y1 == y 2) y1
y 2 ( y 2=2
( ==
y1 y1 2
y2 y2 2 even(y2)
y2 y2 2
even y 2 = q02
y 1 ( y 1=2
(>y 2y2= y 1
! ( ) q12
!y 1
!even(y 1) = y2
/
!(y1 ==
&!even(y 2) =y 1 ( y1=2
y 2) & even(y 1)
=yout ( res
q04
q06 even(y 1) = = > = (
!(y 1 == y 2) & !even(y 1)& !even(y 2)
!even(y 2)
q05 &y 1 y2 y1 y1 y2
q13
q03 (a) (b)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 169 / 565
FSMD equivalence Illustration of path equivalence
Example
The initial set of cutpoints is fq00 ; q01 ; q02 ; q03 ; q04 ; q05 g.
The algorithm first finds q10 ! q11 as the equivalent path of
q00 ! q01 .
It next takes q01 (y1==y2!) q0e ! q00 and finds
q11 (y1==y2!) q12 ! q1e ! q10 as its equivalent path.
It next considers the path q01 !(y1==y2!) q02 and fails to find its
equivalent path (as this path has been merged with its successor
paths by the scheduler).
So, this path will be extended.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 170 / 565
FSMD equivalence Illustration of path equivalence
Example
The extended paths are q01 !(y1==y2!) q02 even(y1!) q03 and
q01 !(y1==y2!) q02 !even(y1!) q04 .
The algorithm then considers the path
q01 !(y1==y2!) q02 even(y1!) q03 .
This path also needs to be extended and the extended paths are
q01 !(y1==y2!) q02 even(y1!) q03 even(y2!) q01 and
q01 !(y1==y2!) q02 even(y1!) q03 !even(y2!) q01 .
The algorithm finds the paths q11 !(y1==y2) ^ even(y 1) ^ even(y2!) q11
and q11 !(y1==y2) ^ even(y1) ^ !even(y2!) q11 as the respective
equivalent paths.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 171 / 565
FSMD equivalence Illustration of path equivalence
Example
Similarly, the path q01 !(y1==y2!) q02 !even(y1!) q04 is also extended.
The extended paths are q01 !(y1==y2!) q02 !even(y1!) q04 even(y! q
2) 01
! ! !
and q01 !(y1==y2) q02 !even(y1) q04 !even(y2) q05 .
The equivalent path of q01 !(y1==y2!) q02 !even(y1!) q04 even(y2!) q01 is
q11 !(y1==y2) ^ !even(y1) ^ even(y2!) q11 .
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 172 / 565
FSMD equivalence Illustration of path equivalence
Example
The path q01 !(y 1==y2!) q02 !even(y1!) q04 !even(y2!) q05 will again be
extended and the extended paths are q01 !(y1==y2!) q02 !even(y1!) q04
!even(y2!) q05 y1>y2
! q01 and
q01 !(y1==y2!) q02 !even(y1!) q04 !even(y2!) q05 !(y1>y2!) q01 .
The paths q11 !(y1==y2) ^ !even(y1) ^ !even(y2) ^ (y1>y2!) q11 and
q11 !(y1==y2) ^ !even(y1) ^ !even(y2) ^ !(y1>y2!) q11 are found as the
respective equivalent paths by the algorithm.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 173 / 565
Equivalence of arithmetic expressions
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 174 / 565
Equivalence of arithmetic expressions Normalization of arithmetic expressions
Example
x y > 0 can be reduced to x y 1 >= 0.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 175 / 565
Equivalence of arithmetic expressions Normalization of arithmetic expressions
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 176 / 565
Equivalence of arithmetic expressions Grammar of normalized sum
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 177 / 565
Equivalence of arithmetic expressions Grammar of normalized sum
Example of normalisation
Example
The expression
(x + 3y + 7 0 ^ 4x 2 + 3yz + 2 6= 0 ^ x " y 0)
[1 x + 3 y + 7 0] ^
[4 x x + 3 y z + 2 6= 0] ^
[(1 x + 0) " (1 y + 0) + 0 0]
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 178 / 565
Equivalence of arithmetic expressions Simplifications
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 179 / 565
Equivalence of arithmetic expressions Simplifications
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 180 / 565
Equivalence of arithmetic expressions Simplifications
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 181 / 565
Equivalence of arithmetic expressions Simplifications
Example
The literal a b has multiple occurrences in the formula
a b ^ c d ^ a b. So, this formula is simplified to
a b ^ c d.
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 182 / 565
Equivalence of arithmetic expressions Simplifications
R2 !
= 6=
= c1 = c2 c2 c1 c1 6= c2 c2 c1
R1 c2 c1 c2 > c1
# 6= c1 = c2
c2 < c1 c2 c1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 183 / 565
Equivalence of arithmetic expressions Simplifications
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 184 / 565
Equivalence of arithmetic expressions Simplifications
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 185 / 565
Part IV
20 Boolean Functions
24 Containment checking
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
FSM
FSM Synthesis
Logic
Physical design
Layout
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 187 / 565
Boolean Functions
Section outline
20 Boolean Functions
Laws of BA and functions
Literals, formulae, cubes
SOP expressions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 188 / 565
Boolean Functions Laws of BA and functions
The structure: h0; 1; +; i, where + OR, AND and subject to the
following:
Commutative, distributive in both operations
Identity elements: 0 for +, 1 for
= 1, a a = 0
Complement: a + a
Associativity: a + (b + c ) = (a + b) + c a(bc ) = (ab)c
Idempotence: a + a = a, a a = a
Absorption: a + ab = a, a (a + b) = a
b,
De Morgan: a + b = a a b = a + b
Involution: a = a
The operator is usually implicit
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 189 / 565
Boolean Functions Laws of BA and functions
Boolean functions
f (x ) : B n ! B, where
B = f0; 1g ; x = (x1 ; x2 ; : : : ; xn )
x1 ; x2 ; : : : are variables
x1 ; x1 ; x2 ; x2 ; : : : are literals
each vertex of B n is mapped to 0 or 1
the ON-set of f is fx jf (x ) = 1g = f 1 = f 1 (1)
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 190 / 565
Boolean Functions Literals, formulae, cubes
Literals
Example
f (x ) = x1
The literal f (x ) = x1 in B 2 x2
x1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 191 / 565
Boolean Functions Literals, formulae, cubes
Literals
Example
f (x ) = x2
x1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 191 / 565
Boolean Functions Literals, formulae, cubes
Boolean formulae
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 192 / 565
Boolean Functions Literals, formulae, cubes
Cubes
Cubes are conjunction of literals
Example
x2
The cube C = x2 in B3
x2 = 0, independent of: x1 ; x3
x3
x1
Let C be a cube
If C f , then C is an implicant of f
If C B n and C has k literals, then jC j has 2n k vertices
If k = n, then the cube is a minterm
Canonical SOP: each product term / cube is a minterm;
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 193 / 565
Boolean Functions Literals, formulae, cubes
Cubes
Cubes are conjunction of literals
Example
x2
The cube C = x2 x3 in B3
x2 = 0; x3 = 1, independent of: x1
x3
x1
Let C be a cube
If C f , then C is an implicant of f
If C B n and C has k literals, then jC j has 2n k vertices
If k = n, then the cube is a minterm
Canonical SOP: each product term / cube is a minterm;
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 193 / 565
Boolean Functions Literals, formulae, cubes
Cubes
Cubes are conjunction of literals
Example
x2
The cube C = x1 x2 x3 in B3
x1 = 0; x2 = 0; x3 = 1
x3
x1
Let C be a cube
If C f , then C is an implicant of f
If C B n and C has k literals, then jC j has 2n k vertices
If k = n, then the cube is a minterm
Canonical SOP: each product term / cube is a minterm;
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 193 / 565
Boolean Functions Literals, formulae, cubes
Cubes
Cubes are conjunction of literals
Example
x2
The cube C = x1 x2 x3 in B3
x1 = 0; x2 = 0; x3 = 1
x3
x1
Let C be a cube
If C f , then C is an implicant of f
If C B n and C has k literals, then jC j has 2n k vertices
If k = n, then the cube is a minterm
Canonical SOP: each product term / cube is a minterm;
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 193 / 565
Boolean Functions Literals, formulae, cubes
Cubes
Cubes are conjunction of literals
Example
x2
The cube C = x2 in B3
x2 = 0, independent of: x1 ; x3
x3
x1
Let C be a cube
If C f , then C is an implicant of f
If C B n and C has k literals, then jC j has 2n k vertices
If k = n, then the cube is a minterm
Canonical SOP: each product term / cube is a minterm;
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 193 / 565
Boolean Functions Literals, formulae, cubes
Cubes
Cubes are conjunction of literals
Example
x2
The cube C = x2 in B3
x2 = 0, independent of: x1 ; x3
x3
x1
Let C be a cube
If C f , then C is an implicant of f
If C B n and C has k literals, then jC j has 2n k vertices
If k = n, then the cube is a minterm
Canonical SOP: each product term / cube is a minterm;
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 193 / 565
Boolean Functions SOP expressions
Example
x2
x1 x3
f (x ) = x1 x2 x3 + x1 x2 x3 + x1 x2 x3 + x1 x2 x3 x1 x2
= x2 x3 + x1 x2 + x1 x3 x2 x3 x1
x3
TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 194 / 565
Boolean Functions SOP expressions
Example
x1 x2 x3 x1 x2 x3
x2 x3 0 0 x2 x3 2 0 0
or
x1 x2 1 0 x1 x2 1 0 2
x1 x3 1 1 x1 x3 1 2 1
GY
ITU
IAN INST
KH
ARAGPUR
IND
(always true)
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 195 / 565
Methods for 2-L logic minimisation
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 196 / 565
Methods for 2-L logic minimisation Quine-McCluskeys technique
QM algorithm
Problem: Given a Boolean function f (may be incomplete), find a
minimum cost (number of literals) SOP formula.
Q-M Procedure:
1 Read in the minterms of f , fmi g or the given SOP
representation of f
2 Generate all the PIs of f , Pj
3 Build the Boolean matrix or Boolean constraint matrix
(BCM) B for covering, where Bij is 1 if mi 2 Pj and is 0
otherwise
4 Solve the minimum column covering problem for B find a TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
To be seen later
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 198 / 565
Methods for 2-L logic minimisation Quine-McCluskeys technique
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 199 / 565
Methods for 2-L logic minimisation Boolean matrix for covering
Essential column
Only column covering a minterm essential columns must be present in the TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
cover
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 200 / 565
Methods for 2-L logic minimisation Boolean matrix for covering
Row dominance
Row ri (for minterm mi ) dominates row rj (for minterm mj ) if all the prime
that cover mi also cover mj (i.e. rj has all the 1-entries present in ri ).
Whenever a prime implicant Pi is chosen to cover the minterm mi ; the
minterm of rj is also covered.
Dominated rows can be dropped from the table.
Example
(2,6,10,14) (6,7,14,15) (8,10,12,14) (12,13,14,15)
2 X
6 X X
8 X
10 X X
12 X X
13 X
14 X X X X TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
15 X X
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 201 / 565
Methods for 2-L logic minimisation Boolean matrix for covering
Column dominance
Example
(2,6,10,14) (6,7,14,15) (8,10,12,14) (12,13,14,15)
2 X
8 X
13 X
15 X X
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 202 / 565
Methods for 2-L logic minimisation Boolean matrix for covering
Cyclic core
Example
P1 P2 P3 P4 P5 P6
3 X X
5 X X
7 X X
9 X X
11 X X
13 X X
No scope for further reduction by dropping a essential column,
dominated row or dominated column.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 203 / 565
Methods for 2-L logic minimisation Solving the cyclic core by Petricks method
Petricks method
Example
For the cyclic core shown earlier, the required Boolean equation is:
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 204 / 565
Methods for 2-L logic minimisation Solving the cyclic core by Petricks method
Example
The two products, p1 p4 p5 and p2 p3 p6 , describe two minimal solutions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 205 / 565
Methods for 2-L logic minimisation Solving the cyclic core by Petricks method
Example
The two products, p1 p4 p5 and p2 p3 p6 , describe two minimal solutions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 205 / 565
Methods for 2-L logic minimisation Solving the cyclic core by Petricks method
Independent rows
Two rows in a BMC are independent if the sets of columns (prime
implicants) covering them are disjoint.
Example
A BMC whose columns are rearranged with independent rows first.
1111
111111 0
1111
A C
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 206 / 565
Methods for 2-L logic minimisation Solving the cyclic core by Petricks method
Theorem
The number of prime implicants in the cover of the BMC is at least as
large the number of independent rows in it.
Proof.
Let I = fI1 ; I2 ; : : : ; Ik g be the independent set of rows in B
Let Ci be the set of columns covering the row corresponding to Ii
Ci \ Cj = , if i 6= j
Hence, each of these rows must be covered by a distinct column,
leading to a minimum of jI j cubes for the cover
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 207 / 565
Methods for 2-L logic minimisation Solving the cyclic core exactly
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 208 / 565
Methods for 2-L logic minimisation Solving the cyclic core exactly
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 209 / 565
Methods for 2-L logic minimisation Solving the cyclic core heuristically
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
problem.
yog, km
s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 210 / 565
Methods for 2-L logic minimisation Performance of the heuristic (Optional)
Result
Given sets S1 ; S2 ; : : : ; Sn to cover the elements in X = [ni=1 Si = fx1 ; : : : ; xm g,
X
l
jJgreedy j H (r ) jJopt j; where H (l ) = 1=i and H (r ) = H ( max jSj j)
j =1;:::;n
i =1
Fact
ln(d + 1) H (d ) 1 + ln(d )
Reference
Chapter 2: The set covering problem in Lecture Notes on Approximation
Algorithms for Network Problems, J Cheriyan and R Ravi at
http://www.math.uwaterloo.ca/jcheriya/lecnotes.html TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 211 / 565
Methods for 2-L logic minimisation Performance of the heuristic (Optional)
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 212 / 565
Methods for 2-L logic minimisation Performance of the heuristic (Optional)
P
2 = jJgreedy j; noting that when Si is chosen in iteration i,
x X
8x 2 Si \ Ui ; wgt(x ) = jSi \1Ui j
Pn
Now consider the LP relaxation of the ILP: minimise j =1 sj , st
As 1m and sj 0; 8j 2 f1; : : : ; ng
Pm
j =1 yj , st yA 1
Also, consider the dual problem: maximise n
and yj 0; 8j 2 f1; : : : ; mg
wgt(xi )
yi = H (r ) is a feasible solution to the dual problem, as
P 1 P
2 yi = H (r ) xi 2S wgt(xi ) H (r ) H (r ) = 1
1
xi S
Pm 1 Pm jJgreedy j
j = 1 yj = H (r ) j =1 wgt(xj ) = H (r ) Jopt; as fy1; : : : ; ym g is
solution to the dual problem of the LP relaxation of the original IP
Thus, jJgreedy j H (r )Jopt TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 213 / 565
Methods for 2-L logic minimisation Logic minimisation using cube covers
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 214 / 565
Methods for 2-L logic minimisation Logic minimisation using cube covers
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 214 / 565
Methods for 2-L logic minimisation Logic minimisation using cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 215 / 565
Methods for 2-L logic minimisation Logic minimisation using cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 215 / 565
Methods for 2-L logic minimisation Logic minimisation using cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 215 / 565
Methods for 2-L logic minimisation Logic minimisation using cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 215 / 565
Working with cube covers
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 216 / 565
Working with cube covers Prime and irredundant cubes
GY
ITU
All essential primes have to be present in an irredundant cover
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 217 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
We need to obtain a suitable cube cover H, prefereably a compact one
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 218 / 565
Working with cube covers Operations on cube covers
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 219 / 565
Working with cube covers Operations on cube covers
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 220 / 565
Working with cube covers Operations on cube covers
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 221 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
}
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 222 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
}
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 222 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
}
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 222 / 565
Working with cube covers Operations on cube covers
Example
Computing c d, where c = h i and d = h 11i
1 clearly, c \ d =
6
2 Q and q c (= h i)
3 nothing to do for the first two variables
4 p h 0 i, Q Q [ p, q3 1, q h 1 i
5 p h 10i, Q Q [ p, q4 1, q h 11i
6 Q = fh 0 i;h 10ig
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 223 / 565
Working with cube covers Operations on cube covers
Example
Computing c d, where c = h i and d = h 11i
1 clearly, c \ d =
6
2 Q and q c (= h i)
3 nothing to do for the first two variables
4 p h 0 i, Q Q [ p, q3 1, q h 1 i
5 p h 10i, Q Q [ p, q4 1, q h 11i
6 Q = fh 0 i;h 10ig
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 223 / 565
Working with cube covers Operations on cube covers
Example
Computing c d, where c = h i and d = h 11i
1 clearly, c \ d =
6
2 Q and q c (= h i)
3 nothing to do for the first two variables
4 p h 0 i, Q Q [ p, q3 1, q h 1 i
5 p h 10i, Q Q [ p, q4 1, q h 11i
6 Q = fh 0 i;h 10ig
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 223 / 565
Working with cube covers Operations on cube covers
Exercise
Compute fh 0 i;h 10ig fh 001ig
Answer: fh 10 i ; h 000i ; h 10ig TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 224 / 565
Working with cube covers Operations on cube covers
Exercise
Compute fh 0 i;h 10ig fh 001ig
Answer: fh 10 i ; h 000i ; h 10ig TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 224 / 565
Working with cube covers Operations on cube covers
Exercise
Compute fh 0 i;h 10ig fh 001ig
Answer: fh 10 i ; h 000i ; h 10ig TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 224 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 225 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 225 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 225 / 565
Working with cube covers Operations on cube covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 225 / 565
Working with cube covers Operations on cube covers
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 226 / 565
Working with cube covers Operations on cube covers
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 226 / 565
Working with cofactors
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 227 / 565
Working with cofactors Definition of cofactors
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 228 / 565
Working with cofactors Definition of cofactors
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 228 / 565
Working with cofactors Definition of cofactors
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 228 / 565
Working with cofactors Definition of cofactors
Why cofactors?
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 229 / 565
Working with cofactors Shannon expansion
Shannon expansion
Shannon expansion of f around splitting variable x
f = xfx + x fx
Proof.
Consider a minterm m in the canonical SOP of f . It will have either
x or x in it as a literal
Partition the minterms of f into two sets (functions): f1 with all
minterms having x and f0 with all minterms having x , so that
f = f1 + f0
If m has x, then xm = m, x m 0, mx 0
If m has x , then x m = m, xm 0, mx 0
So xf0 0; x f1 0; f1 = xf1 = xf = xfx ; f0 = x f0 = x f = x fx
Hence, f = f1 + f0 = xfx + x fx TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 230 / 565
Working with cofactors Shannon expansion
Shannon expansion
Shannon expansion of f around splitting variable x
f = xfx + x fx
Proof.
Consider a minterm m in the canonical SOP of f . It will have either
x or x in it as a literal
Partition the minterms of f into two sets (functions): f1 with all
minterms having x and f0 with all minterms having x , so that
f = f1 + f0
If m has x, then xm = m, x m 0, mx 0
If m has x , then x m = m, xm 0, mx 0
So xf0 0; x f1 0; f1 = xf1 = xf = xfx ; f0 = x f0 = x f = x fx
Hence, f = f1 + f0 = xfx + x fx TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 230 / 565
Working with cofactors Shannon expansion
Shannon expansion
Shannon expansion of f around splitting variable x
f = xfx + x fx
Proof.
Consider a minterm m in the canonical SOP of f . It will have either
x or x in it as a literal
Partition the minterms of f into two sets (functions): f1 with all
minterms having x and f0 with all minterms having x , so that
f = f1 + f0
If m has x, then xm = m, x m 0, mx 0
If m has x , then x m = m, xm 0, mx 0
So xf0 0; x f1 0; f1 = xf1 = xf = xfx ; f0 = x f0 = x f = x fx
Hence, f = f1 + f0 = xfx + x fx TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 230 / 565
Working with cofactors Shannon expansion
Shannon expansion
Shannon expansion of f around splitting variable x
f = xfx + x fx
Proof.
Consider a minterm m in the canonical SOP of f . It will have either
x or x in it as a literal
Partition the minterms of f into two sets (functions): f1 with all
minterms having x and f0 with all minterms having x , so that
f = f1 + f0
If m has x, then xm = m, x m 0, mx 0
If m has x , then x m = m, xm 0, mx 0
So xf0 0; x f1 0; f1 = xf1 = xf = xfx ; f0 = x f0 = x f = x fx
Hence, f = f1 + f0 = xfx + x fx TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 230 / 565
Working with cofactors Shannon expansion
Shannon expansion
Shannon expansion of f around splitting variable x
f = xfx + x fx
Proof.
Consider a minterm m in the canonical SOP of f . It will have either
x or x in it as a literal
Partition the minterms of f into two sets (functions): f1 with all
minterms having x and f0 with all minterms having x , so that
f = f1 + f0
If m has x, then xm = m, x m 0, mx 0
If m has x , then x m = m, xm 0, mx 0
So xf0 0; x f1 0; f1 = xf1 = xf = xfx ; f0 = x f0 = x f = x fx
Hence, f = f1 + f0 = xfx + x fx TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 230 / 565
Working with cofactors Shannon expansion
Shannon expansion
Shannon expansion of f around splitting variable x
f = xfx + x fx
Proof.
Consider a minterm m in the canonical SOP of f . It will have either
x or x in it as a literal
Partition the minterms of f into two sets (functions): f1 with all
minterms having x and f0 with all minterms having x , so that
f = f1 + f0
If m has x, then xm = m, x m 0, mx 0
If m has x , then x m = m, xm 0, mx 0
So xf0 0; x f1 0; f1 = xf1 = xf = xfx ; f0 = x f0 = x f = x fx
Hence, f = f1 + f0 = xfx + x fx TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 230 / 565
Working with cofactors Shannon expansion
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 231 / 565
Working with cofactors Cofactor of a cube
Cofactor of a cube
The cofactor Cxj of a cube C with respect to a literal xj is Cxj =1 and is
obtained as:
C if xj and xj do not appear in C
C n xj if xj appears positively in C, i.e. as xj 2C
if xj appears negatively in C, i.e. xj 2C
Example
Let C = x2 x3
x2
Cx1 = C (x1 and x1 do not appear in C)
Cx2 = (x2 appears as x2 in C)
x3
Cx3 = x2 (x3 appears positively in C) x1
GY
ITU
IAN INST
KH
ARAGPUR
relaxing the cube with respect to l, if it was earlier restricted by l
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 232 / 565
Working with cofactors Cofactor of a cube
Cofactor of a cube
The cofactor Cxj of a cube C with respect to a literal xj is Cxj =1 and is
obtained as:
C if xj and xj do not appear in C
C n xj if xj appears positively in C, i.e. as xj 2C
if xj appears negatively in C, i.e. xj 2C
Example
Let C = x2 x3
x2
Cx1 = C (x1 and x1 do not appear in C)
Cx2 = (x2 appears as x2 in C)
x3
Cx3 = x2 (x3 appears positively in C) x1
GY
ITU
IAN INST
KH
ARAGPUR
relaxing the cube with respect to l, if it was earlier restricted by l
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 232 / 565
Working with cofactors Cofactor of a cube
Cofactor of a cube
The cofactor Cxj of a cube C with respect to a literal xj is Cxj =1 and is
obtained as:
C if xj and xj do not appear in C
C n xj if xj appears positively in C, i.e. as xj 2C
if xj appears negatively in C, i.e. xj 2C
Example
Let C = x2 x3
x2
Cx1 = C (x1 and x1 do not appear in C)
Cx2 = (x2 appears as x2 in C)
x3
Cx3 = x2 (x3 appears positively in C) x1
GY
ITU
IAN INST
KH
ARAGPUR
relaxing the cube with respect to l, if it was earlier restricted by l
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 232 / 565
Working with cofactors Cofactor wrt a cube
Example
Let C = x2 x3 and c = x1 x2
C1 = Cx1 = x2 x3
C2 = C1 x2 = x3
Cc = C2 = x3
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 233 / 565
Working with cofactors Cofactor of a cover
Cofactor of a cover
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 234 / 565
Working with cofactors Cofactor of a cover
Example
+ cd Fb = ac + cd
F = abc + bd
Cubes which have b are dropped, b is dropped from cubes which have
b and other cubes are brought in unaltered
Fc and fc
If F = fc1 ; c2 ; : : : ; ck g is a cover of f , then Fc = f(c1 )c ; (c2 )c ; : : : ; (ck )c g
is a cover of fc TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 235 / 565
Working with cofactors Cofactor from a cover matrix
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 236 / 565
Working with cofactors Cofactor from a cover matrix
Example
Let cube c = x1 x4 and let a Boolean function f (x1 ; x2 ; x3 ; x4 ) have a
cover F = x1 x2 x3 + x2 x4 + x1 x3 x4
x1 x2 x3 x4 x1 x2 x3 x4
x1 x2 x3
F = x2 x4
0
0
1
0
1
Fx1 = xx2 xx3
0
1
0
1
2 4
x3 x4 1 1 x3 x4 1 1
x1 x2 x3 x4
x2 x3
Fc = Fx x =
1 4
x2
0
1
0
x3 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 237 / 565
Working with cofactors Cofactor from a cover matrix
Example
Let cube c = x1 x4 and let a Boolean function f (x1 ; x2 ; x3 ; x4 ) have a
cover F = x1 x2 x3 + x2 x4 + x1 x3 x4
x1 x2 x3 x4 x1 x2 x3 x4
x1 x2 x3
F = x2 x4
0
0
1
0
1
Fx1 = xx2 xx3
0
1
0
1
2 4
x3 x4 1 1 x3 x4 1 1
x1 x2 x3 x4
x2 x3
Fc = Fx x =
1 4
x2
0
1
0
x3 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 237 / 565
Working with cofactors Cofactor from a cover matrix
Example
Let cube c = x1 x4 and let a Boolean function f (x1 ; x2 ; x3 ; x4 ) have a
cover F = x1 x2 x3 + x2 x4 + x1 x3 x4
x1 x2 x3 x4 x1 x2 x3 x4
x1 x2 x3
F = x2 x4
0
0
1
0
1
Fx1 = xx2 xx3
0
1
0
1
2 4
x3 x4 1 1 x3 x4 1 1
x1 x2 x3 x4
x2 x3
Fc = Fx x =
1 4
x2
0
1
0
x3 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 237 / 565
Working with cofactors Property of cofactors: xf = xfx
Theorem
xf = xfx
Proof.
Consider any product p of the SOP f and the following cases
x occurs in p p occurs in xf ; pn fx g occurs in fx ; p occurs in xfx
x occurs in p xp = 0, so p does not occur in xf ; also p gets dropped
in fx and so does not influence xfx
Neither occurs in p xp occurs in xf ; p occurs in fx and so xp occurs
in xfx
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 238 / 565
Working with cofactors Property of cofactors: xf = xfx
xf x = xf
Let C = li1 li2 : : : lin 1 lin
:::
= li1 li2 : : : lin 1 lin f
= Cf TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 239 / 565
Containment checking
Section outline
24 Containment checking
Motivating example
Contaiment check via tautology checking
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 240 / 565
Containment checking Motivating example
Example
If C = x1 x4 x6 , fC is obtained by restricting f to the subspace where
x1 = x6 = 1 and x4 = 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 241 / 565
Containment checking Motivating example
Example
If C = x1 x4 x6 , fC is obtained by restricting f to the subspace where
x1 = x6 = 1 and x4 = 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 241 / 565
Containment checking Motivating example
Example
If C = x1 x4 x6 , fC is obtained by restricting f to the subspace where
x1 = x6 = 1 and x4 = 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 241 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 242 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 242 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 242 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 242 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 242 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 242 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 243 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 243 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 243 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 243 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 243 / 565
Containment checking Motivating example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 243 / 565
Containment checking Motivating example
Cofactor of F wrt to a C, C *F
Example
Observation
Apparently, FC 1 if and only if C F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 244 / 565
Containment checking Motivating example
Cofactor of F wrt to a C, C *F
Example
Observation
Apparently, FC 1 if and only if C F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 244 / 565
Containment checking Motivating example
Cofactor of F wrt to a C, C *F
Example
Observation
Apparently, FC 1 if and only if C F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 244 / 565
Containment checking Motivating example
Cofactor of F wrt to a C, C *F
Example
Observation
Apparently, FC 1 if and only if C F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 244 / 565
Containment checking Contaiment check via tautology checking
Valuation of fC at minterms in mC
Theorem
Let f be a Boolean function; C, a cube; m, a minterm and C 0 = mC
then (8 minterms m0 )(m0 2 C 0 ) fC (m0 ) = fC (m)).
Proof.
= C ; C 0 = and the claim is vacuously true
if m 2
n o
Let C = li1 li2 : : : lin 1 lin and let J = j : lij 2C
By definition, fC = f (li1 = 1; : : : ; lij = 1; : : : ; lijJ j = 1); lij 2J
Now, fC is independent of xij where xij = supp(lij ) j 2J
Now, m 2 C 0
8m0 2 C 0, mi = mi0, if mi 2= supp(C )
Hence, (8m0 )(m0 2 C 0 ) fC (m0 ) = fC (m))
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 245 / 565
Containment checking Contaiment check via tautology checking
C f , fC 1
Observation
Note that xfx = xf and fx is independent of x
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 246 / 565
Containment checking Contaiment check via tautology checking
C f , fC 1
Observation
Note that xfx = xf and fx is independent of x
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 246 / 565
Containment checking Contaiment check via tautology checking
C f , fC 1
Observation
Note that xfx = xf and fx is independent of x
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 246 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 247 / 565
Containment checking Contaiment check via tautology checking
Importance of theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 248 / 565
Containment checking Contaiment check via tautology checking
Importance of theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 248 / 565
Containment checking Contaiment check via tautology checking
Importance of theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 248 / 565
Containment checking Contaiment check via tautology checking
Importance of theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 248 / 565
Containment checking Contaiment check via tautology checking
Importance of theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 248 / 565
Incompletely specified functions
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 249 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Representation of ISF
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 250 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Primes of ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 251 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Incompletely specified functions Containment checking in ISF
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 252 / 565
Complexity of tautology checking
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 253 / 565
Complexity of tautology checking Complement of a decision problem
co-NP problems
Example
Primality Is a given integer prime?
Compositeness Is a given integer compsite?
A given integer is prime if and only if it is not composite
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 254 / 565
Complexity of tautology checking Complement of a decision problem
co-NP problems
Example
Primality Is a given integer prime?
Compositeness Is a given integer compsite?
A given integer is prime if and only if it is not composite
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 254 / 565
Complexity of tautology checking Complement of a decision problem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 255 / 565
Complexity of tautology checking Counterexamples
Example (Tautology)
A tautology is a propositional formula that is true under any
possible valuation of its propositional variables
Checking if f is true for all combinations of inputs is difficult
Counterexample, will indicate that f is not true for a combination of
inputs
Easy to verify counter example answer to CNF
Example (Primality)
Checking if p has a factor is difficult
Counterexample, will indicate that p has a factor
Easy to verify counter example answer to compositeness TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 256 / 565
Complexity of tautology checking co-NP problems
co-NP problems
co-NP problem
A problem X is a member of co-NP if and only if its complement X is in
complexity class NP.
NP problem
A problem X is a member of NP if a solution to an instance of that
problem can be easily (in polytime) checked.
Such a positive solution is called a certificate for the problem instance.
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 257 / 565
Complexity of tautology checking co-NP problems
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 258 / 565
Complexity of tautology checking co-NP problems
Theorem
F 1 , (Fx 1) ^ (Fx 1)
j j
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 259 / 565
Complexity of tautology checking co-NP problems
Theorem
F 1 , (Fx 1) ^ (Fx 1)
j j
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 259 / 565
Recursive divide and conquer approach
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 260 / 565
Recursive divide and conquer approach Binary recursion tree
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 261 / 565
Recursive divide and conquer approach Binary recursion tree
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 261 / 565
Recursive divide and conquer approach Binary recursion tree
x1
0
1
x2
0
1
x3 (v )
0
1
v
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 262 / 565
Recursive divide and conquer approach Binary recursion tree
x1
0
1
x2
0
1
x3 (v )
0
1
v
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 262 / 565
Recursive divide and conquer approach Binary recursion tree
x1
0
1
x2
0
1
x3 (v )
0
1
v
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 262 / 565
Recursive divide and conquer approach Binary recursion tree
Example
f (x1 ; x2 ; x3 ) = x1 fx1 + x1 fx1
x1
0
1
(fx1 = 1) 1 fx1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 263 / 565
Recursive divide and conquer approach Binary recursion tree
Example
f (x1 ; x2 ; x3 ) = x1 1 + x1 (x2 fx1 x2 + x2 fx1 x2 )
x1
0
1
(fx1 = 1) 1 x2
0
1
fx1 x2 1 (fx1 x2 = 1)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 263 / 565
Recursive divide and conquer approach Binary recursion tree
Example
f (x1 ; x2 ; x3 ) = x1 1 + x1 (x2 (x3 fx1 x2 x3 + x3 fx1 x2 x3 ) + x2 1)
x1
0
1
(fx1 = 1) 1 x2
0
1
x3 1 (fx1 x2 = 1)
0
1
(fx1 x2 x3 = 1) 1 0 (fx1 x2 x3 = 0)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 263 / 565
Recursive divide and conquer approach Binary recursion tree
Example
f (x1 ; x2 ; x3 ) = x1 1 + x1 (x2 (x3 1 + x3 0) + x2 1)
x1
0
1
(fx1 = 1) 1 x2
0
1
x3 1 (fx1 x2 = 1)
0
1
(fx1 x2 x3 = 1) 1 0 (fx1 x2 x3 = 0)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 263 / 565
Recursive divide and conquer approach Binary recursion tree
Example
f (x1 ; x2 ; x3 ) = x1 + x1 x2 x3 + x1 x2
x1
0
1
(fx1 = 1) 1 x2
0
1
x3 1 (fx1 x2 = 1)
0
1
(fx1 x2 x3 = 1) 1 0 (fx1 x2 x3 = 0)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 263 / 565
Recursive divide and conquer approach Early termination
Example
x1
0
1
1 x2
0
1
x3 1
0
1
1 1
Any Binary Recursion Tree (by Shannon expansion) where all the leaf
nodes are 1 represents a tautology
Expansion for tautology checking can stop when any cofactor 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 264 / 565
Recursive divide and conquer approach Early termination
Example
x1
0
1
1 x2
0
1
x3 1
0
1
1 1
Any Binary Recursion Tree (by Shannon expansion) where all the leaf
nodes are 1 represents a tautology
Expansion for tautology checking can stop when any cofactor 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 264 / 565
Recursive divide and conquer approach Early termination
Example
x1
0
1
1 x2
0
1
x3 1
0
1
1 1
Any Binary Recursion Tree (by Shannon expansion) where all the leaf
nodes are 1 represents a tautology
Expansion for tautology checking can stop when any cofactor 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 264 / 565
Recursive divide and conquer approach Early termination
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 265 / 565
Recursive divide and conquer approach Early termination
Example
Now consider construction of the binary recursion tree, where the
splitting variable is a at the topmost level and b for fa and c for fa
a
0
1
b c
0 0
1 1
1 0 1 0
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 266 / 565
Recursive divide and conquer approach Early termination
Example
Now consider construction of the binary recursion tree, where the
splitting variable is a at the topmost level and b for fa and c for fa
a
0
1
b c
0 0
1 1
1 0 1 0
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 266 / 565
Recursive divide and conquer approach Early termination
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 267 / 565
Recursive divide and conquer approach Early termination
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 267 / 565
Recursive divide and conquer approach Early termination
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 267 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
cofactor can be predicted, non-trivially
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 268 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Recursive divide and conquer approach Implicit enumeration
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 269 / 565
Part V
28 Unate functions
30 Complemenation
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 270 / 565
Unate functions
Section outline
28 Unate functions
Monotone functions
Containment property for monotonicity
Positive/negative unate functions
Test for unateness
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 271 / 565
Unate functions Monotone functions
Monotone functions
Monotonicity
A logic function f is monotone increasing (decreasing) in a variable xj if
a 0 ! 1 change in xj causes f to either remain constant or make a
0 ! 1 (1 ! 0) change.
Monotonic increasing
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Monotonic decreasing
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 272 / 565
Unate functions Monotone functions
Monotone functions
Monotonicity
A logic function f is monotone increasing (decreasing) in a variable xj if
a 0 ! 1 change in xj causes f to either remain constant or make a
0 ! 1 (1 ! 0) change.
Monotonic increasing
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Monotonic decreasing
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 272 / 565
Unate functions Monotone functions
Monotone functions
Monotonicity
A logic function f is monotone increasing (decreasing) in a variable xj if
a 0 ! 1 change in xj causes f to either remain constant or make a
0 ! 1 (1 ! 0) change.
Monotonic increasing
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Monotonic decreasing
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 272 / 565
Unate functions Monotone functions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 273 / 565
Unate functions Monotone functions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 273 / 565
Unate functions Monotone functions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 273 / 565
Unate functions Monotone functions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 273 / 565
Unate functions Monotone functions
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 274 / 565
Unate functions Containment property for monotonicity
Theorem on monotonicity
Theorem
f is monotonic increasing in xi iff fxi fx i
Proof (Necessity).
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Consider any pair of hmi ; mi+ i
if f (mi+ ) = 0 then f (mi ) = 0 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 0
if f (mi ) = 1 then f (mi+ ) = 1 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 1
Thus, fxi fx i
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 275 / 565
Unate functions Containment property for monotonicity
Theorem on monotonicity
Theorem
f is monotonic increasing in xi iff fxi fx i
Proof (Necessity).
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Consider any pair of hmi ; mi+ i
if f (mi+ ) = 0 then f (mi ) = 0 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 0
if f (mi ) = 1 then f (mi+ ) = 1 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 1
Thus, fxi fx i
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 275 / 565
Unate functions Containment property for monotonicity
Theorem on monotonicity
Theorem
f is monotonic increasing in xi iff fxi fx i
Proof (Necessity).
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Consider any pair of hmi ; mi+ i
if f (mi+ ) = 0 then f (mi ) = 0 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 0
if f (mi ) = 1 then f (mi+ ) = 1 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 1
Thus, fxi fx i
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 275 / 565
Unate functions Containment property for monotonicity
Theorem on monotonicity
Theorem
f is monotonic increasing in xi iff fxi fx i
Proof (Necessity).
f (mi ) f (mi+ ) (for all pairs of mi and mi+ )
Consider any pair of hmi ; mi+ i
if f (mi+ ) = 0 then f (mi ) = 0 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 0
if f (mi ) = 1 then f (mi+ ) = 1 [monotonicity]
Thus, fxi (mi ) = fxi (mi+ ) = 1
Thus, fxi fx i
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 275 / 565
Unate functions Containment property for monotonicity
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 276 / 565
Unate functions Containment property for monotonicity
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 276 / 565
Unate functions Positive/negative unate functions
Unate functions
Unate in xj
A function is unate in xj if it is either monotone increasing (positive
unate) or it is monotone decreasing (negative unate) in xj
Unate function
A function is unate if it is unate in all its variables
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 277 / 565
Unate functions Positive/negative unate functions
Example
Let mi = 1001; mi+ = 1011 (for i=3)
For a positive unate function f , valid valuations are:
f (mi ) = 0; f (mi+ ) = 0
f (mi ) = 0; f (mi+ ) = 1
f (mi ) = 1; f (mi+ ) = 1
For a negative unate function f , valid valuations are:
f (mi ) = 0; f (mi+ ) = 0
f (mi ) = 1; f (mi+ ) = 0
f (mi ) = 1; f (mi+ ) = 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 278 / 565
Unate functions Positive/negative unate functions
Example
Let mi = 1001; mi+ = 1011 (for i=3)
For a positive unate function f , valid valuations are:
f (mi ) = 0; f (mi+ ) = 0
f (mi ) = 0; f (mi+ ) = 1
f (mi ) = 1; f (mi+ ) = 1
For a negative unate function f , valid valuations are:
f (mi ) = 0; f (mi+ ) = 0
f (mi ) = 1; f (mi+ ) = 0
f (mi ) = 1; f (mi+ ) = 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 278 / 565
Unate functions Positive/negative unate functions
Example
Let mi = 1001; mi+ = 1011 (for i=3)
For a positive unate function f , valid valuations are:
f (mi ) = 0; f (mi+ ) = 0
f (mi ) = 0; f (mi+ ) = 1
f (mi ) = 1; f (mi+ ) = 1
For a negative unate function f , valid valuations are:
f (mi ) = 0; f (mi+ ) = 0
f (mi ) = 1; f (mi+ ) = 0
f (mi ) = 1; f (mi+ ) = 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 278 / 565
Unate functions Test for unateness
Example
f = x1 x2 + x2 x3
x2
Positive unate in x1
x2 x3
Negative unate in x2 x1 x2
Positive unate in x1 x3
x1
Thus f is a unate function
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 279 / 565
Unate functions Test for unateness
Example
f = x1 x2 + x2 x3
x2
Positive unate in x1
x2 x3
Negative unate in x2 x1 x2
Positive unate in x1 x3
x1
Thus f is a unate function
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 279 / 565
Unate functions Test for unateness
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 280 / 565
Unate functions Test for unateness
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 280 / 565
Unate functions Test for unateness
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 280 / 565
Unate functions Test for unateness
Example
We now perform a Shannon decomposition of F = x1 x2 x3 + x2
around x2
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 281 / 565
Unate functions Test for unateness
Example
We now perform a Shannon decomposition of F = x1 x2 x3 + x2
around x2
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 281 / 565
Tautology checking assisted by unateness
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 282 / 565
Tautology checking assisted by unateness Tautology check for unate covers
Proof.
Necessity: Without loss of generality, let F be positive unate in
x1 ; : : : ; xj (with entries 1 or ) and negative unate in xj +1 ; : : : ; xk (with
entries 0 or ).
Cube x1 : : : xj xj +1 : : : xk must be covered for F to be a tautology. That
is possible only with the row of all dont care entries. TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
Sufficiency: Trivial
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 283 / 565
Tautology checking assisted by unateness Tautology check for unate covers
Proof.
Necessity: Without loss of generality, let F be positive unate in
x1 ; : : : ; xj (with entries 1 or ) and negative unate in xj +1 ; : : : ; xk (with
entries 0 or ).
Cube x1 : : : xj xj +1 : : : xk must be covered for F to be a tautology. That
is possible only with the row of all dont care entries. TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
Sufficiency: Trivial
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 283 / 565
Tautology checking assisted by unateness Unate reduction
Proof.
For the function f (U ) restricted to the unate variables, f (U ) 1 if and
only if there is a row of all dont cares ( or 2) in U. If f (U )
= 1; then
f
= 1:
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 284 / 565
Tautology checking assisted by unateness Unate reduction
A
= 1 ) (F 1 , C 1)
How to check that A = 1?
A
Easiest when is a unate cover all DC rows have already
T
been grouped into T , so A =1
Otherwise, necessary to do a tautology check on A TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 285 / 565
Tautology checking assisted by unateness Unate reduction
A
= 1 ) (F 1 , C 1)
How to check that A = 1?
A
Easiest when is a unate cover all DC rows have already
T
been grouped into T , so A =1
Otherwise, necessary to do a tautology check on A TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 285 / 565
Tautology checking assisted by unateness Unate reduction
A
= 1 ) (F 1 , C 1)
How to check that A = 1?
A
Easiest when is a unate cover all DC rows have already
T
been grouped into T , so A =1
Otherwise, necessary to do a tautology check on A TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 285 / 565
Tautology checking assisted by unateness Unate reduction
Proof.
Necessity: A = 1 ) (F 1 ) C 1)
Assume C = 1. Then there is a minterm m2 such that C (m2 ) = 0, i.e.
m2 is not a cube of C.
Similarly, m1 exists where A(m1 ) = 0, i.e. m1 is not a cube of A.
Now the minterm hm1 ; m2 i in the full space satisfies F (m1 ; m2 ) = 0
since m1 m2 62 AX and m1 m2 62 TC. So hm1 ; m2 i is not in any cube of
F.
Sufficiency: A = 1 ) (C 1 ) F 1)
Trivial
8m1; m2; T (m1) = 1 ^ C (m2) = 1 ) F (hm1; m2i) = 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 286 / 565
Tautology checking assisted by unateness Unate reduction
A X
T C
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 287 / 565
Tautology checking assisted by unateness Unate reduction
A X
A0 X0
T
T0 C0
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 287 / 565
Tautology checking assisted by unateness Unate reduction
A X
A0 X0
T
T0 C0 C000
0
1
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 287 / 565
Tautology checking assisted by unateness Unate reduction
A X
A0 X0
T
T0 C0 C000
0
1
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 287 / 565
Tautology checking assisted by unateness Special cases for tautology checking
If F is empty, then F 0
If there a row of all dont cares ( or 2), then F 1
If there is a column (for xj ) of all 1s (0s), then F
= 1 because
no minterm containing xj (xj ) will be covered
Each row corresponds to a cube. If there are k dont cares in that
row then the cube has 2k minterms. If the sum of minterms over
all the rows is less than 2m where m is the number of inputs to
F(v ) , then F
= 1, F (v ) is the cofactor (sub-space of F ) under
consideration
If a list of minterms are provided, then the function is a tautology if
and only if the number is exactly 2n
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 288 / 565
Tautology checking assisted by unateness Special cases for tautology checking
If F is empty, then F 0
If there a row of all dont cares ( or 2), then F 1
If there is a column (for xj ) of all 1s (0s), then F
= 1 because
no minterm containing xj (xj ) will be covered
Each row corresponds to a cube. If there are k dont cares in that
row then the cube has 2k minterms. If the sum of minterms over
all the rows is less than 2m where m is the number of inputs to
F(v ) , then F
= 1, F (v ) is the cofactor (sub-space of F ) under
consideration
If a list of minterms are provided, then the function is a tautology if
and only if the number is exactly 2n
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 288 / 565
Tautology checking assisted by unateness Algorithm for tautology checking
GY
ITU
IAN INST
KH
ARAGPUR
return (TRUE, X);
IND
19 5 1
yog, km s kOflm^
}
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 289 / 565
Complemenation
Section outline
30 Complemenation
Rules for complementation of special covers
Recursive complementation based on cofactors
Complement of unate cover
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 290 / 565
Complemenation
Applications of complementation
Example (Static verfication of a synthesised Boolean function)
Suppose F 0 is and implementation of a given cover F of a completely
specified function; how do we know that F 0 is a proper implemenation?
Compute Y = F F 0 (ex-nor of F and F 0 )
Y 1 iff F and F 0 are equivalent how to proceed?
1 Compute Y = FF 0 + F F0 (note the use of complementation)
2 Perform a tautology check on Y
Product and sum of covers can be done in polynomial time
What if F and F 0 are covers of some incompletely specified function?
GY
A cover R of r may be computed as F
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 291 / 565
Complemenation
Applications of complementation
Example (Static verfication of a synthesised Boolean function)
Suppose F 0 is and implementation of a given cover F of a completely
specified function; how do we know that F 0 is a proper implemenation?
Compute Y = F F 0 (ex-nor of F and F 0 )
Y 1 iff F and F 0 are equivalent how to proceed?
1 Compute Y = FF 0 + F F0 (note the use of complementation)
2 Perform a tautology check on Y
Product and sum of covers can be done in polynomial time
What if F and F 0 are covers of some incompletely specified function?
GY
A cover R of r may be computed as F
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 291 / 565
Complemenation
Applications of complementation
Example (Static verfication of a synthesised Boolean function)
Suppose F 0 is and implementation of a given cover F of a completely
specified function; how do we know that F 0 is a proper implemenation?
Compute Y = F F 0 (ex-nor of F and F 0 )
Y 1 iff F and F 0 are equivalent how to proceed?
1 Compute Y = FF 0 + F F0 (note the use of complementation)
2 Perform a tautology check on Y
Product and sum of covers can be done in polynomial time
What if F and F 0 are covers of some incompletely specified function?
GY
A cover R of r may be computed as F
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 291 / 565
Complemenation
Applications of complementation
Example (Static verfication of a synthesised Boolean function)
Suppose F 0 is and implementation of a given cover F of a completely
specified function; how do we know that F 0 is a proper implemenation?
Compute Y = F F 0 (ex-nor of F and F 0 )
Y 1 iff F and F 0 are equivalent how to proceed?
1 Compute Y = FF 0 + F F0 (note the use of complementation)
2 Perform a tautology check on Y
Product and sum of covers can be done in polynomial time
What if F and F 0 are covers of some incompletely specified function?
GY
A cover R of r may be computed as F
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 291 / 565
Complemenation
Consider F = C1 + : : : + Cn
F = C1 Cn [by De Morgans law]
Cj = li1 li2 : : : lij
Cj = li1 li2 : : : lij
Cj = li1 + li2 + : : : + lij [by De Morgans law]
Not feasible to compute the product directly as, C1 Cn will have
too many cubes
A more efficient method would be desirable
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 292 / 565
Complemenation
Consider F = C1 + : : : + Cn
F = C1 Cn [by De Morgans law]
Cj = li1 li2 : : : lij
Cj = li1 li2 : : : lij
Cj = li1 + li2 + : : : + lij [by De Morgans law]
Not feasible to compute the product directly as, C1 Cn will have
too many cubes
A more efficient method would be desirable
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 292 / 565
Complemenation
Consider F = C1 + : : : + Cn
F = C1 Cn [by De Morgans law]
Cj = li1 li2 : : : lij
Cj = li1 li2 : : : lij
Cj = li1 + li2 + : : : + lij [by De Morgans law]
Not feasible to compute the product directly as, C1 Cn will have
too many cubes
A more efficient method would be desirable
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 292 / 565
Complemenation
Consider F = C1 + : : : + Cn
F = C1 Cn [by De Morgans law]
Cj = li1 li2 : : : lij
Cj = li1 li2 : : : lij
Cj = li1 + li2 + : : : + lij [by De Morgans law]
Not feasible to compute the product directly as, C1 Cn will have
too many cubes
A more efficient method would be desirable
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 292 / 565
Complemenation
Consider F = C1 + : : : + Cn
F = C1 Cn [by De Morgans law]
Cj = li1 li2 : : : lij
Cj = li1 li2 : : : lij
Cj = li1 + li2 + : : : + lij [by De Morgans law]
Not feasible to compute the product directly as, C1 Cn will have
too many cubes
A more efficient method would be desirable
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 292 / 565
Complemenation Rules for complementation of special covers
GY
ITU
IAN INST
KH
ARAGPUR
IND
returned.
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 293 / 565
Complemenation Recursive complementation based on cofactors
Recursive complementation
Proof.
FG = 0 ^ F + G = 1 ) F = G
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 294 / 565
Complemenation Recursive complementation based on cofactors
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 295 / 565
Complemenation Recursive complementation based on cofactors
F = Fx + x Fx
F is a negative unate (monotonically decreasing) cover in x ;:
F = x Fx + Fx
In the recursive divide and conquer scheme only need to compute
x Fx + Fx or Fx + x Fx , avoiding a round of ANDing in each step
Technique is sound but not optimal
The cubes generated may not be prime
The cover generated may not be irredundant TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 296 / 565
Complemenation Recursive complementation based on cofactors
complement(F) {
(flag, F) = tryComplementBasic(F)
if(flag) {
return F
} else {
xi = binateSelect(F)
F0 = complement(cofactor(F,xi )) ^ x i
F1 = complement(cofactor(F,xi )) ^ xi
return (F0 _ F1)
}
}
We shall see next that if F is a unate cover, its complement can be
computed directly, without resorting to further decompositions TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 297 / 565
Complemenation Complement of unate cover
Example
1 2 0 2 1 1 0 1 0 1
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 298 / 565
Complemenation Complement of unate cover
Example
Boolean matrix
x1 x2 x3 x4 x5
All MCCs of the adjoining
Boolean matrix are: fx1 ; x4 g,
0 1 0 1 0
fx2; x3g, fx2; x5g and fx4; x5g 0
1
0 1 1 1
1 0 0 1
1 0 1 0 1 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 299 / 565
Complemenation Complement of unate cover
Corresponding to each minimal cover li1 ; li2 ; : : : ; lik of the Boolean
matrix of F ; generate the cube li1 li2 lik
Example
All MCCs of the Boolean matrix: (Unate) Cube cover F
fx1; x4g, fx2; x3g ; fx2; x5g and x1 x2 x3 x4 x5
fx4; x5g 2 1 2 0 2
The unate complement of F 2 2 0 0 1
derived from the MCCs: x1 x4 + 1 1 2 2 1
x2 x3 + x2 x5 + x4 x5 1 2 0 2 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 300 / 565
Complemenation Complement of unate cover
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 301 / 565
Complemenation Complement of unate cover
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 301 / 565
Complemenation Complement of unate cover
Proof.
Let the literals in the column cover be li1 li2 : : : lik
Then, F = li1 (ri1 ;1 + ri1 ;2 + : : :)+ li2 (ri2 ;1 + ri2 ;2 + : : :) + : : : +
lik (rik ;1 + rik ;2 + : : :); where rij ;1 is the cube corresponding to a row
covered by lij as the literals lij form a column cover
Now,
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 302 / 565
Complemenation Complement of unate cover
Proof.
Let the literals in the column cover be li1 li2 : : : lik
Then, F = li1 (ri1 ;1 + ri1 ;2 + : : :)+ li2 (ri2 ;1 + ri2 ;2 + : : :) + : : : +
lik (rik ;1 + rik ;2 + : : :); where rij ;1 is the cube corresponding to a row
covered by lij as the literals lij form a column cover
Now,
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 302 / 565
Complemenation Complement of unate cover
Proof.
Let the literals in the column cover be li1 li2 : : : lik
Then, F = li1 (ri1 ;1 + ri1 ;2 + : : :)+ li2 (ri2 ;1 + ri2 ;2 + : : :) + : : : +
lik (rik ;1 + rik ;2 + : : :); where rij ;1 is the cube corresponding to a row
covered by lij as the literals lij form a column cover
Now,
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 302 / 565
Complemenation Complement of unate cover
Proof.
Let the literals in the column cover be li1 li2 : : : lik
Then, F = li1 (ri1 ;1 + ri1 ;2 + : : :)+ li2 (ri2 ;1 + ri2 ;2 + : : :) + : : : +
lik (rik ;1 + rik ;2 + : : :); where rij ;1 is the cube corresponding to a row
covered by lij as the literals lij form a column cover
Now,
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 302 / 565
Complemenation Complement of unate cover
Proof.
Let the literals in the column cover be li1 li2 : : : lik
Then, F = li1 (ri1 ;1 + ri1 ;2 + : : :)+ li2 (ri2 ;1 + ri2 ;2 + : : :) + : : : +
lik (rik ;1 + rik ;2 + : : :); where rij ;1 is the cube corresponding to a row
covered by lij as the literals lij form a column cover
Now,
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 302 / 565
Complemenation Complement of unate cover
Proof.
Let c = li1 li2 : : : lik be a cube in any cover (G) of f
Therefore, c must confict with each row or cube of F (otherwise, F
must have a row of all dont cares and F 1 and F = )
Let C 0 = lj1 ; lj2 ; : : : ; ljp be the literals of c that conflict with at least
one literal of each row (cube) of F ; let c 0 = lj1 lj2 : : : ljp and
C = lj1 ; lj2 ; : : : ; ljp
c c 0 and C is a column cover of the Boolean matrix B of F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 303 / 565
Complemenation Complement of unate cover
Proof. (contd.)
There must be column cover b00 (corresponding cube being c 00 )
among all the minimal column covers of B ; st b00 C
By construction of c 00 from b00 (by complementation of literals in
b00 ), c 00 conflicts with each of the rows (cubes) of F
But c c 0 c 00 , hence for any c 2 G
(G
being any cover of f ),
there is always in cube derived from an MCC of B containing c
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 304 / 565
Generation of prime implicants
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 305 / 565
Generation of prime implicants Distance between cubes
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 306 / 565
Generation of prime implicants Distance between cubes
Example
Let c1 = x1 x2 x3 , c2 = x1 x3 x4 ; c3 = x1 x2 x3 x4 and c4 = x2 x4
Cubes c1 and c2 differ in x3
They do not differ in x1 , x2 and x4
Distance between c1 and c2 is 1
c1 and c3 differ in x1 and x2 ; their distance is 2
Distance between c1 and c4 is 0, then intersect
Their intersection is the cube x1 x2 x3 x4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 307 / 565
Generation of prime implicants Distance between cubes
Example
Let c1 = x1 x2 x3 , c2 = x1 x3 x4 ; c3 = x1 x2 x3 x4 and c4 = x2 x4
Cubes c1 and c2 differ in x3
They do not differ in x1 , x2 and x4
Distance between c1 and c2 is 1
c1 and c3 differ in x1 and x2 ; their distance is 2
Distance between c1 and c4 is 0, then intersect
Their intersection is the cube x1 x2 x3 x4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 307 / 565
Generation of prime implicants Distance between cubes
Example
Let c1 = x1 x2 x3 , c2 = x1 x3 x4 ; c3 = x1 x2 x3 x4 and c4 = x2 x4
Cubes c1 and c2 differ in x3
They do not differ in x1 , x2 and x4
Distance between c1 and c2 is 1
c1 and c3 differ in x1 and x2 ; their distance is 2
Distance between c1 and c4 is 0, then intersect
Their intersection is the cube x1 x2 x3 x4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 307 / 565
Generation of prime implicants Distance between cubes
Example
Let c1 = x1 x2 x3 , c2 = x1 x3 x4 ; c3 = x1 x2 x3 x4 and c4 = x2 x4
Cubes c1 and c2 differ in x3
They do not differ in x1 , x2 and x4
Distance between c1 and c2 is 1
c1 and c3 differ in x1 and x2 ; their distance is 2
Distance between c1 and c4 is 0, then intersect
Their intersection is the cube x1 x2 x3 x4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 307 / 565
Generation of prime implicants Distance between cubes
Example
Let c1 = x1 x2 x3 , c2 = x1 x3 x4 ; c3 = x1 x2 x3 x4 and c4 = x2 x4
Cubes c1 and c2 differ in x3
They do not differ in x1 , x2 and x4
Distance between c1 and c2 is 1
c1 and c3 differ in x1 and x2 ; their distance is 2
Distance between c1 and c4 is 0, then intersect
Their intersection is the cube x1 x2 x3 x4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 307 / 565
Generation of prime implicants Distance between cubes
Example
Let c1 = x1 x2 x3 , c2 = x1 x3 x4 ; c3 = x1 x2 x3 x4 and c4 = x2 x4
Cubes c1 and c2 differ in x3
They do not differ in x1 , x2 and x4
Distance between c1 and c2 is 1
c1 and c3 differ in x1 and x2 ; their distance is 2
Distance between c1 and c4 is 0, then intersect
Their intersection is the cube x1 x2 x3 x4
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 307 / 565
Generation of prime implicants Cube consensus
Definition
The consensus of two cubes terms will be defined if they do not
intersect.
Two cubes having distance 2 or greater have empty consensus
Let c1 and c2 have distance 1, and differ in variable x
Let x occur as literal xc1 in c1 and as xc2 in c2
Cubes c1 and c2 do not intersect and are contained in the cubes
xc1 and xc2 , respectively
Their consensus is (c1 nxc1 ) \ (c2 nxc2 )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 308 / 565
Generation of prime implicants Cube consensus
Example
Let c1 = x1 x2 x3 and c2 = x1 x3 x4
Cubes c1 and c2 differ in x3
Distance between c1 and c2 is 1
Consensus between c1 and c2 is c3 = x1 x2 x4
NB: c3 * c1, c3 * c2
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 309 / 565
Generation of prime implicants Generation of primes
Generation of primes
Example
f with cover F = xy z + x y + y z, then wrt x, the three cubes are in
categories (i), (ii) and (iii), respectively
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 310 / 565
Generation of prime implicants Generation of primes
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 311 / 565
Generation of prime implicants Generation of primes
Example
c1 = x1 x3 ; c2 = x1 x3 , c3 = x1 x2
p1 = consensus(c1 ; c2 ) = x3 ; c1 p1, c2 p1
p2 = consensus(c1 ; c3 ) = x2 x3 ; p2 p1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 312 / 565
Generation of prime implicants Generation of primes
Example
c1 = x1 x3 ; c2 = x1 x3 , c3 = x1 x2
p1 = consensus(c1 ; c2 ) = x3 ; c1 p1, c2 p1
p2 = consensus(c1 ; c3 ) = x2 x3 ; p2 p1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 312 / 565
Generation of prime implicants Recursive scheme for generating primes
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 313 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
Consider the cover
We would like to find all its prime implicants by the recursive prime
generation scheme.
x1 x2 x3 x4
0 0 0
1 0 0
Cover matrix of F :
0 0 1
0 1 0
1 1 OF
TECHNO
LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 314 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
x3 x4 Fx3 x4 :
x1 x2 x3 x4 x1 x2 x3 x4
x3 x4 Fx3 x4 :
0 0 1 1 1
x1 x2 x3 x4
0 0 1
primes(x4 Fx4 ): 1 1
0 1
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 1 1 OF
TECHNO
LO
TE
GY
0 1
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 315 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4
x3 x4 Fx3 x4 : primes(x3 x4 Fx3 x4 ):
x1 x2 x3 x4
0 0 0
0 0
1 0 0
x1 x2 x3 x4
0 0
primes(x4 Fx4 ): 0 1 0
0 0
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 0 0
0 0 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 316 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4
x3 x4 Fx3 x4 : primes(x3 x4 Fx3 x4 ):
x1 x2 x3 x4
0 0 0
0 0
1 0 0
x1 x2 x3 x4
0 0
primes(x4 Fx4 ): 0 1 0
0 0
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 0 0
0 0 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 316 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4
x3 x4 Fx3 x4 : primes(x3 x4 Fx3 x4 ):
x1 x2 x3 x4
0 0 0
0 0
1 0 0
x1 x2 x3 x4
0 0
primes(x4 Fx4 ): 0 1 0
0 0
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 0 0
0 0 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 316 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4
x3 x4 Fx3 x4 : primes(x3 x4 Fx3 x4 ):
x1 x2 x3 x4
0 0 0
0 0
1 0 0
x1 x2 x3 x4
0 0
primes(x4 Fx4 ): 0 1 0
0 0
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 0 0
0 0 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 316 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4
x3 x4 Fx3 x4 : primes(x3 x4 Fx3 x4 ):
x1 x2 x3 x4
0 0 0
0 0
1 0 0
x1 x2 x3 x4
0 0
primes(x4 Fx4 ): 0 1 0
0 0
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 0 0
0 0 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 316 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4
x3 x4 Fx3 x4 : primes(x3 x4 Fx3 x4 ):
x1 x2 x3 x4
0 0 0
0 0
1 0 0
x1 x2 x3 x4
0 0
primes(x4 Fx4 ): 0 1 0
0 0
x1 x2 x3 x4
SCC(primes(x4 Fx4 )): 0 0
0 0 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 316 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4 x1 x2 x3 x4
1 1 1 1
0 1 0 1
0 0
primes(F ): SCC(primes(F )):
0 0
0 0 0 0
0 1 0 1
0 0 0 0
0 0 0 0
The set of prime implicants are:
fx3 x4 + x2 x4 + x3 x4 + x1 x4 + x1 x3 + x2 x3 + x1 x2 g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 317 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4 x1 x2 x3 x4
1 1 1 1
0 1 0 1
0 0
primes(F ): SCC(primes(F )):
0 0
0 0 0 0
0 1 0 1
0 0 0 0
0 0 0 0
The set of prime implicants are:
fx3 x4 + x2 x4 + x3 x4 + x1 x4 + x1 x3 + x2 x3 + x1 x2 g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 317 / 565
Generation of prime implicants Recursive scheme for generating primes
Example
x1 x2 x3 x4 x1 x2 x3 x4
1 1 1 1
0 1 0 1
0 0
primes(F ): SCC(primes(F )):
0 0
0 0 0 0
0 1 0 1
0 0 0 0
0 0 0 0
The set of prime implicants are:
fx3 x4 + x2 x4 + x3 x4 + x1 x4 + x1 x3 + x2 x3 + x1 x2 g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 317 / 565
Generation of prime implicants Recursive scheme for generating primes
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 318 / 565
Generation of prime implicants Unate Prime Theorem
primes(f ) = SCC(F )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 319 / 565
Generation of prime implicants Unate Prime Theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 320 / 565
Generation of prime implicants Unate Prime Theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 320 / 565
Generation of prime implicants Unate Prime Theorem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 320 / 565
Generation of prime implicants Unate Prime Theorem
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 321 / 565
Generation of prime implicants Unate Prime Theorem
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 321 / 565
Generation of prime implicants Unate Prime Theorem
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 321 / 565
Generation of prime implicants Iterated consensus method
Start with: SOP standard form (as compared to the canonical form
in Tabular Method)
Goal: sum of all PIs (likely to be redundant!)
Basic idea: xy + x z = xy + x z + yz consensus law
Start with any cover
Need to compare every pair of terms check:
Do they have consensus?
Does one contain the other?
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 322 / 565
Generation of prime implicants Iterated consensus method
Example
f (w ; x ; y ; z ) = wx + x y + xyz
= wx + x y + xyz + wy
= wx + x y + xyz + wy
= wx + x y + xyz + wy + yz
= wx + x y + wy + yz
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 323 / 565
Part VI
32 Irredundant
33 Expand
34 Reduce
35 Lastgasp
36 BDDs TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 324 / 565
About Espresso
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 325 / 565
Espresso minimisation loop
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 326 / 565
Outline of Espresso minimisation loop
newCost = coverCost(F);
do {
F = reduce(F, D);
// trim each cube maximally
F = expand(F, D);
// grow each cube maximally
F = irredundant(F, D);
// drop redundant cubes
cost = newCost;
newCost = coverCost(F);
} while (newCost < cost);
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 327 / 565
Irredundant
Section outline
32 Irredundant
Covering function g
Complement of covering function (g ) via MCCs of B of g
Computing g from F
Contribution of each cube of F to g
Leveraging unateness to generate cubes of g
Comparison with QM covering
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 328 / 565
Irredundant Covering function g
Irredundant
Irredundant Cover
a cover F of cubes fci g, find a minimum subset of these as
Given
cik that is still a cover, i.e.
X
f cik f +d
k
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 329 / 565
Irredundant Covering function g
Irredundant
Irredundant Cover
a cover F of cubes fci g, find a minimum subset of these as
Given
cik that is still a cover, i.e.
X
f cik f +d
k
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 329 / 565
Irredundant Covering function g
Irredundant (contd.)
Let F = fci g, i = 1; : : : ; m
Let fyi g, i = 1; : : : ; m be a set of decision variables indicating
whether ci should be present in the cover
We could think of constructing a function g (y1 ; y2 ; : : : ; ym ) so that
g (~y ) = 1 iff ~y represents a cover of F
g is positive unate
A prime of g (cube with minimal yj s) represents a solution, largest
prime is favoured
We shall not try to construct g directly
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 330 / 565
Irredundant Covering function g
Irredundant (contd.)
Let F = fci g, i = 1; : : : ; m
Let fyi g, i = 1; : : : ; m be a set of decision variables indicating
whether ci should be present in the cover
We could think of constructing a function g (y1 ; y2 ; : : : ; ym ) so that
g (~y ) = 1 iff ~y represents a cover of F
g is positive unate
A prime of g (cube with minimal yj s) represents a solution, largest
prime is favoured
We shall not try to construct g directly
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 330 / 565
Irredundant Covering function g
Irredundant (contd.)
Let F = fci g, i = 1; : : : ; m
Let fyi g, i = 1; : : : ; m be a set of decision variables indicating
whether ci should be present in the cover
We could think of constructing a function g (y1 ; y2 ; : : : ; ym ) so that
g (~y ) = 1 iff ~y represents a cover of F
g is positive unate
A prime of g (cube with minimal yj s) represents a solution, largest
prime is favoured
We shall not try to construct g directly
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 330 / 565
Irredundant Covering function g
Irredundant (contd.)
Let F = fci g, i = 1; : : : ; m
Let fyi g, i = 1; : : : ; m be a set of decision variables indicating
whether ci should be present in the cover
We could think of constructing a function g (y1 ; y2 ; : : : ; ym ) so that
g (~y ) = 1 iff ~y represents a cover of F
g is positive unate
A prime of g (cube with minimal yj s) represents a solution, largest
prime is favoured
We shall not try to construct g directly
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 330 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
X
(y1 ; y2 ; : : : ; ym ) = 1 ,
g cik is not a cover
k
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 331 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
X
(y1 ; y2 ; : : : ; ym ) = 1 ,
g cik is not a cover
k
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 331 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
X
(y1 ; y2 ; : : : ; ym ) = 1 ,
g cik is not a cover
k
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 331 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
X
(y1 ; y2 ; : : : ; ym ) = 1 ,
g cik is not a cover
k
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 331 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
Illustrating g, g and B
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 332 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
Illustrating g, g and B
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 332 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
Illustrating g, g and B
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 332 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
Illustrating g, g and B
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 332 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
Illustrating g, g and B
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 332 / 565
Irredundant ) via MCCs of B of g
Complement of covering function (g
Illustrating g, g and B
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 332 / 565
Irredundant from F
Computing g
Computing g from F
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 333 / 565
Irredundant from F
Computing g
Computing g from F
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 333 / 565
Irredundant from F
Computing g
Computing g from F
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 333 / 565
Irredundant from F
Computing g
Computing g from F
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 333 / 565
Irredundant
Contribution of each cube of F to g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 334 / 565
Irredundant
Contribution of each cube of F to g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 334 / 565
Irredundant
Contribution of each cube of F to g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 334 / 565
Irredundant
Contribution of each cube of F to g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 334 / 565
Irredundant
Contribution of each cube of F to g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 334 / 565
Irredundant
Contribution of each cube of F to g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 334 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
These leaves should be ignored, but how?
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 335 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
These leaves should be ignored, but how?
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 335 / 565
Irredundant
Leveraging unateness to generate cubes of g
h i
Let X = Fci , Y = Dci , do a tautology check on X
Y instead of just
Fci , keeping track of the rows coming D
h i
X
Ignore any leaf node in the recursive decomposition of Y having
has a row of all dont cares in the Y part
Otherwise, if rows corresponding to ci1 ; ci2 ; : : : ; ci1 are all dont
cares in a leaf node, then yi1 yi2 : : : yi1 is a row in g
and so the
appropriate row should be introduced into B
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 336 / 565
Irredundant
Leveraging unateness to generate cubes of g
Illustrating construction of g
Example
c + ab + b c
Cover: F = bc + a
D=
a b c
bc (y1 ) 1 1
c (y2 )
Cover matrix of F : a 0 1
b (y3 )
a 0 0
c (y4 )
b 0 0
a b c
Fbc (unate): bc (y1 )
c (y2 )
a 0
y1 2 g (~y ) TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 337 / 565
Irredundant
Leveraging unateness to generate cubes of g
Illustrating construction of g
Example
c + ab + b c
Cover: F = bc + a
D=
a b c
bc (y1 ) 1 1
c (y2 )
Cover matrix of F : a 0 1
b (y3 )
a 0 0
c (y4 )
b 0 0
a b c
Fbc (unate): bc (y1 )
c (y2 )
a 0
y1 2 g (~y ) TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 337 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 338 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 338 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 338 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 338 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 338 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 339 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 339 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 339 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 339 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 340 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 340 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 340 / 565
Irredundant
Leveraging unateness to generate cubes of g
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 340 / 565
Irredundant Comparison with QM covering
Relationship with QM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 341 / 565
Expand
Section outline
33 Expand
Issues in expanding a cube
Blocking matrix
Literals to delete using blocking matrix
Expanding to form a supercube
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 342 / 565
Expand Issues in expanding a cube
GY
ITU
IAN INST
KH
ARAGPUR
IND
irredundant could be considered
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 343 / 565
Expand Issues in expanding a cube
GY
ITU
IAN INST
KH
ARAGPUR
IND
irredundant could be considered
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 343 / 565
Expand Issues in expanding a cube
GY
ITU
IAN INST
KH
ARAGPUR
IND
irredundant could be considered
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 343 / 565
Expand Blocking matrix
1 0 1 0
LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 344 / 565
Expand Blocking matrix
F = fci g f + d, ci = lj , R = fri g is any cover of r (OFF-set)
Bij = 1 , lj 2 c ^ lj 2 ri
Bij = 1 means that literal lj of c has a conflict with cube ri of R
If lj is not dropped from c then c \ ri = is ensured
We only need to ensure that when we choose a set of literals of c
to delete (to expand it), the remaining literals have a conflict with
each of the cubes of R
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 345 / 565
Expand Blocking matrix
F = fci g f + d, ci = lj , R = fri g is any cover of r (OFF-set)
Bij = 1 , lj 2 c ^ lj 2 ri
Bij = 1 means that literal lj of c has a conflict with cube ri of R
If lj is not dropped from c then c \ ri = is ensured
We only need to ensure that when we choose a set of literals of c
to delete (to expand it), the remaining literals have a conflict with
each of the cubes of R
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 345 / 565
Expand Blocking matrix
F = fci g f + d, ci = lj , R = fri g is any cover of r (OFF-set)
Bij = 1 , lj 2 c ^ lj 2 ri
Bij = 1 means that literal lj of c has a conflict with cube ri of R
If lj is not dropped from c then c \ ri = is ensured
We only need to ensure that when we choose a set of literals of c
to delete (to expand it), the remaining literals have a conflict with
each of the cubes of R
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 345 / 565
Expand Blocking matrix
Example
z
Let c = wxy
Let R = fx z + wx z + w y z g
w x y z
x z 0 1 0 1
Blocking matrix B c is:
wx z 1 0 0 0
w y z 1 0 1 0
and z ensure conflicts with
Okay to drop x and y because w
cubes of R
Literals y and z can also be dropped as w
and x also ensure
conflicts with cubes of R
Cannot drop w OF
TECHNO
LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 346 / 565
Expand Blocking matrix
Example
z
Let c = wxy
Let R = fx z + wx z + w y z g
w x y z
x z 0 1 0 1
Blocking matrix B c is:
wx z 1 0 0 0
w y z 1 0 1 0
and z ensure conflicts with
Okay to drop x and y because w
cubes of R
Literals y and z can also be dropped as w
and x also ensure
conflicts with cubes of R
Cannot drop w OF
TECHNO
LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 346 / 565
Expand Literals to delete using blocking matrix
First the blocking matrix helps us determine whether the cube has
enough literals to ensure that it does not exapand into R
We might like to delete maximum number of literals from c
Conversely, we would like to retain minimum number literals of c
Also,
1 the 1 entries of the retained literals indicate presence of a conflict
with a cube of R and
2 there should be a conflict with each cube of R
So we are are after a MCC of B c !
We retain the literals in the MCC and drop the rest
We might have other considerations for expanding a cube
An important objective of the expand operation is for a cube ci to
expand to a super cube to cover as many other cubes as possible TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 347 / 565
Expand Literals to delete using blocking matrix
First the blocking matrix helps us determine whether the cube has
enough literals to ensure that it does not exapand into R
We might like to delete maximum number of literals from c
Conversely, we would like to retain minimum number literals of c
Also,
1 the 1 entries of the retained literals indicate presence of a conflict
with a cube of R and
2 there should be a conflict with each cube of R
So we are are after a MCC of B c !
We retain the literals in the MCC and drop the rest
We might have other considerations for expanding a cube
An important objective of the expand operation is for a cube ci to
expand to a super cube to cover as many other cubes as possible TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 347 / 565
Expand Literals to delete using blocking matrix
First the blocking matrix helps us determine whether the cube has
enough literals to ensure that it does not exapand into R
We might like to delete maximum number of literals from c
Conversely, we would like to retain minimum number literals of c
Also,
1 the 1 entries of the retained literals indicate presence of a conflict
with a cube of R and
2 there should be a conflict with each cube of R
So we are are after a MCC of B c !
We retain the literals in the MCC and drop the rest
We might have other considerations for expanding a cube
An important objective of the expand operation is for a cube ci to
expand to a super cube to cover as many other cubes as possible TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 347 / 565
Expand Literals to delete using blocking matrix
First the blocking matrix helps us determine whether the cube has
enough literals to ensure that it does not exapand into R
We might like to delete maximum number of literals from c
Conversely, we would like to retain minimum number literals of c
Also,
1 the 1 entries of the retained literals indicate presence of a conflict
with a cube of R and
2 there should be a conflict with each cube of R
So we are are after a MCC of B c !
We retain the literals in the MCC and drop the rest
We might have other considerations for expanding a cube
An important objective of the expand operation is for a cube ci to
expand to a super cube to cover as many other cubes as possible TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 347 / 565
Expand Literals to delete using blocking matrix
First the blocking matrix helps us determine whether the cube has
enough literals to ensure that it does not exapand into R
We might like to delete maximum number of literals from c
Conversely, we would like to retain minimum number literals of c
Also,
1 the 1 entries of the retained literals indicate presence of a conflict
with a cube of R and
2 there should be a conflict with each cube of R
So we are are after a MCC of B c !
We retain the literals in the MCC and drop the rest
We might have other considerations for expanding a cube
An important objective of the expand operation is for a cube ci to
expand to a super cube to cover as many other cubes as possible TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 347 / 565
Expand Literals to delete using blocking matrix
Example
Column cover of B c is shown below:
z
wxy
w x y z
x z 0 1 0 1
wx z 1 0 0 0
w y z 1 0 1 0
and z form a MCC
w
and z ; drop x and y
Retain w
z wrt R = fx z + wx z + w y z g
z is expanded to c = w
c = wxy
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 348 / 565
Expand Expanding to form a supercube
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
c; d)
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 350 / 565
Expand Expanding to form a supercube
c; d)
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 350 / 565
Expand Expanding to form a supercube
c; d)
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 350 / 565
Expand Expanding to form a supercube
Example
Let c1 = a
bcd, c2 = abcd, d
bc
c3 = a
F = fc1 ; c2 ; c3 g and R = a
b cd ; abcd
d = SSC(c1 ; c2 ), ab = SSC(c1 ; c3 ) and X1 = fad ; abg
a
d11 = y2 y3 , d21 = y3 y4 and h(Y~1 ) = d11 + d21
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 351 / 565
Expand Expanding to form a supercube
Example
Let c1 = a
bcd, c2 = abcd, d
bc
c3 = a
F = fc1 ; c2 ; c3 g and R = a
b cd ; abcd
d = SSC(c1 ; c2 ), ab = SSC(c1 ; c3 ) and X1 = fad ; abg
a
d11 = y2 y3 , d21 = y3 y4 and h(Y~1 ) = d11 + d21
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 351 / 565
Expand Expanding to form a supercube
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 352 / 565
Expand Expanding to form a supercube
Example
; abc
bcd ; abcd
F = a d ,
Both remaining cubes cannot
R= a bcd ; abcd , c = abcd
be covered by way of cube
Composite matrix for c: expansion of c
b c d
a
0 1 Composite matrix after
2 1 1 2
B
B C choosing top row:
B 2 2 1 1 C C b c d
a
B
B 0 1 0 1 C C 0 1
@ A 2 2 2 2
1 0 0 0 B
B C
B 2 2 2 1 C C
For the two possible B
B 0 0 0 1 C C
@ A
expansions, either expansion 1 0 0 0
covers one extra cube TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 353 / 565
Expand Expanding to form a supercube
Example
; abc
bcd ; abcd
F = a d ,
Both remaining cubes cannot
R= a bcd ; abcd , c = abcd
be covered by way of cube
Composite matrix for c: expansion of c
b c d
a
0 1 Composite matrix after
2 1 1 2
B
B C choosing top row:
B 2 2 1 1 C C b c d
a
B
B 0 1 0 1 C C 0 1
@ A 2 2 2 2
1 0 0 0 B
B C
B 2 2 2 1 C C
For the two possible B
B 0 0 0 1 C C
@ A
expansions, either expansion 1 0 0 0
covers one extra cube TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 353 / 565
Expand Expanding to form a supercube
Note that check wrt B is not required for dropping literals for
individual rows of C, but needed for multiple rows
This is a type of column covering problem for B with the objective
to minimise coverage for C
This problem may be solved with greedy heuristics?
Note that expansion is commutative: if ci can expand to cover cj
and then ck , cj can also expand to cover ck and then cj
This property can be used to determine the expansion of ci to
cover maximum number of other cubes pseudocode ... ?
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 354 / 565
Expand Expanding to form a supercube
Note that check wrt B is not required for dropping literals for
individual rows of C, but needed for multiple rows
This is a type of column covering problem for B with the objective
to minimise coverage for C
This problem may be solved with greedy heuristics?
Note that expansion is commutative: if ci can expand to cover cj
and then ck , cj can also expand to cover ck and then cj
This property can be used to determine the expansion of ci to
cover maximum number of other cubes pseudocode ... ?
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 354 / 565
Reduce
Section outline
34 Reduce
Formulation
Reduce using Shannon cofactors
Supercube of complement
SCCC of unate cover
Recursive computation of SCCC
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 355 / 565
Reduce Formulation
Reduce
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 356 / 565
Reduce Formulation
Reduce (contd.)
F = fc1 ; c2 ; : : : ; ck g
F (i ) = (F + D )n fci g = fc1 ; c2 ; : : : ; ci 1 ; ci +1 ; : : : ; ck g + D
F (i ): a cover of all of r and minterms covered exclusively by ci .
(ci \ F (i )) is the set of points exclusively covered by ci (and not by
any other cj or D)
Reduced cube: ci0 : smallest cube containing (ci \ F (i ))
Thus, ci0 is the smallest cube containing the minterms of ci which
are not in F (i ). Therefore, c 0 = SSC(ci \ F (i ))
i
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 357 / 565
Reduce Reduce using Shannon cofactors
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 358 / 565
Reduce Reduce using Shannon cofactors
reduce(F, D) {
F order(F) // suitably order F
for (1 j jFj) do {
cj0 maxReduce(cj , F, D)
F F [ cj0 - cj
}
return F
}
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 359 / 565
Reduce Supercube of complement
Example
c 0 1 2 2 2 b
a
c
1 2 2 2 2 a
2 0 2 2 2 b
In the a-plane, both polarities need to be covered while covering
b = ab + ab
b:
In the b-plane also, both polarities need to be covered while
covering a: a = ab + ab
As a result, SCCC(c ) needs to be the universal cube
SCCC(c ) = SSC(c) 2 2 2 2 2
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 360 / 565
Reduce Supercube of complement
Example
c 0 1 2 2 2 b
a
c
1 2 2 2 2 a
2 0 2 2 2 b
In the a-plane, both polarities need to be covered while covering
b = ab + ab
b:
In the b-plane also, both polarities need to be covered while
covering a: a = ab + ab
As a result, SCCC(c ) needs to be the universal cube
SCCC(c ) = SSC(c) 2 2 2 2 2
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 360 / 565
Reduce Supercube of complement
Example
c 0 1 2 2 2 b
a
c
1 2 2 2 2 a
2 0 2 2 2 b
In the a-plane, both polarities need to be covered while covering
b = ab + ab
b:
In the b-plane also, both polarities need to be covered while
covering a: a = ab + ab
As a result, SCCC(c ) needs to be the universal cube
SCCC(c ) = SSC(c) 2 2 2 2 2
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 360 / 565
Reduce SCCC of unate cover
Q
Consider the SOP expansion of j (lij + : : : + lij ) at least 2 literals/sum
1 j
Example
U = ab + bc
+ b)(b + c)) =
SCCC(U ) = SSC(ab + bc ) = SSC((a
SSC(ab + ac + b + bc)
All instances of each variable have the same polarity because the
cover is unate
In the SOP, for each literal lj , there is a cube where it is absent (dont
care)
Q
Therefore, SSC( j (li + : : : + li ) needs to be the universal cube
TECHNO
OF LO
TE
GY
ITU
j j
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
1 j
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 361 / 565
Reduce SCCC of unate cover
Q
Consider the SOP expansion of j (lij + : : : + lij ) at least 2 literals/sum
1 j
Example
U = ab + bc
+ b)(b + c)) =
SCCC(U ) = SSC(ab + bc ) = SSC((a
SSC(ab + ac + b + bc)
All instances of each variable have the same polarity because the
cover is unate
In the SOP, for each literal lj , there is a cube where it is absent (dont
care)
Q
Therefore, SSC( j (li + : : : + li ) needs to be the universal cube
TECHNO
OF LO
TE
GY
ITU
j j
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
1 j
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 361 / 565
Reduce SCCC of unate cover
Example
thus f = a(b + c)d, and SCCC(f ) ad
Let f = a + bc + d,
SCCC(l1 + : : : + lk + c1 + : : : + cm )
=SSC(l1 : : : lk c1 : : : cm )
= l1 : : : lk
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 362 / 565
Reduce SCCC of unate cover
If all the cubes in the unate cover C have at least two literals, then
SCCC(C ) 1
SCCC(C ) = , if there is a row of all 2s in U
Let
8= SCCC(C )
< lj ; if there is a singleton row having 0 in col j (cube is lj )
j = lj ; if there is a singleton row having 1 in col j (cube is lj )
:
2; otherwise
Computation of SCCC for a unate cover is easy!
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 363 / 565
Reduce SCCC of unate cover
If all the cubes in the unate cover C have at least two literals, then
SCCC(C ) 1
SCCC(C ) = , if there is a row of all 2s in U
Let
8= SCCC(C )
< lj ; if there is a singleton row having 0 in col j (cube is lj )
j = lj ; if there is a singleton row having 1 in col j (cube is lj )
:
2; otherwise
Computation of SCCC for a unate cover is easy!
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 363 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Reduce Recursive computation of SCCC
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 364 / 565
Lastgasp
Section outline
35 Lastgasp
Directional nature of reduce
Maximal reduce
Formulation
The Espresso algorithm
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 365 / 565
Lastgasp Directional nature of reduce
Example
Original cover F =
x2 x3 + x2 x3 + x1 x2 + x1 x2
Possible Reduction x2 x3 ! x1 x2 x3
and x2 x3 ! x1 x2 x3
x2
Another application of
Expand will not improve
coverage
x3
Another Reduction x2 x3 ! x1 x2 x3 x1
and x1 x2 ! x1 x2 x3
Another application of
Expand will lead to a
better coverage TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 366 / 565
Lastgasp Directional nature of reduce
Example
Original cover F =
x2 x3 + x2 x3 + x1 x2 + x1 x2
Possible Reduction x2 x3 ! x1 x2 x3
and x2 x3 ! x1 x2 x3
x2
Another application of
Expand will not improve
coverage
x3
Another Reduction x2 x3 ! x1 x2 x3 x1
and x1 x2 ! x1 x2 x3
Another application of
Expand will lead to a
better coverage TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 366 / 565
Lastgasp Directional nature of reduce
Example
Original cover F =
x2 x3 + x2 x3 + x1 x2 + x1 x2
Possible Reduction x2 x3 ! x1 x2 x3
and x2 x3 ! x1 x2 x3
x2
Another application of
Expand will not improve
coverage
x3
Another Reduction x2 x3 ! x1 x2 x3 x1
and x1 x2 ! x1 x2 x3
Another application of
Expand will lead to a
better coverage TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 366 / 565
Lastgasp Maximal reduce
Maximal reduce
Given a cover F = fc1 ; c2 ; : : : ; cm g
Let ciM = ci \ SCCC(Fci (i )), for all cubes (8i)
Now consider the set E = c1M ; c2M ; : : : ; cm
M
reduce(F, D) {
reduceMaximal(F, D) {
F order(F)
G
for (1 j jFj) do {
// suitably order F
for (1 j jFj) do {
cj0
cj0
maxReduce(cj , F, D)
G [ cj0
maxReduce(cj , F, D)
F [ cj0 - cj
G
F
}
}
return G OF
TECHNO
return F
LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
} 19 5 1
yog, km s kOflm^
}
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 367 / 565
Lastgasp Maximal reduce
Example
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 368 / 565
Lastgasp Maximal reduce
Example
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 368 / 565
Lastgasp Formulation
Lastgasp
lastgasp(F, D, R) {
G = reduceMaximal(F, D);
E = expandX(G, R); // all possible expansions
F = irredundant(F [ E, D);
}
Cubes in the minimally reduced set of cubes G are expanded to
prime cubes in all possible ways to form a set of cubes (E)
The cover F is augmented with E
An irredundant cover of F [ E is retained
Lastgasp does not guarantee a reduction of the cover size
Interesting variation was suggested by Goldberg (c.f. Goldbergs
Theorem)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 369 / 565
Lastgasp Formulation
Lastgasp (contd.)
Example
Consider a Boolean function and a feasible cover, as shown below
After maximal reduce, only the circled nodes remain in the cover
The supercube of these two nodes does not help to reduce the overall
number of cubes
The original cover of this example was optimal, anyway
x2
x2
x2 x2 x2
x3
x1 x3
x3 x3 x1 x3
x1 x1 1 0 1 x1
1 2 2 2 1 2 2 2 1
0 1 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 370 / 565
Lastgasp Formulation
Lastgasp (contd.)
Example
Consider a Boolean function and a feasible cover, as shown below
After maximal reduce, only the circled nodes remain in the cover
The supercube of these two nodes does not help to reduce the overall
number of cubes
The original cover of this example was optimal, anyway
x2
x2
x2 x2 x2
x3
x1 x3
x3 x3 x1 x3
x1 x1 1 0 1 x1
1 2 2 2 1 2 2 2 1
0 1 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 370 / 565
Lastgasp Formulation
Lastgasp (contd.)
Example
Consider a Boolean function and a feasible cover, as shown below
After maximal reduce, only the circled nodes remain in the cover
The supercube of these two nodes does not help to reduce the overall
number of cubes
The original cover of this example was optimal, anyway
x2
x2
x2 x2 x2
x3
x1 x3
x3 x3 x1 x3
x1 x1 1 0 1 x1
1 2 2 2 1 2 2 2 1
0 1 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 370 / 565
Lastgasp The Espresso algorithm
Espresso
espresso(F, D) { // called with ON and DC covers
R = complement(F [ D); // OFF cover computed
F = irredundant(expand(F, R), D);
E = essentialPrimes(F, D);
F = F - E; D = D [ E; // lighten F
repeat {
2 = cost(F);
repeat {
1 = jFj;
F = reduce(F, D); // F might not cover
F = irredundant(expand(F, R), D);
} until (jFj 1 );
F = lastgasp(F, D, R);
} until (cost(F) 2 );
F = F [ E; D = D - E; // reconsititute F
F = make_sparse(F, D, R); // for PLA design TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
}
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 371 / 565
BDDs
Section outline
36 BDDs
BDD reduction
BDD operations
Implementation aspects
Common ROBDD operations
More general representation
BDDs for relations
ZDDs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 372 / 565
BDDs
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 373 / 565
BDDs BDD reduction
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 374 / 565
BDDs BDD reduction
x1
1
0
x2 x2
0 1 0 1
x3 x3 x3 x3
0 1 0 1 0 1 0 1
0 0 0 1 0 1 0 1
Original OBDD
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 375 / 565
BDDs BDD reduction
x1
1
0
x2 x2
0 1 0 1
x3 x3 x3 x3
0 1 0 1 0 10 1
0 1
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 376 / 565
BDDs BDD reduction
x1
1
0
x2 x2
1 01
0
x3 x3
0 1
0 1
0 1
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 377 / 565
BDDs BDD reduction
x1
0
x2 1
1
0 x3
0 1
0 1
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 378 / 565
BDDs BDD reduction
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 379 / 565
BDDs BDD reduction
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 380 / 565
BDDs BDD operations
Complementation of f
x1
0
x2 1
1
0 x3
0 1
0 1
f is to be complemented
Result of complementation only the terminal values of 0 and 1
need to be interchanged TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 381 / 565
BDDs BDD operations
Complementation of f
x1
0
x2 1
1
0 x3
0 1
1 0
f is to be complemented
Result of complementation only the terminal values of 0 and 1
need to be interchanged TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 381 / 565
BDDs BDD operations
Restriction of f
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 382 / 565
BDDs BDD operations
Restriction of f
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 382 / 565
BDDs BDD operations
0
x2 1
1
0 x3
0 1
0 1
GY
ITU
IAN INST
KH
Result of further reduction to remove redundancies
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 383 / 565
BDDs BDD operations
x2 1
1
0 x3
0 1
0 1
GY
ITU
IAN INST
KH
Result of further reduction to remove redundancies
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 383 / 565
BDDs BDD operations
x3
0 1
0 1
GY
ITU
IAN INST
KH
Result of further reduction to remove redundancies
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 383 / 565
BDDs BDD operations
0
x2 1
1
0 x3
0 1
0 1
GY
ITU
IAN INST
KH
Result of further reduction to remove redundancies
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 384 / 565
BDDs BDD operations
0
x2 1
0 x3
0 1
0 1
GY
ITU
IAN INST
KH
Result of further reduction to remove redundancies
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 384 / 565
BDDs BDD operations
x3
0 1
0 1
GY
ITU
IAN INST
KH
Result of further reduction to remove redundancies
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 384 / 565
BDDs BDD operations
Shannon expansion:
f = x f jx 0 + x f jx 1
Existential quantification:
9x f = f jx 0 + f jx 1
Universal quantification:
8x f = f jx 0 f jx 1
f jx g = g f jx 0 + g f jx 1 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 385 / 565
BDDs BDD operations
Shannon expansion:
f = x f jx 0 + x f jx 1
Existential quantification:
9x f = f jx 0 + f jx 1
Universal quantification:
8x f = f jx 0 f jx 1
f jx g = g f jx 0 + g f jx 1 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 385 / 565
BDDs BDD operations
Shannon expansion:
f = x f jx 0 + x f jx 1
Existential quantification:
9x f = f jx 0 + f jx 1
Universal quantification:
8x f = f jx 0 f jx 1
f jx g = g f jx 0 + g f jx 1 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 385 / 565
BDDs BDD operations
Shannon expansion:
f = x f jx 0 + x f jx 1
Existential quantification:
9x f = f jx 0 + f jx 1
Universal quantification:
8x f = f jx 0 f jx 1
f jx g = g f jx 0 + g f jx 1 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 385 / 565
BDDs BDD operations
Composition
Theorem
f jx g = g f jx 0 + g f jx 1
Proof.
Here g is to be substituted for x in f
Let the support of g be xj1 ; xj2 ; : : :
When g is 1 for some truth assignment of xj1 ; xj2 ; : : :, f should be
restricted to x 1, hence we get the clause g f jx 1
Essentially means restrict f such that x 1 when g is 1
Similarly, when g is 0 for some truth assignment of xj1 ; xj2 ; : : :, f
should be restricted such that x 0, hence we get the clause
f jx 0 , restricting f to 0 when g is 0
g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 386 / 565
BDDs BDD operations
Composition
Theorem
f jx g = g f jx 0 + g f jx 1
Proof.
Here g is to be substituted for x in f
Let the support of g be xj1 ; xj2 ; : : :
When g is 1 for some truth assignment of xj1 ; xj2 ; : : :, f should be
restricted to x 1, hence we get the clause g f jx 1
Essentially means restrict f such that x 1 when g is 1
Similarly, when g is 0 for some truth assignment of xj1 ; xj2 ; : : :, f
should be restricted such that x 0, hence we get the clause
f jx 0 , restricting f to 0 when g is 0
g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 386 / 565
BDDs BDD operations
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 387 / 565
BDDs BDD operations
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 387 / 565
BDDs BDD operations
Shared BDDs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 388 / 565
BDDs Implementation aspects
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 389 / 565
BDDs Implementation aspects
The primitive item of storage is R = v ; Rg ; Rh =
ITE(v ; Rg ; Rh )
Before a node R = v ; Rg ; Rh = ITE(v ; Rg ; Rh ) ite(v ; g ; h)
is added to BDD data base, it is looked up in the unique-table
If it is there, then existing pointer to node is used to represent the
logic function
Otherwise, a new node is added to the unique-table and the new
pointer returned
Unique-table allows single multi-rooted DAG to represent all users
functions
Construction is done recursively
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 390 / 565
BDDs Implementation aspects
ite(f ; g ; h) = fg + f h
= v (fg + f h)v + v (fg + f h)v
= v (fv gv + fv hv ) + v (fv gv + fv hv )
= ITE(v ; ite(fv ; gv ; hv ); ite(fv ; gv ; hv ))
R = ite(Rf ; Rg ; Rh ) hhv ; R1 ; R2 ii ; where
R1 = ite(fv ; gv ; hv )
R2 = ite(fv ; gv ; hv )
Base cases
ite(f ; g ; g ) = g ite(Rf ; Rg ; Rg ) = Rg
ite(0; f ; g ) = g ite(0; Rf ; Rg ) = Rg
ite(1; f ; g ) = f ite(1; Rf ; Rg ) = Rf
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 391 / 565
BDDs Common ROBDD operations
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 392 / 565
BDDs Common ROBDD operations
Complement Edges
G
G
0 1 0 1
available redundant
ROBDD for both G and G
Share with complement edge
Share leaf also with complement edge
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 393 / 565
BDDs Common ROBDD operations
Complement Edges
G
G
G G
0 1 0 1 0 1
available redundant
ROBDD for both G and G
Share with complement edge
Share leaf also with complement edge
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 393 / 565
BDDs Common ROBDD operations
Complement Edges
G
G
G G
0 1 0 1 1
available redundant
ROBDD for both G and G
Share with complement edge
Share leaf also with complement edge
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 393 / 565
BDDs Common ROBDD operations
v v
vf + v g = vf + v g = vf v g
= (v + f ) (v g ) = v g + v f + f g
= v g + v f + (v + v )f g = v (g + f g ) + v (f + f g )
= v (g (1 + f )) + v (f (1 + g )) = v g + v f = v f + v g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
Preference is given to the left equivalent form so that the then leg has
ARAGPUR
IND
19 5 1
yog, km s kOflm^
no complement edge
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 394 / 565
BDDs Common ROBDD operations
v v
=) vf + v g = v f + v g
vf + v g = v f + v g
Preference is given to the left equivalent form so that the then leg has
no complement edge TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 395 / 565
BDDs Common ROBDD operations
v v
=) vf + v g = v f + v g
vf + v g = v f + v g
Preference is given to the left equivalent form so that the then leg has
no complement edge TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 396 / 565
BDDs Common ROBDD operations
v v
=) vf + v g = v f + v g
vf + v g = v f + v g
Preference is given to the left equivalent form so that the then leg has
no complement edge TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 397 / 565
BDDs More general representation
Example
t 0 1 X +t 0 1 X
0 0 0 0 0 0 1 X
1 0 1 X 1 1 1 1
X 0 X X X X 1 X
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 398 / 565
BDDs More general representation
Example
t 0 1 X +t 0 1 X
0 0 0 0 0 0 1 X
1 0 1 X 1 1 1 1
X 0 X X X X 1 X
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 398 / 565
BDDs More general representation
Example (contd.)
For the encoding
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 399 / 565
BDDs More general representation
fi ( (a)) = i (f (a))
The COSMOS symbolic simulator [Cho and Bryant 1989] uses ROBDDs
to compute the behavior of a transistor circuit symbolically
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 400 / 565
BDDs More general representation
fi ( (a)) = i (f (a))
The COSMOS symbolic simulator [Cho and Bryant 1989] uses ROBDDs
to compute the behavior of a transistor circuit symbolically
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 400 / 565
BDDs More general representation
fi ( (a)) = i (f (a))
The COSMOS symbolic simulator [Cho and Bryant 1989] uses ROBDDs
to compute the behavior of a transistor circuit symbolically
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 400 / 565
BDDs More general representation
Representation of Sets
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 401 / 565
BDDs More general representation
Representation of Sets
Example (A characteristic function and its ROBDD)
The set S has eight elements e1 ; : : : ; e8
encoded using three bits.
The table below shows the encoding and
also the charactersistic function S (~x ) de- x1
fined on the encoding.
element x1 x2 x3 S (~x ) 0
e1 0 0 0 0 x2 1
e2 0 0 1 0 1
e3 0 1 0 0
e4 0 1 1 1 0 x3
e5 1 0 0 0
e6 1 0 1 1 0 1
e7 1 1 0 0
0 1 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
e8 1 1 1 1
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 402 / 565
BDDs More general representation
Operations on Sets
Empty Set = 0
Set Union (S [T ) = S + T
Set Intersection (S \T ) = S T
Set Difference (S T ) = S T
The right hand side represents usual operations that can be performed
on ROBDDs
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 403 / 565
BDDs BDDs for relations
Representation of Relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 404 / 565
BDDs BDDs for relations
Representation of Relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 404 / 565
BDDs BDDs for relations
Representation of Relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 404 / 565
BDDs BDDs for relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 405 / 565
BDDs BDDs for relations
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 406 / 565
BDDs BDDs for relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 407 / 565
BDDs BDDs for relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 407 / 565
BDDs BDDs for relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 407 / 565
BDDs BDDs for relations
GY
ITU
IAN INST
KH
ARAGPUR
IND
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 407 / 565
BDDs BDDs for relations
Representation of Subsets
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 408 / 565
BDDs ZDDs
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 409 / 565
BDDs ZDDs
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 409 / 565
BDDs ZDDs
ZDD for F = ab + cd
Example
a
1
0
b b
0 1 1
0
c c
1 0 1
1 d d
1
0 1
0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
0 1
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 410 / 565
BDDs ZDDs
ZDD for F = ab + cd
Example
a
1
0
b b
1
0 1 0 c
0 1
d d
1
0 1
0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
0 1
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 410 / 565
BDDs ZDDs
Two variables are used for each primary input: one of them stands
for the positive literal and another for the negative literal
The minterm has those variables in the positive polarity that
correspond to literals present in the cube and those variables in
the negative polarity that correspond to literals missing in the cube
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 411 / 565
BDDs ZDDs
Example
a1
1
F = ab + cd 0 b1
Eight variables are used:
a1 ; a0 , b1 ; b0 , c1 ; c0 , d1 ; d0 c1
Characteristic function is: 1
0 1
a1 a0 b1 b0 c1 c0 d1 d0 +
0
a1 a0 b1 b0 c1 c0 d1 d0 d1
1
0
0 1
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 412 / 565
Part VII
40 Division
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 413 / 565
Introduction to multi-level logic synthesis
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 414 / 565
Introduction to multi-level logic synthesis PLA v/s multi-level
PLA
Multi-level
control logic
constrained layout all logic
highly automatic general (e.g. standard cell, FPGAs)
technology automatic
independent partially technology independent
very predictable very hard to predict
addressed by 2L 2L logic optimisation not enough
logic optimisation
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 415 / 565
Introduction to multi-level logic synthesis PLA v/s multi-level
PLA
Multi-level
control logic
constrained layout all logic
highly automatic general (e.g. standard cell, FPGAs)
technology automatic
independent partially technology independent
very predictable very hard to predict
addressed by 2L 2L logic optimisation not enough
logic optimisation
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 415 / 565
Introduction to multi-level logic synthesis Optimisation criteria
Optimisation criteria
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 416 / 565
Introduction to multi-level logic synthesis Optimisation criteria
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 417 / 565
Introduction to multi-level logic synthesis Optimisation criteria
Example
Behaviour
w=ab+ab
If w, then z=cd+ad ; u=cd+ad+e(f+b)
else z=e(f+b) ; u=(cd+ad)e(f+b)
Simple higher h/w cost, lower delay, less flexibility
w=ab+ab
z=w(cd+ad) + we(f+b)
u=w(cd+ad+e(f+b)) + w((cd+ad)e(f+b))
Structured more options for cost/delay tradeoff
w=ab+ab
t=cd+ad
s=e(f+b)
z=wt+ws
u=w(t+s)+wts TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 418 / 565
Introduction to multi-level logic synthesis Optimisation criteria
Representation
Common representations
Boolean network, Factored forms, BDDs
Guiding factors
A structure is needed on which a theory and supporting
algorithms can be developed independent of technology
Manipulations can be made
Optimization progress can be well estimated
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 419 / 565
Introduction to multi-level logic synthesis Boolean network
Boolean network
environment
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 420 / 565
Introduction to multi-level logic synthesis Boolean network
Boolean network
environment
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 420 / 565
Introduction to multi-level logic synthesis Manipulation of Boolean Networks
Basic techniques:
Global structural operations change topology
Algebraic methods
Boolean methods
Local node simplification change node functions
dont cares
node minimisation
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 421 / 565
Introduction to multi-level logic synthesis Manipulation of Boolean Networks
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 422 / 565
Introduction to multi-level logic synthesis Manipulation of Boolean Networks
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 422 / 565
Algebraic methods for multi-level optimisation
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 423 / 565
Algebraic methods for multi-level optimisation Algebraic expressions and products
Example
a + bc is an algebraic expression
a + ab is not an algebraic expression (factoring gives a(1 + b))
Product
The product of two expressions f and g is a set defined by
fg = fcd jc 2 f ^ d 2 g ^ cd 6= 0g
Example
(a + b)(c + d + a0 ) = ac + ad + bc + bd + a0 b
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 424 / 565
Algebraic methods for multi-level optimisation Algebraic expressions and products
Algebraic product
Algebraic product
fg is an algebraic product if f and g are algebraic expressions and have
disjoint support (that is, they have no input variables in common)
Example
(a + b)(c + d ) = ac + ad + bc + bd is an algebraic product
Example
(a + b + c )(c + d + e) is not an algebraic product
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 425 / 565
Algebraic methods for multi-level optimisation Factored forms
Factored forms
Factoring trees
Graphical representation of factored forms
Labeled trees, in which each internal node including the root is
labeled with either
OR (+)
AND ()
each leaf has a label of either a variable or its complement (literal)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 426 / 565
Algebraic methods for multi-level optimisation Factored forms
Example
Example
f = (a0 + b0 )0 c 0 abc 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 427 / 565
Algebraic methods for multi-level optimisation Factored forms
Example
Example
f = (a0 + b0 )0 c 0 abc 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 427 / 565
Algebraic methods for multi-level optimisation Factored forms
Example
Example
f = (a0 + b0 )0 c 0 abc 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 427 / 565
Algebraic methods for multi-level optimisation Factored forms
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 428 / 565
Algebraic methods for multi-level optimisation Factored forms
Algebraic FF
A factored form f is said to be algebraic if the SOP expression
obtained by multiplying f out directly (i.e. without using the special laws
of Boolean algebra) is algebraic.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 429 / 565
Algebraic methods for multi-level optimisation Factored forms
f = (b + c )(d + e) + ((d + e + g )f + (b + c )g )a
= (bd + be + cd + ce) + (df + ef + gf + bg + cg )a
= bd + ce + be + cd + abg + acg + adf + aef + afg
f = (af + b + c )(ag + d + e)
= afag + afd + afe + bag + bd + be + cag + cd + ce
= afg + adf + aef + abg + acg + bd + be + cd + ce
TECHNO
OF LO
TE
GY
ITU
Same expression can have both algebraic and Boolean factored forms
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 430 / 565
Algebraic methods for multi-level optimisation Factored forms
f = (b + c )(d + e) + ((d + e + g )f + (b + c )g )a
= (bd + be + cd + ce) + (df + ef + gf + bg + cg )a
= bd + ce + be + cd + abg + acg + adf + aef + afg
f = (af + b + c )(ag + d + e)
= afag + afd + afe + bag + bd + be + cag + cd + ce
= afg + adf + aef + abg + acg + bd + be + cd + ce
TECHNO
OF LO
TE
GY
ITU
Same expression can have both algebraic and Boolean factored forms
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 430 / 565
Algebraic methods for multi-level optimisation Factored forms
Equivalent Factorizations
Equivalence
Two factored forms are equivalent if they represent the same logic
function.
Example
a(b + c ) + bc ab + c (a + b)
Syntactic equivalence
Two factored forms are syntactically equivalent if their factoring tree
are isomorphic can be made identical by renaming.
Example
(a + b)(c + d )e (c + d )e(a + b)
a(b + c ) + bc ab + c (a + b)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 431 / 565
Algebraic methods for multi-level optimisation Factored forms
Equivalent Factorizations
Equivalence
Two factored forms are equivalent if they represent the same logic
function.
Example
a(b + c ) + bc ab + c (a + b)
Syntactic equivalence
Two factored forms are syntactically equivalent if their factoring tree
are isomorphic can be made identical by renaming.
Example
(a + b)(c + d )e (c + d )e(a + b)
a(b + c ) + bc ab + c (a + b)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 431 / 565
Algebraic methods for multi-level optimisation Factored forms
Maximal Factorization
Maximal factorisation
A factored form is maximally factored if
For every sum of products, there are no two syntactically
equivalent factors in the products
For every product of sums, there are no two syntactically
equivalent factors in the sums
Example
ab + ac is not maximally factored, a(b + c ) is.
Example
(a + b)(a + c ) is not maximally factored, a + bc is.
Example TE
OF
TECHNO
LO
GY
ITU
ab + (a + b)c is maximally factored.
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 432 / 565
Algebraic methods for multi-level optimisation Factored forms
Example
((a + b)ca0 ) = 4
((a + b + cd )(a0 + b0 )) = 6
Optimum FF
A factored form is optimum if no other equivalent factored form has
fewer literals.
Example
ab + a0 c + bc is not optimum, ab + a0 c ( ab + a0 c + bc ) is.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 433 / 565
Algebraic methods for multi-level optimisation Factored forms
Example
((a + b)ca0 ) = 4
((a + b + cd )(a0 + b0 )) = 6
Optimum FF
A factored form is optimum if no other equivalent factored form has
fewer literals.
Example
ab + a0 c + bc is not optimum, ab + a0 c ( ab + a0 c + bc ) is.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 433 / 565
Algebraic methods for multi-level optimisation Factored forms
Positive unate FF
A factored form F is positive unate in x, if x appears in F , but x 0 does
not.
Negative unate FF
A factored form F is negative unate in x, if x 0 appears in F , but x does
not.
Example
(a + b0 )c + a0 is positive unate in c, negative unate in b and binate in a.
Binate FF
A factored form F is binate in x, if both x 0 and x appear in F . TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 434 / 565
Algebraic methods for multi-level optimisation Cofactor of factored forms
Cofactor of FF
The cofactor of a factored form F with respect to a literal x (or x 0 ) is
the factored form Fx = Fx =1 (x ) (or Fx 0 = Fx =0 (x )) obtained by:
1 replacing all occurrences of x by 1, and x 0 by 0
2 simplifying the factored form using the Boolean algebra identities:
1y = y 1+y =1 0y = 0 0+y =y
3 performing constant propagation (all constants are removed)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 435 / 565
Algebraic methods for multi-level optimisation Cofactor of factored forms
Example
F = (x + y 0 + z )(x 0 u + z 0 y 0 (v + u 0 )) and C= vz 0
Fz 0 = (x + y 0 )(x 0 u + y 0 (v + u 0 ))
Fz 0 v = (x + y 0 )(x 0 u + y 0 ) = FC
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 436 / 565
Algebraic methods for multi-level optimisation Factorization value
Factorization value
Definition (Factorization value of F = G1 G2 + R)
The factorization value of an algebraic factorization F = G1 G2 + R is
defined as:
GY
ITU
IAN INST
KH
ARAGPUR
IND
lits(G) (lits(G1 ) + lits(G2 ))
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 437 / 565
Algebraic methods for multi-level optimisation Factorization value
GY
ITU
= (jG1 j 1)lits(G2 ) + (jG2 j 1)lits(G1 )
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 438 / 565
Algebraic methods for multi-level optimisation Factorization value
Example
Let F = ae + af + ag + bce + bcf + bcg + bde + bdf + bdg
G1 = (a + bc + bd )
G2 = (e + f + g )
F can be expressed in the form
F = G1 G2 + R = (a + b(c + d ))(e + f + g ), where R = .
F requires 7 literals, rather than 24; saving is 17
fact val(F; G2 ) = 23+25=16.
The actual factored form above saves 17 literals, not 16.
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 439 / 565
Restructuring Boolean networks
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 440 / 565
Restructuring Boolean networks
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 441 / 565
Restructuring Boolean networks Decomposition
Decomposition
Decomposition
From
cd + b cd
F = abc + abd + a
we may obtain
X = ab
Y =c+d
Y
F = XY + X
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 442 / 565
Restructuring Boolean networks Extraction
Extraction
Extraction
From
F = (a + b)cd + e
G = (a + b)e
H = cde
we may obtain
X =a+b Y = cd
F = XY + e
G = Xe
H = Ye
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 443 / 565
Restructuring Boolean networks Factoring
Factoring
Factoring
From
F = ac + ad + bc + bd + e
we may obtain
F = (a + b)(c + d ) + e
Factoring leads to a factored form of a SOP representation
series-parallel (tree-like) decomposition, it is context free
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 444 / 565
Restructuring Boolean networks Substitution
Substitution
Substitution
G =a+b
can be substituted into
F = a + bc
to obtain
F = G(a + c ) = a + bc
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 445 / 565
Restructuring Boolean networks Elimination
Elimination
Elimination or Collapsing
G =a+b
F = G(a + c )
F = a + ac + ab + bc
= a(1 + c + b) + bc
= a + bc
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 446 / 565
Restructuring Boolean networks Elimination
Example
Before
0 0 a + x (y + z ) + x 0 (bd ) After
x (ab + a b )
1 2
a + (a0 c + aby )(y + z )+
(a + c 0 )(a0 + b0 + y 0 )(bd )
x 3 a0 c + aby
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 447 / 565
Restructuring Boolean networks Elimination
y j j ; lj
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 448 / 565
Restructuring Boolean networks Elimination
Example
f1 = b(n + ag ) + h and f2 = i (n + aj ) + k; result of elimination
l=d+e value=-1
m=cl+f value=-1
f1 f2 f1 f2 TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 449 / 565
Restructuring Boolean networks Optimum Factored Forms
Lemma
Let f = g + h such that g ? h, then (f ) = (g ) + (h)
Corollary
Let f = gh such that g ? h, then (f ) = (g ) + (h)
Corollary
P Q
Let f = n1=1 m
P Q j =1 ij
f such that fij ? fkl ; i 6= j ^ j 6= l, then
(f ) = n1=1 mj=1 (fij )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 450 / 565
Restructuring Boolean networks Optimum Factored Forms
Redundant variable
For an incompletely specified function (f ; d ), if no optimum factored
form of (f ; d ) can contain variable x, then x is said to be redundant
Lemma
If F covers (f ; d ), then Fc covers (fc ; dc ) for any cube c
Theorem
Let (f ; d + e) be an incompletely specified function such that
sup(f + d ) \ sup(e) = , then variables in sup(e) are redundant, which
implies (f ; d + e) = (f ; d )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 451 / 565
Restructuring Boolean networks Optimum Factored Forms
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 452 / 565
Restructuring Boolean networks Optimum Factored Forms
Not only does this theorem show the uniqueness of the partition (if
cubes are made prime), it also indicates a procedure for obtaining it.
Given an incompletely specified function (F ; D ):
expand all cubes of F + D to primes,
build a cube matrix M,
partition M into blocks of disjoint supports,
remove from M each block of the partition that is contained
entirely in D
A 2 F
2
D1
f =
2 B 2 D2
X Y X Y
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 453 / 565
Restructuring Boolean networks Product
Product
Product of two algebraic expressions
P
Given two algebraic expressions f and g ; fg ; is a i ;j ci dj ; where f
= fci g and
g = dj ; made irredundant w.r.t single cube containment.
Example
ab + a = a
Example
(a + b)(c + d ) = ac + ad + bc + bd is an algebraic product
(a + b)(a + c ) = aa + ac + ab + bc = a + bc is a Boolean product, TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
because the terms of the product do not have disjoint support
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 454 / 565
Division
Section outline
40 Division
Division (f = gh + r )
Factors and divisors
Division with incompletely specified functions
Boolean Division algorithm
Algebraic quotient computation
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 455 / 565
Division Division (f = gh + r )
Division (f = gh + r )
Boolean divisor
Function g is a Boolean divisor of f if h and r exist such that
f = gh + r ; gh 6= 0
Factor
Function g is said to be a factor of f if, in addition, r = 0; i.e., f = gh
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 456 / 565
Division Division (f = gh + r )
Division (f = gh + r ) (contd.)
Algebraic quotient
If gh is restricted to an algebraic product, then h is the algebraic
quotient, denoted f ==g
Boolean quotient
Otherwise, h is a (non-unique) Boolean quotient denoted f g
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 457 / 565
Division Division (f = gh + r )
Division (f = gh + r ) (contd.)
Algebraic divisor
If h 6= 0; and h can be obtained using algebraic division, then g is an
algebraic divisor of f (note g ? h)
Otherwise, g is a Boolean divisor of f.
Algebraic factor
Function g is an algebraic factor of f if there exists an algebraic
expression h such that
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 458 / 565
Division Division (f = gh + r )
Division example
Example
f = ad + ae + bcd + j
g1 = a + bc
g2 = a + b
Algebraic division
h2 = f g2 = (a + c )d ; r2 = ae + j
= (a + b)(a + c )d + ae + j
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
f
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 459 / 565
Division Factors and divisors
Property of factors
A logic function g is a Boolean factor of a logic function f , if and only if
f g (i:e: f g = ; i:e: g f )
h = f works fine
Given f and g ; h is not unique
Small h is desirable and is same as getting a small f + r : Since
rg = 0; minimizing f with don0 t care = g
is required
Property of divisors
A logic function g is a Boolean divisor of a logic function f if and only if
fg 6= TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 460 / 565
Division Division with incompletely specified functions
f gh + e f + d and gh
=d
f gh f + d
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 461 / 565
Division Division with incompletely specified functions
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 462 / 565
Division Division with incompletely specified functions
Divisors
Suppose g is an algebraic divisor of F ; a cover of (f ; d ; r ). If f
=e
(where e is the remainder in the algebraic division, i.e. F = gh + e)
then g is a Boolean divisor of F
Factors
If g is an algebraic factor of F a cover of (f ; d ; r ), then g is a Boolean
factor of F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 463 / 565
Division Boolean Division algorithm
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 464 / 565
Division Boolean Division algorithm
booleanDivide_1(F,D,G) {
D_1 = D + xG + xG // (dont care)
F_1 = FD_1 // (on-set)
R_1 = (F_1 + D_1) = F_1D_1 = FD_1
// (OFF-set)
F_2 = remove x from F_1
F_3 = MIN_LITERAL(F_2, R_1, x)
// Filter for Espresso
// (min. literal support including x)
F4 = ESPRESSO(F_3,D_1,R_1)
H = F4/x // (quotient)
E = F4 - fxH g ==(remainder )
return (HG+E)
}
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 465 / 565
Division Algebraic quotient computation
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 466 / 565
Division Algebraic quotient computation
Example
F = abc + abd + de
G = ab + e
H1 = fc ; d g
Hh = fd g
H = h1 \ h2 = fd g
R = abc
F = (ab + e)d + abc
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 467 / 565
Division Algebraic quotient computation
Application of division
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 468 / 565
Division Algebraic quotient computation
Cube-free expression
A Boolean expression is cube-free if no cube divides the expression
evenly (i.e. the cubes do not have a common literal)
A cube-free expression must have more than one cube.
Example
ab + c is cube-free, but ab + ac (a is a commoncube ) and abc
(singleton cube) are not cube-free
Primary divisors
The primary divisors of an expression F are the set of expressions
D (F ) = fF =c jc is a cubeg TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 469 / 565
Kernels and co-kernels
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 470 / 565
Kernels and co-kernels
Kernels
The kernels of an expression F are the set of expressions
Co-kernel
A cube c used to obtain the kernel K = F =c is called a co-kernel of K
C (F ) is used to denote the set of co-kernels of F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 471 / 565
Kernels and co-kernels
Example
Kernels Co-kernels
a+b+c df ; ef
d +e af ; bf ; cf
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 472 / 565
Kernels and co-kernels
Fundamental Theorem
If two expressions F and G have the property that
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 473 / 565
Kernels and co-kernels
Kernel levels
Level of a kernel
A kernel is of level 0 (K 0 ) if it contains no kernels except itself.
A kernel is of level n (K n ) if it contains at least one kernel of level
(n 1); but no kernels (except itself) of level n or greater
K 0 (F ) K 1 (F ) K 2 (F ) : : : K n (F ) K (F )
level-n kernels: K n (F )nK n 1 (F )
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 474 / 565
Kernels and co-kernels
Kernel levels
Example
F = (a + b(c + d ))(e + g )
k1 = a + b(c + d ) 2 K 1 2= K 0
k2 = c + d 2 K0
k3 = e + g 2 K 0
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 475 / 565
Kernels and co-kernels
Kerneling Algorithm
kernel(j, G) {
R=
if(cubeFree(G)) R = G
for(i = j + 1; : : : ; n) {
if(li appears only in one term) continue
if(9k i ; lk 2 all cubes of G=li ) continue
// efficiency factor
// each co-kernel is tried only once
// may be used to generate all co-kernels
R = R [ kernel(i,makeCubeFree(G=li ))
}
return R
}
MAKE_CUBE_FREE(F ) removes algebraic cube factor from F
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 476 / 565
Kernels and co-kernels
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 477 / 565
Kernels and co-kernels
Algebraic expressions
Algebraic expression
It is a SOP representation of a logic function which is minimal w.r.t.
single cube containment.
Example
ab + abc + cd is not an algebraic expression
ab + cd is an algebraic expression
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 478 / 565
Part VIII
Partitioning
42 Role of partitioning
43 Representation issues
44 Problem description
45 Kernighan-Lin approach
46 Fiduccia-Mattheyses approach
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Section outline
42 Role of partitioning
Terminology
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 480 / 565
Role of partitioning
Importance
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 481 / 565
Role of partitioning Terminology
Terminology
Partitioning
Dividing bigger circuits into a small number of partitions
(top down)
Clustering
Cluster small cells into bigger clusters (bottom up)
Covering / Technology Mapping
Clustering such that each partition (cluster) has some
special structure (e.g., can be implemented by a cell in a
cell library)
k-way Partitioning
Dividing into k partitions
Bipartitioning
2-way partitioning
Bisectioning
Bipartitioning such that the two partitions have the same
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
size
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 482 / 565
Representation issues
Section outline
43 Representation issues
Circuit representation
Edge weights for multi-terminal nets
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 483 / 565
Representation issues Circuit representation
Circuit representation
Gates: A, B, C, D
Nets: fA, B, Cg, fB, Dg, fC, Dg
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 484 / 565
Representation issues Circuit representation
Circuit representation
Gates: A, B, C, D
Nets: fA, B, Cg, fB, Dg, fC, Dg
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 484 / 565
Representation issues Edge weights for multi-terminal nets
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 485 / 565
Representation issues Edge weights for multi-terminal nets
4
Each edge is assigned weight n2 (n mod 2)
Example: Let n = 3, w = 4
= 0:5
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
32 1
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 486 / 565
Representation issues Edge weights for multi-terminal nets
4
Each edge is assigned weight n2 (n mod 2)
Example: Let n = 3, w = 4
= 0:5
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
32 1
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 486 / 565
Representation issues Edge weights for multi-terminal nets
4
Each edge is assigned weight n2 (n mod 2)
Example: Let n = 3, w = 4
= 0:5
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
32 1
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 486 / 565
Representation issues Edge weights for multi-terminal nets
4
Each edge is assigned weight n2 (n mod 2)
Example: Let n = 3, w = 4
= 0:5
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
32 1
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 486 / 565
Problem description
Section outline
44 Problem description
Circuit bi-partitioning formulations
Description and search space
Partitioning approaches
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 487 / 565
Problem description Circuit bi-partitioning formulations
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 488 / 565
Problem description Description and search space
GY
ITU
IAN INST
KH
ARAGPUR
IND
Enumeration of candidate solutions is not an option
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 489 / 565
Problem description Description and search space
GY
ITU
IAN INST
KH
ARAGPUR
IND
Enumeration of candidate solutions is not an option
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 489 / 565
Problem description Partitioning approaches
Partitioning approaches
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 490 / 565
Problem description Partitioning approaches
Partitioning approaches
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 490 / 565
Problem description Partitioning approaches
Partitioning approaches
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 490 / 565
Problem description Partitioning approaches
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 491 / 565
Kernighan-Lin approach
Section outline
45 Kernighan-Lin approach
Outline of K-L
Vertex swapping
K-L algorithm steps
Complexity analysis of K-L
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 492 / 565
Kernighan-Lin approach Outline of K-L
Outline of K-L
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 493 / 565
Kernighan-Lin approach Outline of K-L
Outline of K-L
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 493 / 565
Kernighan-Lin approach Outline of K-L
Outline of K-L
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 493 / 565
Kernighan-Lin approach Outline of K-L
Outline of K-L
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 493 / 565
Kernighan-Lin approach Outline of K-L
Outline of method
Start with any arbitrary partition hX0 ; Y0 i of V having
cost T0 and jX0 j = jY0 j
In the j-th step, try to decrease
the cost
Tj by
interchanging nodes between Xj ; Yj
The method is greedy continues so long as the cost
decreases in the long run
Global optimality is not guaranteed
Cost of a partition For a vertex u 2 X
P
External cost Eu =P v 2Y cu ;v
Internal cost Iu = v 2X cu ;v
Cost difference For each w 2 V , Dw = Ew Iw
Interchange gain For x 2 X ; y 2 Y , gx ;y = Dx + Dy 2cx ;y TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 494 / 565
Kernighan-Lin approach Outline of K-L
Outline of method
Start with any arbitrary partition hX0 ; Y0 i of V having
cost T0 and jX0 j = jY0 j
In the j-th step, try to decrease
the cost
Tj by
interchanging nodes between Xj ; Yj
The method is greedy continues so long as the cost
decreases in the long run
Global optimality is not guaranteed
Cost of a partition For a vertex u 2 X
P
External cost Eu =P v 2Y cu ;v
Internal cost Iu = v 2X cu ;v
Cost difference For each w 2 V , Dw = Ew Iw
Interchange gain For x 2 X ; y 2 Y , gx ;y = Dx + Dy 2cx ;y TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 494 / 565
Kernighan-Lin approach Outline of K-L
Outline of method
Start with any arbitrary partition hX0 ; Y0 i of V having
cost T0 and jX0 j = jY0 j
In the j-th step, try to decrease
the cost
Tj by
interchanging nodes between Xj ; Yj
The method is greedy continues so long as the cost
decreases in the long run
Global optimality is not guaranteed
Cost of a partition For a vertex u 2 X
P
External cost Eu =P v 2Y cu ;v
Internal cost Iu = v 2X cu ;v
Cost difference For each w 2 V , Dw = Ew Iw
Interchange gain For x 2 X ; y 2 Y , gx ;y = Dx + Dy 2cx ;y TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 494 / 565
Kernighan-Lin approach Outline of K-L
Outline of method
Start with any arbitrary partition hX0 ; Y0 i of V having
cost T0 and jX0 j = jY0 j
In the j-th step, try to decrease
the cost
Tj by
interchanging nodes between Xj ; Yj
The method is greedy continues so long as the cost
decreases in the long run
Global optimality is not guaranteed
Cost of a partition For a vertex u 2 X
P
External cost Eu =P v 2Y cu ;v
Internal cost Iu = v 2X cu ;v
Cost difference For each w 2 V , Dw = Ew Iw
Interchange gain For x 2 X ; y 2 Y , gx ;y = Dx + Dy 2cx ;y TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 494 / 565
Kernighan-Lin approach Vertex swapping
Vertex swapping
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 495 / 565
Kernighan-Lin approach Vertex swapping
Vertex swapping
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 495 / 565
Kernighan-Lin approach K-L algorithm steps
GY
ITU
from Y to X
IAN INST
KH
ARAGPUR
IND
g
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 496 / 565
Kernighan-Lin approach Complexity analysis of K-L
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 497 / 565
Kernighan-Lin approach Complexity analysis of K-L
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 497 / 565
Kernighan-Lin approach Complexity analysis of K-L
K-L example
Example
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 498 / 565
Kernighan-Lin approach Complexity analysis of K-L
D60
GY
ITU
;
IAN INST
KH
= D6 + 2c6 1 = +0 + 2(0 1) =
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 499 / 565
Kernighan-Lin approach Complexity analysis of K-L
D60
GY
ITU
;
IAN INST
KH
= D6 + 2c6 1 = +0 + 2(0 1) =
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 499 / 565
Kernighan-Lin approach Complexity analysis of K-L
D60
GY
ITU
;
IAN INST
KH
= D6 + 2c6 1 = +0 + 2(0 1) =
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 499 / 565
Fiduccia-Mattheyses approach
Section outline
46 Fiduccia-Mattheyses approach
Outline of FM
Object gains
Complexity analysis of FM
Extensions to FM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 500 / 565
Fiduccia-Mattheyses approach Outline of FM
Outline of FM
Classic technique A Linear-time Heuristics for Improving Network
Partitions, 19-th DAC, pp 175-181, 1982
Features Extends K-L
Can handle non-uniform vertex weights (areas)
Allow unbalanced partitions
Extended to handle hypergraphs
Clever way to select vertices to move, run faster
Input A hypergraph
Set vertices V (jV j = n)
Set of hyperedges E (total number pins in netlist: p)
Area au for each vertex u in V
Cost ce for each hyperedge e
An area ratio r
Output Two partitions X and Y such that
Total cost of hyperedges cut is minimized
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Outline of FM
Classic technique A Linear-time Heuristics for Improving Network
Partitions, 19-th DAC, pp 175-181, 1982
Features Extends K-L
Can handle non-uniform vertex weights (areas)
Allow unbalanced partitions
Extended to handle hypergraphs
Clever way to select vertices to move, run faster
Input A hypergraph
Set vertices V (jV j = n)
Set of hyperedges E (total number pins in netlist: p)
Area au for each vertex u in V
Cost ce for each hyperedge e
An area ratio r
Output Two partitions X and Y such that
Total cost of hyperedges cut is minimized
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Outline of FM
Classic technique A Linear-time Heuristics for Improving Network
Partitions, 19-th DAC, pp 175-181, 1982
Features Extends K-L
Can handle non-uniform vertex weights (areas)
Allow unbalanced partitions
Extended to handle hypergraphs
Clever way to select vertices to move, run faster
Input A hypergraph
Set vertices V (jV j = n)
Set of hyperedges E (total number pins in netlist: p)
Area au for each vertex u in V
Cost ce for each hyperedge e
An area ratio r
Output Two partitions X and Y such that
Total cost of hyperedges cut is minimized
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Outline of FM
Classic technique A Linear-time Heuristics for Improving Network
Partitions, 19-th DAC, pp 175-181, 1982
Features Extends K-L
Can handle non-uniform vertex weights (areas)
Allow unbalanced partitions
Extended to handle hypergraphs
Clever way to select vertices to move, run faster
Input A hypergraph
Set vertices V (jV j = n)
Set of hyperedges E (total number pins in netlist: p)
Area au for each vertex u in V
Cost ce for each hyperedge e
An area ratio r
Output Two partitions X and Y such that
Total cost of hyperedges cut is minimized
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 502 / 565
Fiduccia-Mattheyses approach Outline of FM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 502 / 565
Fiduccia-Mattheyses approach Object gains
Object gains
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 503 / 565
Fiduccia-Mattheyses approach Object gains
Object gains
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 503 / 565
Fiduccia-Mattheyses approach Object gains
FM example
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 504 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 505 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 506 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 507 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 508 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 509 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 510 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 511 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 512 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 513 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 514 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 515 / 565
Fiduccia-Mattheyses approach Object gains
FM example (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 516 / 565
Fiduccia-Mattheyses approach Complexity analysis of FM
Complexity analysis of FM
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 517 / 565
Fiduccia-Mattheyses approach Extensions to FM
Extensions to FM
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 518 / 565
Fiduccia-Mattheyses approach Extensions to FM
Extensions to FM (contd.)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 519 / 565
Ratio cut partitioning
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 520 / 565
Ratio cut partitioning Heuristic algorithm for ratio cut partitioning
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 521 / 565
Ratio cut partitioning Initialisation
Initialisation
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 522 / 565
Ratio cut partitioning Iterative shifting
Iterative shifting
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 523 / 565
Ratio cut partitioning Group swapping for ratio cut
the group of modules corresponding to the largest gain, and redo all the
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 524 / 565
Part IX
Floorplanning
48 Role of floorplanning
49 Floorplan representation
52 Stockmeyer algorithm
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Section outline
48 Role of floorplanning
Hierarchical design
Objectives of floorplanning
Comparison with placement
Description of problem
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 526 / 565
Role of floorplanning Hierarchical design
Hierarchical design
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 527 / 565
Role of floorplanning Objectives of floorplanning
Objectives of floorplanning
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 528 / 565
Role of floorplanning Comparison with placement
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 529 / 565
Role of floorplanning Description of problem
Description of problem
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 530 / 565
Floorplan representation
Section outline
49 Floorplan representation
Slicing and non-slicing floorplans
Polar graph representation
Slicing tree representation of slicing FP
Bounding box of a slicing tree
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 531 / 565
Floorplan representation Slicing and non-slicing floorplans
Slicing floorplans
Can be obtained by repetitively subdividing
(slicing) rectangles horizontally or vertically
Slicing floorplans are easier to represent and
manipulate
Non-slicing floorplans
May not be obtained by repetitively subdividing
alone
The adjoining wheel structure turns out to be a
key element for the recursive representation of
non-slicing floorplans
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 532 / 565
Floorplan representation Polar graph representation
GY
ITU
IAN INST
KH
ARAGPUR
non-slicing cases)
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 533 / 565
Floorplan representation Polar graph representation
VPG
HPG
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
Node labels and edge weights are not shown
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 534 / 565
Floorplan representation Slicing tree representation of slicing FP
GY
ITU
IAN INST
KH
ARAGPUR
Possible to modify a give NPE by way of moves
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 535 / 565
Floorplan representation Slicing tree representation of slicing FP
Example
Slicing floorplan Slicing tree
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 536 / 565
Floorplan representation Bounding box of a slicing tree
GY
ITU
IAN INST
KH
ARAGPUR
IND
needed
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 537 / 565
Area optimization using shape curves
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 538 / 565
Area optimization using shape curves Shape curves
Shape curves
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 539 / 565
Area optimization using shape curves Combining shape curves
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 540 / 565
Area optimization using shape curves Complexity analysis of combining shape curves
Keeping k points for each shape curve, time for shape curve
computation for each NPE is O (kn)
After each move, there is only small change in the floorplan
No need to start shape curve computation from scratch
We can update shape curves incrementally after each move
Run time is about O (k log n)
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 541 / 565
Area optimization using shape curves Complexity analysis of combining shape curves
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 542 / 565
Simulated annealing algorithm for FP
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 543 / 565
Simulated annealing algorithm for FP SA for FP
SA for FP
Generic SA is used
Solution is represented using NPE
Moves (M1, M2 and M3) are defined on NPEs to perturb the
solution
Solution cost: weighted sum of bounding box and wire length
estimate
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 544 / 565
Simulated annealing algorithm for FP Moves on NPE
Moves on NPE
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 545 / 565
Simulated annealing algorithm for FP Moves on NPE
Illustration of move M1
Slicing floorplan
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 546 / 565
Simulated annealing algorithm for FP Moves on NPE
Illustration of move M2
Slicing floorplan
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 547 / 565
Simulated annealing algorithm for FP Moves on NPE
Illustration of move M3
Slicing floorplan
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 548 / 565
Stockmeyer algorithm
Section outline
52 Stockmeyer algorithm
Problem of determining module orientations
Outline of algorithm
Vertical node sizing
Horizontal node sizing
Complexity analysis of node sizing
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 549 / 565
Stockmeyer algorithm Problem of determining module orientations
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 550 / 565
Stockmeyer algorithm Outline of algorithm
Outline of algorithm
Phase I (bottom-up)
given slicing floorplan tree
given module shapes as a sorted irredundant list
perform vertical and horizontal node sizing
after processing root node, the feasible/best sets can
be determined
Phase II (top-down)
FP tree is traversed to set module locations
Optimal cost members of the children nodes that
contributed to the optimal cost member of the parent
node are identified
Eventially optimal orientations of the leaf modules
are determined TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 551 / 565
Stockmeyer algorithm Vertical node sizing
GY
ITU
IAN INST
KH
ARAGPUR
IND
}
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 552 / 565
Stockmeyer algorithm Horizontal node sizing
horizontalNodeSizing(L, R) {
// (HNdSz) for vertical cut
// L: fha1 ; b1 i ; : : : ; has ; bs ig,
// ai > aj ; bi < bj ; i < j
// R: fhx1 ; y1 i ; : : : ; hxt ; yt ig,
// xi > xj ; yi < yj ; i < j
// O: H = fhc1 ; d1 i ; : : : ; hcu ; du ig,
// u s + t 1 and ci > cj ; di < dj ; i <j
H , i 1, j 1, k 1 hx1 ; y1 i
while (i s and j t) do {
hck ; dk i hmax(ai ; xj ); bi + yj i
H H [ hck ; dk i hx2 ; y2 i
if (ck = ai ) then i++
if (ck = xj ) then j++
ha1 ; b1 i
// see illustration Sub-optimal, as max was from x1 , x2 or a1
ha2 ; b2 i
k++ TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
} 19 5 1
yog, km s kOflm^
}
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 553 / 565
Stockmeyer algorithm Complexity analysis of node sizing
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 554 / 565
Stockmeyer algorithm Complexity analysis of node sizing
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 555 / 565
Stockmeyer algorithm Complexity analysis of node sizing
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 556 / 565
Stockmeyer algorithm Complexity analysis of node sizing
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
After VNdSz:
yog, km
s kOflm^
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 558 / 565
GALLO: A genetic algorithm for FP
Section outline
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 559 / 565
GALLO: A genetic algorithm for FP Solution representation in GALLO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 560 / 565
GALLO: A genetic algorithm for FP Working of GALLO
Working of GALLO
Three mutation operations have been defined:
1 A gene is randomly selected, and its value is changed simplest
2 An integer k is generated, and the genes k, 2k, 3k , : : : are randomly
changed more widespread
3 For each gene, the next implementation in the implementation list
(ordered by the aspect ratios of the implementations) is chosen; the
operator executes a rotation of all the modules radical transformation
The classical two-cuts cross-over operator is adopted:
Two members X and Y are first selected (e.g. by roulette wheel
technique) such that better members have a higher selection probability
Two numbers i and j (i < j) in [0 n] are then randomly generated and a
new individual Z is created; for the basic rectangles from 0 to i
implementations from X are inhertited used while the rest are derived
from Y TE
OF
TECHNO
LO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
A hybrid GA using heuristic operators HO1 and HO2 has been developed
yog, km
s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 561 / 565
Other aspects of FP
Section outline
54 Other aspects of FP
Complexity considerations for floorplanning
P admissibility
Compactness of placement
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 562 / 565
Other aspects of FP Complexity considerations for floorplanning
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 563 / 565
Other aspects of FP
P admissibility
P admissibility
Definition (P admissibility)
Representation is P -admissible if:
The solution space is finite
Every solution is feasible
Packing and cost evaluation can be done in polynomial time
The best evaluated packing in the space corresponds to an
optimal placement
The geometric relation between each pair of modules is defined in
the placement
Example
Non P admissible representations Slicing tree, Normalized Polish
expression, O-tree, B -tree and Corner block list OF
TECHNO
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 564 / 565
Other aspects of FP Compactness of placement
Compactness of placement
TECHNO
OF LO
TE
GY
ITU
IAN INST
KH
ARAGPUR
IND
19 5 1
yog, km s kOflm^
Chittaranjan Mandal (IIT Kharagpur) CAD for VLSI August 16, 2016 565 / 565