100 likes | 264 Views
Outline Multi-Level Logic Optimization Local Transformations Weak Division Goal Understand multi-level optimization Understand local transformations Understand weak division. Logic Synthesis 3. Often prefer random logic over PLA faster, less area, lower power, ... example
E N D
Outline Multi-Level Logic Optimization Local Transformations Weak Division Goal Understand multi-level optimization Understand local transformations Understand weak division Logic Synthesis 3
Often prefer random logic over PLA faster, less area, lower power, ... example C2670 has 233 inputs, 140 outputs would require huge sparse PLA random logic is 1193 gates, depth of 33 Two-level logic is unsuitable for random logic high fan-in gates are big and slow Transform two-level to multi-level logic permit more functions than AND, OR Multi-Level Logic Optimization
Rule-based local transformations apply transformation that reduces cost repeat until no rules fire IBM Logic Synthesis System Trimeter Design Assistant Transformations reduce size, power, delay Problems rule set development more rules is better verification that rules completely explore design space Local Optimization Specification Simple translation Expansion AND/OR simplification Common subexpr. elim. Constant propagation AND/OR Level NAND(NOR) simplification Common subexpr. elim. NAND(NOR) Level Technology Mapping
AND/OR Transformations reduce size, critical path NOT(NOT(a)) => a AND(a, NOT(a)) => 0 OR(a, NOT(a)) => 1 OR(a, AND(NOT(a), b)) => OR(a,b) XOR(PARITY(a1,...,an), b) => PARITY(a1,...,an, b) AND(a, 1) => a OR(a, 1) => 1 etc. NAND(NOR) Translation AND/OR Transformations a a a 1 b b b
IBM was targeting NAND and NOR gate arrays all gates one type eliminated need for technology mapping step NAND(NOR) Transformations a a b b c c a b a c b a b d c d
while not done { for all transformation rules for all nodes in current circuit if rule can be applied at node insert (rule, node) into ordered list order by cost reduction if (no rules reduce cost) done else apply rule with largest cost reduction } Example Algorithm Flow in Each Level
Complexity is too high? R rules, C circuit nodes O(RC log RC) to order rules RC to identify rules RC log RC to order rules by cost reduction must repeat for every many rule applications Solution: lazy evaluation only need to check few circuit nodes affected by last rule application if cost evaluation can be done locally potential problem if checking longest path delay O(R log R) per rule application potentially reduce further Algorithm Analysis
Weak Division divide out common subexpressions reduces literal count GE Socrates Global Optimization look at all equations at once Global Optimization - Weak Division f1 = aef + bef + ceg f2 = aeg + bg + def Original equations 17 literals Subexp ef a+b ae eg literals saved 4 2 2 2 Generate candidate subexpressions Select subexpression t1 = ef Divide functions by subexpressions f1 = (a + b)t1 + ceg f2 = aeg + bg + dt1 t1 = ef Equations after first iteration 13 literals
Weak Division f1 = (a + b)t1 + ceg f2 = aeg + bg + dt1 t1 = ef Two-level equation converts to multi-level equation Equations after first iteration 13 literals Subexp eg literals saved 2 Generate candidate subexpressions Select subexpression t2 = eg Divide functions by subexpressions f1 = (a + b)t1 + ct2 f2 = at2 + bg + dt1 t1 = ef t2 = eg • All subexpressions • are unique • => stop Equations after second iteration 11 literals
Candidate generation too expensive to generate them all weak division sort terms in order of size local transformations random selection Candidate selection many “best” candidates, which to select? by most literals saved in Socrates apply “best” rule in LSS can get stuck in local minimum search and backtrack iterative improvement gasp functions in ESPRESSO Cost: 8 Cost: 2 General Optimization Issues