The idea: treat logic like polynomials and pull out shared factors
A two-level circuit (a sum of products, SOP) can be large. Multilevel synthesis makes it smaller by finding pieces that several functions use, computing each piece once, and letting the functions read it. The tools that do this, MIS and SIS from Berkeley, use the algebraic methods of Brayton and McMullen: an SOP is handled like a polynomial, and a shared piece is found by polynomial division.
The canvas follows the two functions f = ac + ad + bc + bd + e and g = ac + bc + ae + be from start to finish. On the left are their cubes; on the right is the Boolean network (one line per node) and its gates. Divide and Kernels work on the function you choose. Extract Common Kernel and Factor build the network.
Quine–McCluskey and Karnaugh maps find the smallest two-level form of one function. This page starts after that: it builds more levels and shares logic between functions. Multilevel Logic shows how such a network is drawn with NAND and NOR gates.
Cubes, literals and the literal count
A literal is a variable or its complement: a, b'. A cube is a product of literals: ac. The cost measure of SIS is the literal count: the number of literal occurrences. f has 4 cubes of 2 literals and one of 1, so 9 literals; g has 8; together 17. A literal count is a good guess at the area of the final circuit, because every literal becomes a transistor pair in a gate.
In a factored form such as (a + b)(c + d) + e, each literal is written once, so this form of f has 5 literals instead of 9.
Algebraic (weak) division
Algebraic division of f by a divisor d finds a quotient q and a remainder r with f = q·d + r, where q and d have no variable in common and q is as large as possible. It is also called weak division. It works cube by cube:
- For each cube of d, take the cubes of f that contain it, and strike it out of them. Call that set Q for that cube.
- The quotient q is the intersection of all these sets.
- The remainder r is every cube of f that is not a cube of q·d.
For f / (a + b): Qa = {c, d} from ac and ad, and Qb = {c, d} from bc and bd. Both agree, so q = c + d. Multiplying back, (c + d)(a + b) = ac + ad + bc + bd, and the cube left over is r = e. So f = (a + b)(c + d) + e. Demo: divide f by a + b.
A divisor can fail. For f / (a + e): Qa = {c, d} but Qe = {1}. Nothing is in both, so q = 0 and r = f. Demo: f / (a + e) has no quotient.
Kernels and co-kernels
Which divisors should a tool try? Brayton and McMullen answered with kernels. An expression is cube-free if no single cube divides all of its terms: c + d is cube-free, ac + ad is not (a divides both). A kernel of f is a cube-free quotient f / c, where c is a cube; c is its co-kernel. f itself is a kernel with co-kernel 1 when it is cube-free.
To find them, divide f by each literal that is in two or more cubes, take out any cube common to the result, and repeat inside each kernel found. A literal that is in only one cube, like e in f, gives nothing.
| Function | Kernel | Co-kernels |
|---|---|---|
| f = ac + ad + bc + bd + e | c + d | a, b |
| a + b | c, d | |
| f itself | 1 | |
| g = ac + bc + ae + be | c + e | a, b |
| a + b | c, e | |
| g itself | 1 |
Inside c + d, no literal is in two cubes, so there is no smaller kernel: c + d is a level-0 kernel. Demo: kernels of f and Demo: kernels of g.
Common kernels and extraction
The key theorem: two functions have a common divisor with two or more cubes only if some kernel of one and some kernel of the other share two or more cubes. So a tool needs to compare kernels only, not every possible divisor. Here f and g share the whole kernel a + b.
Extraction makes the shared kernel a new node, x = a + b, and rewrites both functions with it by algebraic division: f / x = c + d with remainder e, and g / x = c + e with remainder 0. The value of x is the number of literals it saves: f goes from 9 to 5 (xc + xd + e), g from 8 to 4 (xc + xe), and x costs 2. So 17 becomes 11, a value of 6. Demo: extract the common kernel a + b.
SIS runs this as a loop: find the kernels of all nodes, pick the kernel with the best value, extract it, and repeat until no kernel saves anything.
Factoring and the network
Last, each node is written in factored form. In f = xc + xd + e, x is in two cubes, so f / x = c + d with remainder e: f = x(c + d) + e, 4 literals. g = xc + xe becomes x(c + e), 3 literals. With x = a + b, the network has 2 + 4 + 3 = 9 literals.
| Stage | Network | Literals | Gates |
|---|---|---|---|
| Two-level SOP | f = ac + ad + bc + bd + e, g = ac + bc + ae + be | 17 | 8 (6 AND2, an OR5, an OR4) |
| After extraction | x = a + b, f = xc + xd + e, g = xc + xe | 11 | 6 |
| After factoring | x = a + b, f = x(c + d) + e, g = x(c + e) | 9 | 6, all with 2 inputs |
Algebraic steps never change the function. The page still checks it: it evaluates the network and the original SOPs on all 32 rows of a to e, and they agree. Formal tools do this check with binary decision diagrams instead of a full table. Demo: factor and check by truth table.
For these two small functions, factoring f and g separately would also give 9 literals: (a + b)(c + d) + e and (a + b)(c + e). The gain of sharing shows up in the gates: a + b is built once, not twice. With bigger kernels or more functions using them, sharing also wins in literals.
Algebraic is weaker than Boolean
Algebraic division multiplies cubes like polynomials. It does not use the Boolean rules a·a = a, a·a' = 0 or a + ab = a. That keeps it fast, but it misses some factors. Take h = a + bc and the divisor a + b: Qa = {1} and Qb = {c}, so q = 0. Yet in Boolean algebra (a + b)(a + c) = a + ab + ac + bc = a + bc = h. Demo: algebraic division misses a Boolean factor. Boolean division finds such factors, using don't-cares, but it is much slower, so tools use it sparingly.
Where it sits in the flow
RTL becomes generic logic, then this technology-independent optimization makes the network small, then technology mapping covers the nodes with real library cells. The whole chain, from RTL to layout, is on the ASIC design flow page.
What the page leaves out
- Complemented literals: algebraic division treats a and a' as two unrelated variables. The examples here have none.
- Cube extraction (a common cube such as ab shared by many cubes), and the faster "fast extract" (fx) that SIS and ABC use for two-cube divisors.
- The kernel-cube matrix and rectangle covering, which find the best common kernel among many nodes at once.
- Boolean division with don't-cares, resubstitution, and node simplification by two-level minimization.
- Delay: more levels mean longer paths, and real scripts trade literals against depth.
On the mind map
References
R. K. Brayton and C. McMullen, "The Decomposition and Factorization of Boolean Expressions", Proc. ISCAS, 1982: weak division, kernels and the kernel intersection theorem
R. K. Brayton, R. Rudell, A. Sangiovanni-Vincentelli and A. R. Wang, "MIS: A Multiple-Level Logic Optimization System", IEEE Transactions on CAD, 1987
Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, chapter 8 (multiple-level combinational logic optimization)
ABC: a system for sequential synthesis and verification (UC Berkeley), the successor of SIS