1 / 65

ENGG3190 Logic Synthesis “Two Level Logic Synthesis: Heuristics (ESPRESSO)” (Part II)

ENGG3190 Logic Synthesis “Two Level Logic Synthesis: Heuristics (ESPRESSO)” (Part II). Winter 2014 S. Areibi School of Engineering University of Guelph. Outline. Optimality Heuristics ESPRESSO Expand, Reduce, Irredundant Steps Input Format Comparison: QM vs. ESPRESSO.

doria
Download Presentation

ENGG3190 Logic Synthesis “Two Level Logic Synthesis: Heuristics (ESPRESSO)” (Part II)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ENGG3190Logic Synthesis“Two Level Logic Synthesis: Heuristics (ESPRESSO)”(Part II) Winter 2014 S. Areibi School of Engineering University of Guelph

  2. Outline • Optimality • Heuristics • ESPRESSO • Expand, Reduce, Irredundant Steps • Input Format • Comparison: QM vs. ESPRESSO

  3. Exact Algorithm vs. Heuristics

  4. Don’t forget that essential prime implicants should be included in every solution!!

  5. Global Local • Global Optimal versus Local Optimal • By Iterative Improvement we can move from a Local bad solution to yet another Local better solution

  6. Local Search

  7. Local Search HOW?

  8. ESPRESSO • ESPRESSO utilizes modified local search • keep in mind local minimum problem • Composed of three main operations: • Expand, Reduce, Irredundant • Espresso Heuristic (in a nutshell) • Apply Expand and Irredundant operators to: • optimize the current function specification • go down hill  improve the objective function • Uses the Reduce operator to: • get out of local minimum • go up hill  deteriorate the objective function • This is iterated till the solution converges

  9. EXPAND Objective: Take a cube c and make it prime by removing literals. a). Greedy way

  10. Expand expand essentialcubes in F in decreasing size to a prime cube prime cube - fully expanded against OFF-set essential cube - contains essential vertex essential vertex - minterm no other cube covers remove any covered cubes ON 01 11 DC 00 10 OFF ExpandOperation 01 11 Expand 00 10

  11. EXPAND: Check Validity Determining the correct direction of expansion is important!! Expand abc by removing a (results in bc) Is it valid? NO

  12. EXPAND: Objective

  13. Reduce shrink cubes in descending order of size while maintaining cover smaller cubes can expand in more directions smaller cubes more likely to be covered by other cubes during expansion ON 01 11 01 11 DC 00 10 00 10 OFF REDUCE: Cube Operations Reduce

  14. REDUCE Operator: Validate Solutions

  15. REDUCE: Good vs. Bad Problem: Given a cover F and c  F, find the smallest cube c c such that F\{ c } + { c } is still a cover. c is called the maximally reduced cube of c. REDUCE is order dependent on off WHY? Don’t care

  16. REDUCE: Order Dependent Example: Two orders: REDUCE is order dependent !

  17. REDUCE followed by Expand Main Idea: Make a prime not a prime but still maintain cover: {c1 ,…, ci,…, ck}  {c1 ,…,ci,ci+1 ,…,ck } But • Get out of a local minimum (prime and irredundant is local minimum) • Then have nonprimes, so can expand again in different directions. (Since EXPAND is “smart”, it may know best direction)

  18. Reduce + Expand: Example

  19. Redundant Prime Implicant (RPI) • If each minterm subsuming a prime implicant (PI) is also covered by other essential prime implicants, then that PI is called a redundant prime implicant (RPI). • Also called redundant prime cube (RPC). A EPI C RPI B

  20. Irredundant Cubes • Let F = {c1, c2, …, ck} be a cover for f, i.e. f = ik=1ci A cube ci F is irredundant if F\{ci}  f Example: f = ab + ac + bc ac bc bc Not covered ab ac c b F\{ab}  f a

  21. IRREDUNDANT Problem: Given a cover of cubes {ci}, find a minimal subset {cik} that is also a cover, i.e.

  22. Relatively essential set Er Implicants covering some minterms of the function not covered by other implicants Important remark: we do not know all the primes! Totally redundant set Rt Implicants covered by the relatively essentials Partially redundant set Rp Remaining implicants Find a subset of Rp that, together with Er covers the function. Irredundant: Definitions

  23. α 10 10 11 β 11 10 01 γ 01 11 01 δ 01 01 11 ε 11 01 10 c b a Irredundant: Example • Er = {α, ε} • Rt = ∅ • Rp = {β, γ, δ} Irredundant Cover Minimum Irredundant Cover

  24. Espresso – Irredundant Operator

  25. Irredundant & Minimal Covers

  26. Espresso – Additional Concerns We will cover this Later!

  27. ESPRESSO: Steps x = a’b + ab + a’b’ Expand a’b ab a’b ab a’b’ ab’ a’b’ ab’ Irredundant Reduce a’b ab a’b ab a’b’ ab’ a’b’ ab’ Expand x = a’ + b a’b ab Irredundant a’b ab a’b’ ab’ a’b’ ab’ Cost Stable

  28. ESPRESSO Illustrated

  29. Heuristic Logic Minimization • Apply a sequence of logic transformations to reduce a cost function • Transformations • Expand: • Input expansion • Enlarge cube by combining smaller cubes • Reduces total number of cubes • Output expansion • Use cube for one output to cover another • Reduce: break up cube into sub-cubes • Increases total number of cubes • Hope to allow overall cost reduction in a later expand operation • Irredundant • Remove redundant cubes from a cover

  30. Example: Input Expansion • Expand: input expansion z Redundant! y x On-set member Off-set member

  31. Example: Output Expansion • Expand: output expansion • Two output functions of three variables each with initial covers shown below z z y y x x f1 f2 f1 f2

  32. Espresso – Algorithm

  33. Example of ESPRESSO Input/Output ƒ(A,B,C,D) = m(4,5,6,8,9,10,13) + d(0,7,15) Espresso Input Espresso Output -- # inputs -- # outputs -- input names -- output name -- number of product terms -- A'BC'D' -- A'BC'D -- A'BCD' -- AB'C'D' -- AB'C'D -- AB'CD' -- ABC'D -- A'B'C'D' don't care -- A'BCD don't care -- ABCD don't care -- end of list .i 4 .o 1 .ilb a b c d .ob f .p 3 1-01 1 10-0 1 01-- 1 .e .i 4 .o 1 .ilb a b c d .ob f .p 10 0100 1 0101 1 0110 1 1000 1 1001 1 1010 1 1101 1 0000 - 0111 - 1111 - .e ƒ = A C' D + A B' D' + A' B

  34. How it Works: Interesting Mechanics • The core representation is PCN cube lists • Most operations are those covered in previous lecture (Unate Recursive Paradigm (URP)) • Several heuristic techniques to order cubes (cleaver ordering techniques) • You can easily implement the ESPRESSO heuristic with previous knowledge • The main idea of Expansion is how to avoid expanding in the wrong direction!! • Let’s see the details

  35. EXPAND Step : Details Outline: • Expand one cube, ci , at a time • Build “blocking” matrix B = B ci • See which other cubes cj can be feasibly covered using B. • Choose expansion (literals to be removed) to cover most other cj . Note:

  36. Expanding is covering more 1’s • Covering more 1’s means removing variables from the cube • Removing variables from the cube is essentially less literals!! • How to find XZ’ or XY starting from XYZ’W’? • We will use “Set Covering” technique

  37. Covering problem!! Cover each element more than once. • The covering problem is an Integer Linear Programming problem. • Has many applications in industry: airline scheduling, crew scheduling, oil company vehicle scheduling, VLSI Design … • We will turn the EXPAND problem into a covering problem.

  38. n Min Z = c S Min Z = c S n j j j j j=1 j=1 n n Subject to: a S = 1 i  {1,…m} Subject to: a S =1 i  {1,…m} ij j ij j j=1 j=1 Set Covering and Partitioning Set Covering > Set Partitioning

  39. EXPAND as a Covering Problem • Expand = a Covering Problem on the Blocking Matrix • First: Given function F, build a cube cover of the 0’s in F • Why?: We need to know what our cube cannot touch when it expands!! • How?: URP Complement of the starting cover of the function! • Recall OFF Set, ON Set, DC Set • The Blocking Matrix will help us avoid expansion in the wrong direction. • We will start to expand from the Cube W’XYZ’ (since it is the worst!!) • This is exactly the same step in ESSPRESSO! • URP Complement will give me the grey Cubes

  40. Building the Blocking Matrix • Expand = a Covering Problem on the Blocking Matrix • One row for each variable in the cube you are trying to expand • One Column for each cube in the cover of the OFF set. • Put a “1” in the matrix if the cube variable (row) <> polarity of variable in the cube (column) of the OFF cover; else “0”. If don’t care, it’s a “0” (draw blank) 1 1 1 1 1 • Once you build the Blocking Matrix it will help us in avoiding the expansion in the wrong direction. • We might not have too many rows, but we might have many columns in real life problems • What do I do with this Blocking Matrix?

  41. What does a ‘1’ in a row and column really mean? • For example Row #1, if we attempt to remove W’ from W’XYZ’ the Matrix says “be careful” since we will hit WXZ’ or WY’Z’

  42. The Blocking Matrix will assist us in obtaining a legal cube expansion! • If we pick the first row (W’) and the second row (X) then we will cover all the F’ cubes. • So we will end up with W’X and get rid of the Y and Z’ • A second solution would be W’Z’ (1st and 4th rows) • Check the K-Map on the left hand side (where is W’X, W’Z’?)

  43. The Reduce-Expand-Irredundant Can lead to excellent solutions. • Clever tricks and elegant heuristics. • Lots of usage of covering problems.

  44. Besides ESPRESSO there are other similar tools that can produce good solutions and based on heuristic techniques.

  45. QUINE McCLUSKY Exact Method for Logic Minimization Compute Time is prohibitive for Minimizations (Doubly Exponential) Times-out for medium complexity benchmarks ESPRESSO Heuristic Method for Logic Minimization Based on Unate Recursive Paradigm Inferior to Quine McClusky in minimization Some sacrifice in optimization for a large reduction in run time Relatively unchanged for 20 years. Comparison Performance Comparison Between Quine McClusky and Espresso

  46. ESPRESSO :: Conclusion • The algorithm successively generates new covers until no further improvement is possible. • Produces near-optimal solutions. • Used for: • PLA minimization, or • as a sub-function in multilevel logic minimization. • Can process very large circuits. • 10,000 literals, 100 inputs, 100 outputs • Less than 15 minutes on a high-speed workstation

  47. Extra Slides

More Related