1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003.

Slides:



Advertisements
Similar presentations
Analysis of Algorithms
Advertisements

Logic Synthesis Technology Mapping.
Polynomial-time reductions We have seen several reductions:
NP-Completeness: Reductions
The Theory of NP-Completeness
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
ECE 667 Synthesis & Verification - SAT 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Boolean SAT CNF Representation Slides adopted (with.
CSC5160 Topics in Algorithms Tutorial 2 Introduction to NP-Complete Problems Feb Jerry Le
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
ECE 667 Synthesis and Verification of Digital Systems
February 23, 2015CS21 Lecture 201 CS21 Decidability and Tractability Lecture 20 February 23, 2015.
1 Boolean Satisfiability in Electronic Design Automation (EDA ) By Kunal P. Ganeshpure.
1 Polynomial Church-Turing thesis A decision problem can be solved in polynomial time by using a reasonable sequential model of computation if and only.
Technology Mapping.
NP-Complete Problems Reading Material: Chapter 10 Sections 1, 2, 3, and 4 only.
1 Polynomial Time Reductions Polynomial Computable function : For any computes in polynomial time.
The Theory of NP-Completeness
NP-Complete Problems Problems in Computer Science are classified into
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
ECE Synthesis & Verification 1 ECE 667 ECE 667 Synthesis and Verification of Digital Systems Exact Two-level Minimization Quine-McCluskey Procedure.
ECE Synthesis & Verification, Lecture 17 1 ECE 697B (667) Spring 2006 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Technology.
Combinational Logic Design
1 VLSI CAD Flow: Logic Synthesis, Lecture 13 by Ajay Joshi (Slides by S. Devadas)
Tautology. Tautology Decision May be able to use unateness to simplify process Unate Function – one that has either the uncomplemented or complemented.
SAT Solver Math Foundations of Computer Science. 2 Boolean Expressions  A Boolean expression is a Boolean function  Any Boolean function can be written.
MCS312: NP-completeness and Approximation Algorithms
Fixed Parameter Complexity Algorithms and Networks.
1 The Theory of NP-Completeness 2012/11/6 P: the class of problems which can be solved by a deterministic polynomial algorithm. NP : the class of decision.
Nattee Niparnan. Easy & Hard Problem What is “difficulty” of problem? Difficult for computer scientist to derive algorithm for the problem? Difficult.
Combinatorial Algorithms Unate Covering Binate Covering Graph Coloring Maximum Clique.
MCS 312: NP Completeness and Approximation algorithms Instructor Neelima Gupta
Lecture 22 More NPC problems
The Complexity of Optimization Problems. Summary -Complexity of algorithms and problems -Complexity classes: P and NP -Reducibility -Karp reducibility.
CSCI 2670 Introduction to Theory of Computing November 29, 2005.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
NP-COMPLETENESS PRESENTED BY TUSHAR KUMAR J. RITESH BAGGA.
1 Lower Bounds Lower bound: an estimate on a minimum amount of work needed to solve a given problem Examples: b number of comparisons needed to find the.
EMIS 8373: Integer Programming NP-Complete Problems updated 21 April 2009.
1 The Theory of NP-Completeness 2 Cook ’ s Theorem (1971) Prof. Cook Toronto U. Receiving Turing Award (1982) Discussing difficult problems: worst case.
Unit 9: Coping with NP-Completeness
NP-Complete Problems. Running Time v.s. Input Size Concern with problems whose complexity may be described by exponential functions. Tractable problems.
1 Technology Mapping Example: t t 1 = a + bc; t 2 = d + e; t 3 = ab + d; t 4 = t 1 t 2 + fg; t 5 = t 4 h + t 2 t 3 ; F = t 5 ’; This shows an unoptimized.
NP-complete Problems Prof. Sin-Min Lee Department of Computer Science.
Technology Mapping. 2 Technology mapping is the phase of logic synthesis when gates are selected from a technology library to implement the circuit. Technology.
NP-Completeness (Nondeterministic Polynomial Completeness) Sushanth Sivaram Vallath & Z. Joseph.
CS 3343: Analysis of Algorithms Lecture 25: P and NP Some slides courtesy of Carola Wenk.
Example: Base Functions & Pattern Trees inv 1 nand3 3 oai21 3 nor2 2nand2 2 Base Functions: Pattern Trees:
1 CSE 326: Data Structures: Graphs Lecture 24: Friday, March 7 th, 2003.
1 CPSC 320: Intermediate Algorithm Design and Analysis July 30, 2014.
NPC.
CSC 413/513: Intro to Algorithms
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
CSCI 2670 Introduction to Theory of Computing December 2, 2004.
CSE 421 Algorithms Richard Anderson Lecture 27 NP-Completeness Proofs.
COSC 3101A - Design and Analysis of Algorithms 14 NP-Completeness.
COMPLEXITY. Satisfiability(SAT) problem Conjunctive normal form(CNF): Let S be a Boolean expression in CNF. That is, S is the product(and) of several.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Logic Gates and Boolean Algebra Introduction to Logic II.
 2005 SDU Lecture15 P,NP,NP-complete.  2005 SDU 2 The PATH problem PATH = { | G is a directed graph that has a directed path from s to t} s t
TU/e Algorithms (2IL15) – Lecture 10 1 NP-Completeness, II.
NP-Completeness A problem is NP-complete if: It is in NP
NP-completeness Ch.34.
P & NP.
Richard Anderson Lecture 26 NP-Completeness
ICS 353: Design and Analysis of Algorithms
SAT-Based Area Recovery in Technology Mapping
Sungho Kang Yonsei University
ECE 667 Synthesis and Verification of Digital Systems
Technology Mapping I based on tree covering
Presentation transcript:

1 Technology Mapping as a Binate Covering Problem Slides adapted from A. Kuehlmann, UC Berkeley 2003

2 Circuit as DAG (Subject Graph) A Directed Acyclic Graph, also called a DAG, is a directed graph with no directed cycles; that is, for any vertex v, there is no nonempty directed path starting and ending on v. c a b o1 o2

3 Pattern Graphs used for the cover inv(1) nand3 (3) oai21 (3) nor(2) nor3 (3) aoi21 (3) nand2(2) (cost)

4 Binate Covering Problem: Example c m8m a b o1o1 m9m9 m 10 o2o2 GateCostInputProducesCovers m1m1 inv1ag1g1 g1g1 m2m2 1bg2g2 g2g2 m3m3 nand22g 1, g 2 g3g3 g3g3 m4m4 nand22a, bg4g4 g4g4 m5m5 nand22g 3, g 4 g5g5 g5g5 m6m6 inv1g4g4 g6g6 g6g6 m7m7 nand22g 6, cg7g7 g7g7 m8m8 nand33a, bg7g7 g 4, g 6, g 7 m9m9 xnor25a, bg5g5 g 1, g 2, g 3, g 4, g 5 m 10 oai213a, b, g 4 g5g5 g 1, g 2, g 3, g 5

5 Binate Covering Problem Compute all possible matches {m k } for each node. Using a variable m i for each match of a pattern graph in the subject graph, (m i = 1 if match is chosen; m i = 0 otherwise) Write a clause for each node of the subject graph indicating which matches cover this node. Each node has to be covered. –e.g., if a subject node is covered by matches {m 2, m 5, m 10 }, then the clause would be (m 2 + m 5 + m 10 ). Repeat for each subject node and take the product over all subject nodes (CNF). m 1 m 2... m k n1n2...nln1n2...nl nodes

6 Binate Covering Problem: Example Generate constraints that each node n i be covered by some match. (m 1 + m 9 + m 10 )(m 2 + m 9 + m 10 )(m 3 + m 9 + m 10 )(m 4 + m 8 + m 9 ) (m 5 + m 9 + m 10 )(m 6 + m 8 ) (m 7 + m 9 ) m1m1 m2m2 m3m3 m4m4 m5m5 m6m6 m7m7 m8m8 m9m9 m 10 n1n n2n n3n n4n n5n n6n n7n

7 Binate Covering A Unate Covering Problem is a product-of-sums expression, containing Boolean propositions (i.e. variables which can have value 0 or 1).The propositions are all “uncomplemented.” For example: P = (P1 + P3)(P1 + P4 + P5)(P6 + P8)  A BINATE COVERING PROBLEM is similar, but now the propositions can be both “uncomplemented” and “complemented.” For example: P = (P1' + P3)(P1 + P4' + P5)(P2 + P5)(P2' + P3')

8 Create Outputs for a Legal Cover Any satisfying assignment guarantees that all subject nodes are covered, but It does not guarantee that other matches create outputs needed as inputs for a given match (legal covering). Rectify this by adding additional clauses. not an output of a chosen match

9 Binate Covering Problem Let match m i have subject nodes s i1,…,s in as inputs. If m i is chosen, one of the matches that realizes s ij must also be chosen for each intermediate input j Let S ij be the disjunctive expression in the variables m k giving the possible matches which realize s ij as an output node. Selecting match m i implies satisfying each of the expressions S ij for j = 1 … n. This can be written as: ( m i  (S i1 … S in ) )  (  m i + (S i1 … S in ) )  ((  m i + S i1 ) … (  m i + S in ) ) mimi s i1 s ij s in

10 Binate Covering Problem: Example For example, selecting m3 requires that: a match be chosen which produces g2 as an output, and a match be chosen which produces g1 as an output. The only match which produces g1 is m1; same for g2 and m2, etc. So, two extra clauses are required: c a b o1o1 o2o2

11 Binate Covering: Example Finally, we get: seven additional clauses. Note: –A match which requires a primary input as an input is satisfied trivially. –Matches m 1,m 2,m 4,m 8,m 9 are driven only by primary inputs and do not require additional clauses c m8m a b o1o1 m9m9 m 10 o2o2

12 Binate Covering Problem An assignment of values to variables m i that satisfies P, the above covering expression, is a legal graph cover. For area optimization, each match m i has a cost c i : the area of the gate the match represents. The goal is a satisfying assignment with the least total cost. –Find a least-cost prime: if a variable m i = 0 its cost is 0, else its cost is c i m i = 1 means that match i is chosen m i = 0 means that match i is not chosen

13 Binate Covering: Example The least cost prime implicant is: This uses two gates for a cost of eight gate units, for matches: m 8 (nand3) and m 9 (xnor2). c m8m a b o1o1 m9m9 m 10 o2o2 Note that the node g 4 is covered by both matches

14 Summary Given a subject graph, the binate covering provides the exact solution to the technology-mapping problem. Finding a feasible solution to a binate covering is NP-complete. Problems that are NP-complete can be solved by algorithms that run in exponential time. No polynomial time algorithms are known to exist for any of the NP-complete problems and it is very unlikely that polynomial time algorithms should indeed exist although nobody has yet been able to prove their non-existence.