Problemcore
Multi-level logic synthesis
Also called multi-level logic optimization.
Restructure a Boolean network into an equivalent one with fewer literals, less depth or less power, by factoring, extraction and don't-care optimization.
Multi-level logic synthesis takes a Boolean network, a circuit of nodes with local functions, and looks for an equivalent network that costs less: fewer literals or nodes, which estimate area, or fewer levels, which estimate delay. It is the step of a chip design flow between the description of the logic and technology mapping. Unlike two-level logic minimization, the result may have any number of levels, so a function can share and reuse its parts, and the search space is much larger. The problem is hard in each common form: deciding whether a network can lose all its literals is already co-NP-hard, and minimum formulas are -complete under Turing reductions (Buchfuhrer and Umans 2011). All practical methods are heuristics that change the network in small steps, each of which keeps the function. The MIS system (Brayton, Rudell, Sangiovanni-Vincentelli and Wang 1987) set the pattern with algebraic factoring and don't-care simplification, and later tools such as ABC work on and-inverter graphs.
In plain words
A circuit is a set of small logic blocks, where each block reads some wires and drives a new wire. Many different circuits do the same job. Some use fewer parts, and some give their answer after fewer steps. The task is to take a working circuit and find a cheaper one that gives the same answer for every input. A tool does this in small moves. It pulls out a part that two blocks both compute and builds it once. It writes a block in a shorter form, like taking out a common factor in algebra. It uses the inputs where a block's answer is never seen to make the block simpler. Each move keeps the answers the same, so the tool can stop at any time with a correct circuit. No known method finds the cheapest circuit for large designs.
Definition
Input. A Boolean network with primary inputs and primary outputs , with global functions . Optionally, an external don't-care set for each output.
Feasible solutions. A Boolean network on the same inputs and outputs, with global functions , such that
With no external don't-cares, is equivalent to .
Objective. Minimize a cost . The classic cost is the number of literals of all local functions in factored form. Other costs are the number of nodes of an and-inverter graph, the depth, a weighted sum, or the literal count under a bound on the depth.
Decision version. Given , the don't-care sets and an integer , is there a feasible with ?
Variants
- By the cost. Area (literals in factored form, or AIG nodes), delay (depth, or depth with a delay per node), or power (an estimate of the switching activity of each node).
- By the node functions. Any local function, as in MIS and SIS. A fixed basis, such as 2-input AND with inverted edges in an and-inverter graph, or 3-input majority in a majority-inverter graph. With a complete basis of 2-input gates, the problem is the minimum circuit problem.
- By the input form. A network, a set of SOPs, or a truth table. The input form changes the complexity, as under Bounds.
- Technology-independent or mapped. The classic problem ignores the cell library. When the cost is the area or delay of library cells or lookup tables, the problem becomes technology mapping or LUT mapping, usually solved after this one.
- Sequential. With latches, the latches may also move, as in retiming, and the unreachable states give extra don't-cares.
- Exact on small functions. For functions of a few inputs, exact synthesis finds a minimum network over a fixed basis.
Examples
Each example was checked on all input vectors by a script.
- Factoring. The single node has 8 literals. Since , the factored form has 4.
- Extraction across outputs. The nodes and have 10 literals. The new node gives and , with literals. Finding is the job of kernel extraction.
- Boolean beats algebraic. The node has 6 literals. The algebraic methods treat and as unrelated letters and never drop a cube. The best algebraic factored form has 5 literals, : a search over all factored forms with at most 4 leaves over the literals found none that multiplies out to these three cubes. The cube is the consensus of and , so as a function, with 4 literals. Removing it needs Boolean reasoning, such as a two-level minimizer.
- Don't-cares. With and the only output , the node is never seen when , and it can become the wire . The observability don't-care page works this out.
- Depth. The AND of as the chain has 3 nodes and depth 3. The tree has 3 nodes and depth 2. AIG balancing makes this change.
- A network that loses every literal. For a CNF formula and a new variable , build the network of with one node per clause. It has an equivalent network with no literal, a constant, exactly when is unsatisfiable. If has a satisfying assignment, the function depends on .
Known algorithms
All of these are heuristics for the full problem: each step keeps the function, and none has a proved bound on the distance to the optimum.
- Algebraic division, algebraic kernels and kernel extraction. Treat each SOP as a polynomial, divide it by kernels, and pull out divisors that several nodes share. Fast, and blind to Boolean identities such as .
- Node simplification with observability don't-cares. Minimize each local SOP with Espresso and the don't-cares from the rest of the network.
- Ashenhurst-Curtis decomposition. Split a function by the distinct columns of a decomposition chart, often for lookup tables.
- AIG balancing and AIG rewriting. Reduce the depth or the node count of an and-inverter graph by local changes on small cuts, with precomputed small networks.
- SAT sweeping. Find nodes with the same function by simulation and SAT, and merge them.
- Exact synthesis. Optimal for a few inputs over a fixed basis, in time exponential in the size of the result.
Tools such as MIS, SIS and ABC run these steps in scripts. Their results are measured on benchmark circuits and are not proved.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| AIG balancing | O(N log k) expected worst | O(N) extra | deterministicnot exactofflinerecursive | 1 language |
| DAG-aware AIG rewriting | O(N^2 C^2) worst | O(N C) extra | deterministicnot exactofflineiterative | 1 language |
| Kernel extraction | O(E P^4 K n) worst | O(P K n) extra | deterministicnot exactofflinerecursive | 1 language |
Bounds
Upper bounds (proved).
- Every function of inputs has a network. Its minterm SOP is one node with at most literals, and the Shannon expansion , applied to the subfunctions level by level, gives a network of fewer than nodes with 4 literals each.
- For a network input and a literal cost, the decision version is in of the polynomial hierarchy: guess with at most literals, and check for all that it agrees with off the don't-care sets. The check is in co-NP.
- For a truth table input and a fixed basis of 2-input gates, the decision version is in NP, since a circuit with at most gates is a certificate checked in time polynomial in . This is the minimum circuit size problem.
Lower bounds (proved, as hardness).
- For a network input, the decision version is co-NP-hard, even for , by the last example above and the co-NP-completeness of unsatisfiability.
- For formulas, the Minimum Equivalent Expression problem, given a formula and , is there an equivalent formula of size at most , is -complete under Turing reductions (Buchfuhrer and Umans 2011). A network in which every node has one fanout is a formula, so this is the fanout-free case of the problem.
- The two-level case is NP-hard for a truth table input and -complete for a DNF input; see two-level logic minimization.
- For a truth table input, it is not known whether the minimum circuit size problem is NP-complete. Kabanets and Cai (2000) showed that a proof of NP-completeness by the usual kind of reduction would give circuit lower bounds for exponential time that are beyond the known methods.
- For , most functions of inputs need more than nodes with two fanins. The Boolean network page proves this by counting.
Measured. The papers on MIS, SIS, ABC and AIG rewriting report literal counts, node counts and depths on benchmark circuits. These are measurements on those sets, not bounds.
Reductions
- From unsatisfiability. The construction in the examples reduces the complement of SAT to the decision version with , in linear time.
- To two-level minimization, by collapsing. Eliminating every internal node gives one SOP per output, which two-level methods can minimize. The SOP can be exponentially larger than the network, as for parity of inputs, which has a network of XOR nodes and needs cubes in two levels.
- To SAT, for exact synthesis. The question "is there a network of nodes for " for a small truth table becomes a SAT instance, which is how exact synthesis works.
- To and from circuits. A network becomes a circuit of 2-input gates with at most three gates per literal, and a circuit is a network with small local functions.
Applications
- Chip design. ASIC flows run technology-independent optimization before technology mapping, and FPGA flows run it before LUT mapping.
- Verification. The same AIG rewriting and SAT sweeping make equivalence and model checking problems smaller before a solver runs.
- High-level synthesis output. The logic that a scheduler and binder produce is a network that this step cleans up.
References
- Robert K. Brayton, Richard Rudell, Alberto Sangiovanni-Vincentelli and Albert R. Wang, MIS, a multiple-level logic optimization system, IEEE Transactions on Computer-Aided Design 6(6), 1987, pages 1062 to 1081, the optimization of a Boolean network for literal count and its operations of factoring, extraction, substitution and simplification
- Robert K. Brayton, Gary D. Hachtel and Alberto L. Sangiovanni-Vincentelli, Multilevel logic synthesis, Proceedings of the IEEE 78(2), 1990, pages 264 to 300, the statement of the multilevel problem, its cost functions, and the algebraic and Boolean methods
- Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 8, Multiple-Level Combinational Logic Optimization
- David Buchfuhrer and Christopher Umans, The complexity of Boolean formula minimization, Journal of Computer and System Sciences 77(1), 2011, pages 142 to 153, the Sigma_2^p-completeness under Turing reductions of the Minimum Equivalent Expression problem
- Valentine Kabanets and Jin-Yi Cai, Circuit minimization problem, Proceedings of the 32nd ACM Symposium on Theory of Computing (STOC), 2000, pages 73 to 79, the circuit minimization problem for a truth table input, and the consequences of a proof of its NP-completeness
- Alan Mishchenko, Satrajit Chatterjee and Robert Brayton, DAG-aware AIG rewriting, a fresh look at combinational logic synthesis, Proceedings of the 43rd Design Automation Conference, 2006, pages 532 to 535, the and-inverter graph as the form of multi-level synthesis, with node count and depth as the costs
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag 9VJ3K1 Edit this page History Report an error Markdown