510 likes | 805 Vues
inputs. outputs. combinational logic. Combinational Circuits. The current outputs depend only on the current inputs. NAND. OR. AND. AND. NOR. AND. Combinational Circuits. Acyclic (i.e., feed-forward ) circuits are always combinational . 1. 1. 0. 1. 0. 0. 0. 1. 0. 1.
E N D
inputs outputs combinational logic Combinational Circuits The current outputsdepend only on the current inputs.
NAND OR AND AND NOR AND Combinational Circuits Acyclic (i.e., feed-forward) circuits are always combinational. 1 1 0 1 0 0 0 1 0 1 1 1
Synthesis Design a circuit to meet a specification. • General methodology: optimize by introducing feedback in the substitution/minimization phase. • Developed a tool called CYCLIFY within Berkeley SIS Environment. • Optimizations are significant and applicableto a wide range of circuits.
x x x x 3 2 1 0 Output 0 0 0 0 0 1 0 0 0 1 c 2 0 0 1 0 f 3 0 0 1 1 a d 4 0 1 0 0 5 0 1 0 1 g b 6 0 1 1 0 e 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 Example: 7 Segment Display Inputs
= + + + a x x x x ( x x x ( x x )) 0 2 3 1 2 3 2 0 3 c = + b x ( x x x x ) 0 1 3 1 2 = c + + + x x x x ( x x x ( x x )) f a 1 2 3 3 0 2 0 1 2 d = d + + + x x x x ( x x x ( x x )) 1 2 3 3 1 2 2 0 1 = + + + e x x x x ( x x x x ( x x )) 0 1 2 3 0 1 2 1 0 2 g b = e + + + f x x x ( x x x x x ) 1 2 3 2 0 1 0 1 = g + + x x x ( x x ) 1 2 3 0 2 Example: 7 Segment Display Output
= + + + a x x x x ( x x x ( x x )) 0 2 3 1 2 3 2 0 3 + + + x b x ( x x x x b ) = a 2 1 2 3 2 3 + x c x x c = a 1 2 3 + = x c c d a 1 Substitution Basic minimization/restructuring operation: express a function in terms of other functions. (cost 9) Substitutebintoa: (cost 8) Substitutecintoa: (cost 5) Substitutec, dintoa: (cost 4)
= + + + a x x x x ( x x x ( x x )) 0 2 3 1 2 3 2 0 3 Berkeley SIS Tool { b , c , d , f } + = x c c d a 1 Substitution/Minimization substitutional set Þ target function Þ Þ low-cost expression
d = a c = b a = c = d b = e e = f = g f g Acyclic Substitution Select an acyclic topological ordering:
+ x c c d 1 + x ( x d c ) 0 1 + + x x x x ( x x d ) 0 2 3 2 0 1 + + + x x x x ( x x x ( x x )) 1 2 3 3 1 2 2 0 1 d + b x c 3 + + x x a c d e 1 2 f + a b Acyclic Substitution Select an acyclic topological ordering: = a = b = c = d = e = f = g Area (literal count):37
+ x c c d 1 + x ( x d c ) 0 1 + + x x x x ( x x d ) 0 2 3 2 0 1 + + + x x x x ( x x x ( x x )) 1 2 3 3 1 2 2 0 1 d + b x c 3 + + x x a c d e 1 2 f + a b Acyclic Substitution Select an acyclic topological ordering: = a = b = c = d = e = f = g Nodes at the top benefit little from substitution.
Cyclic Substitution How can we find a cyclic solution that is combinational? = a = b = c ? = d = e = f = g
Cyclic Substitution Simpler Example: Candidates Target
Cyclic Substitution Simpler Example: Candidates Target
Cyclic Substitution Simpler Example: Candidates Target
Search performed outside space of combinational solutions. Terminates on optimal solution* cost12 cost 13 cost 12 cost 14 cost 13 combinational Branch and Bound “Break-Down” approach
cost 17 cost 15 cost 16 not combinational cost 14 cost 13 best solution Branch (without Bounding) “Build-Up” approach Search performed inside space of combinational solutions
+ x c x x c 1 0 3 x e 0 + + x x x x ( x x e ) 0 2 3 2 1 3 x e + ( x + x ) a 1 2 3 f + + x f x ( x x ) 3 2 0 1 + + x a ( x x x ) g 3 2 0 1 + a x b 3 Example: 7 Segment Display Combinational solution: = a = b = c = d = e = f = g Area (literal count): 34
n • for target functions, configurations Branch and Bound • Limit the density of edges a priori • Limit breadth • Tunnel depth-wise (with backtracking) Large search space: Heuristics: (See “The Synthesis of Cyclic Circuits,” DAC, ’03)
Optimization for Area Number of NAND2/NOR2 gatesfor Berkeley SIS vs.CYCLIFYsolutions Based on “script.rugged” sequence and technology mapping.
Optimization for Area and Delay Number of NAND2/NOR2 gates and the Delay of Berkeley SIS vs.CYCLIFY solutions Based on “script.delay” sequence and technology mapping.
Practice • Improvements in area (and consequently power) and delay are significant. • Similar improvements were obtained for larger scale circuits: e.g., the ALU of an 8051 microprocessor. • E.D.A. companies (Altera and Synopsys) have expressed strong interest.
Synthesis Design a circuit to meet a specification. • General methodology: optimize by introducing feedback in the substitution/minimization phase. • Optimizations are significant and applicableto a wide range of circuits.
x x x x 3 2 1 0 Output 0 0 0 0 0 1 0 0 0 1 c 2 0 0 1 0 f 3 0 0 1 1 a d 4 0 1 0 0 5 0 1 0 1 g b 6 0 1 1 0 e 7 0 1 1 1 8 1 0 0 0 9 1 0 0 1 Example: 7 Segment Display Inputs
= + + + a x x x x ( x x x ( x x )) 0 2 3 1 2 3 2 0 3 c = + b x ( x x x x ) 0 1 3 1 2 = c + + + x x x x ( x x x ( x x )) f a 1 2 3 3 0 2 0 1 2 d = d + + + x x x x ( x x x ( x x )) 1 2 3 3 1 2 2 0 1 = + + + e x x x x ( x x x x ( x x )) 0 1 2 3 0 1 2 1 0 2 g b = e + + + f x x x ( x x x x x ) 1 2 3 2 0 1 0 1 = g + + x x x ( x x ) 1 2 3 0 2 Example: 7 Segment Display Output
= + + + a x x x x ( x x x ( x x )) 0 2 3 1 2 3 2 0 3 + + + x b x ( x x x x b ) = a 2 1 2 3 2 3 + x c x x c = a 1 2 3 + = x c c d a 1 Substitution/Minimization Basic minimization/restructuring operation: express a function in terms of other functions. (cost 9) Substitute b into a: (cost 8) Substitute c into a: (cost 5) Substitute c, d into a: (cost 4)
= + + + a x x x x ( x x x ( x x )) 0 2 3 1 2 3 2 0 3 Berkeley SIS Tool { b , c , d , f } + = x c c d a 1 Substitution/Minimization substitutional set Þ target function Þ Þ low-cost expression
d = a c = b a = c = d b = e e = f = g f g Acyclic Substitution Select an acyclic topological ordering:
+ x c c d 1 + x ( x d c ) 0 1 + + x x x x ( x x d ) 0 2 3 2 0 1 + + + x x x x ( x x x ( x x )) 1 2 3 3 1 2 2 0 1 d + b x c 3 + + x x a c d e 1 2 f + a b Acyclic Substitution Select an acyclic topological ordering: = a = b = c = d = e = f = g Cost (literal count):37
+ x c c d 1 + x ( x d c ) 0 1 + + x x x x ( x x d ) 0 2 3 2 0 1 + + + x x x x ( x x x ( x x )) 1 2 3 3 1 2 2 0 1 d + b x c 3 + + x x a c d e 1 2 f + a b Acyclic Substitution Select an acyclic topological ordering: = a = b = c = d = e = f = g Nodes at the top benefit little from substitution.
+ x c c d 1 x e 0 f + + x a x x g e 2 0 2 + + x e x a x g 1 2 3 + x cd b 3 + x e e g 2 + a b f Cyclic Substitution Try substituting every other function into each function: = a = b = c = d = e = f = g Not combinational! Cost (literal count): 30
Cost 37 Acyclic substitution Upper bound Cyclic solution? Cost 34 Unordered substitution Lower bound Cost 30
+ x c x x c 1 0 3 x e 0 + + x x x x ( x x e ) 0 2 3 2 1 3 x e + ( x + x ) a 1 2 3 f + + x f x ( x x ) 3 2 0 1 + + x a ( x x x ) g 3 2 0 1 + a x b 3 Cyclic Substitution Combinational solution: = a = b = c = d = e = f = g Cost (literal count): 34
+ x c x x c 1 0 3 x e 0 + + x x x x ( x x e ) 0 2 3 2 1 3 x e + ( x + x ) a 1 2 3 f + + x f x ( x x ) 3 2 0 1 + + x a ( x x x ) g 3 2 0 1 + a x b 3 Cyclic Substitution Combinational solution: = a = b = c = d = e = f = g Cost (literal count): 34 topological cycles
= c + x c x x c 1 0 3 = e x e 0 = + + e x x x x ( x x e ) 0 2 3 2 1 3 = e x e + ( x + x ) a 1 2 3 f = + + x f x ( x x ) 1 3 2 0 1 + + = + x a ( x x x ) g a g 3 2 0 1 + = + a x b a b 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,0,1,0]: = a = b = c = d = e = f = g no electrical cycles Cost (literal count):34
= = 0 c + x c x x c 1 0 3 = = 1 e x e 0 = = 1 + + e x x x x ( x x e ) 0 2 3 2 1 3 = = 1 e x e + ( x + x ) a 1 2 3 f = = + + x f x ( x x ) 1 1 3 2 0 1 + + = + = x a ( x x x ) g a g 1 3 2 0 1 + = + = a x b a b 0 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,0,1,0]: = a = b = c = d = e = f = g no electrical cycles Cost (literal count):34
c = = 0 c + x c x x c 1 0 3 = = 1 e x e f a 0 d = = 1 + + e x x x x ( x x e ) 0 2 3 2 1 3 = = 1 e x e + ( x + x ) a g 1 2 3 b e f = = + + x f x ( x x ) 1 1 3 2 0 1 + + = + = x a ( x x x ) g a g 1 3 2 0 1 + = + = a x b a b 0 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,0,1,0]: = a = b = c = d = e = f = g Cost (literal count):34
c = = 0 c + x c x x c 1 0 3 = = 1 e x e 0 f a = = 1 + + e x x x x ( x x e ) d 0 2 3 2 1 3 = = 1 e x e + ( x + x ) a 1 2 3 g b f = = + + x f x ( x x ) 1 1 e 3 2 0 1 + + = + = x a ( x x x ) g a g 1 3 2 0 1 + = + = a x b a b 0 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,0,1,0]: = a = b = c = d = e = f = g Cost (literal count):34
c = = 0 c + x c x x c 1 0 3 = = 1 e x e 0 f a = = 1 + + e x x x x ( x x e ) d 0 2 3 2 1 3 = = 1 e x e + ( x + x ) a 1 2 3 g b f = = + + x f x ( x x ) 1 1 e 3 2 0 1 + + = + = x a ( x x x ) g a g 1 3 2 0 1 + = + = a x b a b 0 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,0,1,0]: = a = b = c = d = e = f = g Cost (literal count):34
+ x c x x c 1 0 3 x e 0 + + x x x x ( x x e ) 0 2 3 2 1 3 x e + ( x + x ) a 1 2 3 f + + x f x ( x x ) 3 2 0 1 + + x a ( x x x ) g 3 2 0 1 + a x b 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,1,0,1]: = a = b = c = d = e = f = g Cost (literal count):34
= c + x c x x c 1 0 3 = 0 x e 0 = + + 1 x x x x ( x x e ) 0 2 3 2 1 3 = a x e + ( x + x ) a 1 2 3 f = + + x f x ( x x ) f 3 2 0 1 + + = x a ( x x x ) g a 3 2 0 1 + = + a x b a b 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,1,0,1]: = a = b = c = d = e = f = g no electrical cycles Cost (literal count):34
= = 1 c + x c x x c 1 0 3 = = 0 0 x e 0 = = 1 + + 1 x x x x ( x x e ) 0 2 3 2 1 3 = = 1 a x e + ( x + x ) a 1 2 3 f = = + + x f x ( x x ) f 1 3 2 0 1 + + = = x a ( x x x ) g a 0 3 2 0 1 + = + = a x b a b 1 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,1,0,1]: = a = b = c = d = e = f = g no electrical cycles Cost (literal count):34
c = = 1 c + x c x x c 1 0 3 = = 0 0 x e f a 0 d = = 1 + + 1 x x x x ( x x e ) 0 2 3 2 1 3 = = 1 a x e + ( x + x ) a g 1 2 3 b e f = = + + x f x ( x x ) f 1 3 2 0 1 + + = = x a ( x x x ) g a 0 3 2 0 1 + = + = a x b a b 1 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,1,0,1]: = a = b = c = d = e = f = g Cost (literal count):34
= = 1 c + x c x x c 1 0 3 = = 0 0 x e 0 = = 1 + + 1 x x x x ( x x e ) 0 2 3 2 1 3 = = 1 a x e + ( x + x ) a 1 2 3 f = = + + x f x ( x x ) f 1 3 2 0 1 + + = = x a ( x x x ) g a 0 3 2 0 1 + = + = a x b a b 1 3 Cyclic Substitution Inputs x3, x2, x1, x0 = [0,1,0,1]: c = a = b f a = c d = d g b = e e = f = g Cost (literal count):34
= = + a x x x + x ( x + x ) a x b x x 1 2 3 2 1 3 3 2 3 = = + b x x x x ( x x ) b x x x x c + + 1 2 3 1 2 3 1 2 3 1 = = + + + c x ( x x ) x x c x a x x 3 1 2 1 2 1 2 3 Synthesis Strategy: • Allow cycles in the substitution phase of logic synthesis. • Find lowest-cost combinational solution. Solution: Collapsed: Cost: 13 Cost: 17
Exclude edges Search performed outside space of combinational solutions cost 12 cost 13 cost 12 cost 14 cost 13 combinational Branch and Bound “Break-Down” approach
Include edges Search performed inside space of combinational solutions cost 17 cost 15 cost 16 not combinational cost 14 cost 13 best solution Branch and Bound “Build-Up” approach
Implementation: CYCLIFY Program • Incorporated synthesis methodology in a general logic synthesis environment (Berkeley SIS package). • Trials on wide range of circuits • randomly generated • benchmarks • industrial designs. • Consistently successful at finding superior cyclic solutions.
Benchmark Circuits Circuit # Inputs # Outputs Berkeley Simplify Caltech Cyclify Improvement dc1 4 7 39 34 12.80% ex6 8 11 85 76 10.60% p82 5 14 104 90 13.50% t4 12 8 109 89 18.30% bbsse 11 11 118 106 10.20% sse 11 11 118 106 10.20% 5xp1 7 10 123 109 11.40% s386 11 11 131 113 13.70% dk17 10 11 160 136 15.00% apla 10 12 185 131 29.20% tms 8 16 185 158 14.60% cse 11 11 212 177 16.50% clip 9 5 213 189 11.30% m2 8 16 231 207 10.40% s510 25 13 260 227 12.70% t1 21 23 273 206 24.50% ex1 13 24 309 276 10.70% exp 8 18 320 262 18.10% Cost (literals in factored form) of Berkeley SIS Simplifyvs.Cyclify
Benchmarks Example:EXP circuit cost measured by the literal count in the substitute/minimize phase Acyclic Solution (BerkeleySIS): cost 320 Cyclic Solution (CaltechCYCLIFY): cost 262
Discussion • A new definition for the term “combinational circuit”: a directed, possibly cyclic, collection of logic gates. • Most circuits can be optimized with feedback. • Optimizations are significant. Paradigm shift: