Modelcore
Boolean network
Also called multi-level logic network.
A directed acyclic graph of nodes each with a local Boolean function of its fanins, the model of multi-level logic synthesis.
A Boolean network is the model of a combinational circuit that multi-level logic synthesis works on. It is a directed acyclic graph whose sources are the primary inputs, and each other node holds a local Boolean function of the nodes that feed it, usually as a small sum of products. Some nodes are marked as primary outputs. A node can hold any function, so the model sits between a single sum of products per output (two levels) and a gate-level Boolean circuit (fixed gates). The MIS system of Brayton, Rudell, Sangiovanni-Vincentelli and Wang (1987) made it the common data of logic synthesis, and the later and-inverter graph is a Boolean network with one kind of node.
The machine
Here the machine is the network itself: what its parts are, what function it computes, and which steps change it.
Structure. A Boolean network has a finite set of primary inputs , a finite set of internal nodes, and a directed acyclic graph . The fanins of a node are , and its fanouts are the nodes that it feeds. A primary input has no fanin. A list of nodes are the primary outputs. The graph must be acyclic, which makes the circuit combinational.
Local functions. Each node with fanins holds a local function . MIS and SIS store as a sum of products over the literals and , so a node can use each fanin in either phase and no separate inverter node is needed.
Global functions. Each node computes a global function of the primary inputs. For a primary input , and for an internal node
This is well defined because is acyclic: the nodes can be put in topological order, and each is computed after the global functions of its fanins. The network realizes the multiple-output function . Two networks with the same inputs and outputs are equivalent when they realize the same function.
Steps of synthesis. The model does not have one machine step as a model of computation does. In its place, synthesis changes the network by a few operations, each of which keeps the function of every primary output. The names below are those of MIS.
- Eliminate. Substitute the local function of a node into its fanouts and delete the node.
- Decompose and factor. Split a large local function into several nodes, for example with algebraic division.
- Extract. Make a new node for a divisor that several nodes share, as in kernel extraction.
- Substitute. Rewrite a node with an existing node as a new fanin.
- Simplify. Minimize a local function with the don't-care conditions that the rest of the network allows, such as the observability don't-cares.
Sequential networks. SIS adds latches. A network with latches may have cycles, but every cycle must pass through a latch. Cutting each latch into a new primary input and a new primary output gives a combinational network again. Retiming moves the latches of such a network.
What it counts
A Boolean network has no single cost. Tools count these:
- Literals. The number of literals of all local functions. The SOP count adds the literals of each SOP. The factored-form count writes each local function as a formula of AND and OR over literals and counts its leaves. MIS uses the factored-form count as the estimate of area before technology mapping. For example, has 8 SOP literals, and its factored form has 4.
- Nodes and edges. The size of and of . For an and-inverter graph, where every node is a 2-input AND, the node count is the main cost.
- Depth. The largest number of internal nodes on a path from a primary input to a primary output. It is the estimate of delay before mapping, and the DAG longest path computes it in time.
- Fanout. The number of fanouts of a node, a proxy for load and wiring.
These counts only estimate the cost of the final circuit. The real area and delay depend on technology mapping and on the layout.
Example: two networks for a full adder. The inputs are . The outputs are the sum and the carry .
| node | local function | literals |
|---|---|---|
| 4 | ||
| 4 | ||
| 2 | ||
| 2 | ||
| 2 |
This network has 5 internal nodes, 14 literals and depth 3, on the path . Eliminating every internal node except the outputs gives the two-level network
with 2 nodes, literals and depth 1. Each SOP here is a minimum one: parity has exactly one cover, its four minterms, and a search over all covers of majority with at most three cubes finds none with fewer than 6 literals. So the multi-level network is smaller in literals and deeper. A check of all 8 input vectors confirms that both networks realize the full adder.
Relation to other models
- Two-level logic. A sum of products per output is a Boolean network with one internal node per output, whose fanins are all primary inputs. Two-level logic minimization optimizes this special case.
- Boolean circuit. A Boolean circuit is a Boolean network whose local functions come from a fixed basis, such as AND, OR and NOT with two inputs. A network allows any local function. Replacing each local SOP by AND and OR gates turns a network into a circuit with at most three gates per literal: one NOT for a complemented literal, one AND to join it to its cube, and one OR to join a cube to the sum.
- And-inverter graph and majority-inverter graph. The and-inverter graph allows only 2-input AND nodes and puts inverters on the edges. The majority-inverter graph uses 3-input majority nodes. Both are Boolean networks with a small fixed basis, which makes hashing and local rewriting simple.
- Binary decision diagram. A binary decision diagram is also a DAG, but each node is a multiplexer on one variable, and the reduced ordered form is canonical. A Boolean network is not canonical: many networks realize the same function, and the search among them is the task of synthesis.
- Mapped netlist. After technology mapping, each node is a cell of a library or a lookup table of an FPGA. The netlist is still a Boolean network, with the local functions fixed by the cells.
Known results in the model
Evaluation. One input vector is simulated in one pass in topological order, in time linear in the number of literals and nodes. On a word RAM with words of bits, bit-parallel simulation runs vectors at once with the same number of word operations. So the truth tables of all nodes take word operations, where is the number of literals, and the depth takes linear time.
Equivalence is co-NP-complete. Deciding whether two networks are equivalent is co-NP-complete when the local functions are given as SOPs. It is in co-NP, since an input vector on which an output differs is a certificate, and it is checked by one simulation of each network. It is co-NP-hard: for a formula in conjunctive normal form, build one node for each clause, whose SOP is the sum of the literals of the clause, and one output node, whose SOP is the single cube of all clause nodes. This network is equivalent to the constant 0 network exactly when is unsatisfiable, and the unsatisfiable formulas form a co-NP-complete set by the Cook-Levin theorem. Boolean equivalence checking and SAT solvers decide it in practice.
Most functions need large networks. For , at most a fraction of the functions of variables are realized by a network of at most nodes with two fanins each. Proof. Pad a smaller network with unused nodes, so that it is enough to count networks of exactly nodes. Each node picks one of 16 local functions of two inputs and two fanins among at most nodes, and one of the nodes is the output. So there are at most such networks. Since , this is at most . For , , so at most functions have such a network, out of . Shannon (1949) introduced this counting argument for relay circuits. It shows that small networks are rare, but it names no hard function. The best explicit lower bounds for circuits are far smaller; see circuit complexity.
Optimization is hard. Finding the smallest network that is equivalent to a given one is at least as hard as deciding equivalence, because the smallest network for a CNF formula , with a new variable , has no literal exactly when is unsatisfiable. The multi-level logic synthesis page gives the bounds for the main forms of the problem.
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 Boolean network as the data of MIS, the local functions as sums of products, and the operations that change the network
- 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 definition of the Boolean network, the literal count in factored form as the cost, and the network transformations
- SIS, a system for sequential circuit synthesis, the Boolean network with latches for sequential circuits
- Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 8, Multiple-Level Combinational Logic Optimization, the models of combinational networks and their transformations
- Claude E. Shannon, The synthesis of two-terminal switching circuits, Bell System Technical Journal 28(1), 1949, pages 59 to 98, the counting argument that most functions of n variables need large circuits
Where this leads
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 | W4 complete |
|
Tag 8KEFG7 Edit this page History Report an error Markdown