Algorithm Search⌘K

Definitioncore

k-feasible cut

Also called k-cut of a node.

A set of at most k nodes such that every path from the inputs to a given node passes through it, so the node is a function of the cut.

A cut of a node vv in a Boolean network is a set of nodes that every path from a primary input to vv passes through. The cut is kk-feasible when it has at most kk nodes. Once the values of the cut nodes are known, the value of vv is fixed, so vv is a Boolean function of the cut, with at most kk inputs. This is why cuts are the basic unit of LUT mapping, where a kk-input lookup table can compute any function of kk inputs, and of local rewriting of and-inverter graphs. The term comes from Cong and Ding's FlowMap paper (1994), which states it in terms of a partition of the cone of the node. Later mappers list the cuts of every node, as on the cut enumeration page.

Definition

Let GG be a directed acyclic graph whose sources are the primary inputs (PIs) and whose other nodes are gates. Each gate ww has a local function of its fanins. The cone of a node vv is the set of nodes from which vv can be reached, vv included.

Cut. A set CC of nodes is a cut of vv if every path from a PI to vv contains a node of CC. The nodes of CC are the leaves of the cut. The set {v}\{v\} is the trivial cut of vv. For a PI vv, the trivial cut is the only cut that lies in the cone of vv.

kk-feasible cut. A cut CC of vv is kk-feasible if ∣C∣≤k|C| \le k.

Minimal cut. A cut is minimal, or irredundant, if no proper subset of it is a cut of vv. Every minimal cut lies in the cone of vv, and a minimal cut other than {v}\{v\} does not contain vv. Some authors use "cut" to mean a minimal cut.

Cone of a cut. For a cut CC of vv, the cone of vv over CC is the set of nodes w∉Cw \notin C from which vv can be reached on a path with no node of CC. Its nodes are the gates that a lookup table for vv over CC replaces. For the trivial cut the cone is empty.

Partition form. Cong and Ding state the same idea on the cone NvN_v of vv. A cut is a partition (X,Xˉ)(X, \bar{X}) of NvN_v with v∈Xˉv \in \bar{X} and every PI of NvN_v in XX. Its node cut-set is the set of nodes of XX that have a fanout in Xˉ\bar{X}. The partition is kk-feasible if its node cut-set has at most kk nodes. Given a cut CC in the set form, put the cone of vv over CC in Xˉ\bar{X} and the rest of NvN_v in XX. The node cut-set is then a subset of CC, and it equals CC when CC is minimal and C≠{v}C \ne \{v\}.

Cut function. Order the leaves of a cut as u1,…,umu_1, \ldots, u_m. The cut function of vv over CC is the function gg of mm variables such that v=g(u1,…,um)v = g(u_1, \ldots, u_m) on every input of the network. In the code of this site, gg is a truth table stored as an integer of 2m2^m bits, with u1u_1 as the high bit of the row number.

Basic facts.

  1. A node is a function of each of its cuts. Fix values at the leaves of CC. Evaluate the nodes of the cone of vv over CC in topological order. Each fanin of such a node is a leaf or a node of the cone, since a path to vv that avoids CC would reach a PI. So the value of vv depends only on the leaves, and gg exists. If two inputs of the network give the same leaf values, they give the same value of vv.
  2. Unions of fanin cuts are cuts. If vv has fanins w1,…,wdw_1, \ldots, w_d and CiC_i is a cut of wiw_i, then C1∪⋯∪CdC_1 \cup \cdots \cup C_d is a cut of vv, because a path from a PI to vv enters vv through some wiw_i. Each minimal cut of vv other than {v}\{v\} is such a union. This is the merge rule of cut enumeration.
  3. Testing a cut. A search from vv along fanin edges that stops at the nodes of CC tests whether CC is a cut: CC is a cut exactly when the search reaches no PI outside CC. It takes time linear in the size of the cone.
  4. Smallest cut. For a gate vv, the least size of a cut of vv that does not contain vv is the largest number of paths from the PIs to vv that share no node other than vv, by Menger's theorem on the graph with a new source joined to every PI. It is a max-flow value with unit node capacities, as in FlowMap.
  5. Counting. A node of a network with nn nodes has at most ∑i≤k(ni)\sum_{i \le k} \binom{n}{i} kk-feasible cuts, which is polynomial in nn for a fixed kk. Without the bound kk, the count can grow very fast. The root of a complete binary tree of AND gates of depth dd has N(d)=N(d−1)2+1N(d) = N(d-1)^2 + 1 minimal cuts, with N(0)=1N(0) = 1, so 1, 2, 5, 26 and 677 for d=0d = 0 to 4. For the tree of depth 4 there are 9 minimal 4-feasible cuts and 49 minimal 6-feasible cuts.

Examples and non-examples

Take the network with inputs a,b,c,da, b, c, d and the AND gates e=abe = a b, f=bcf = b c, g=efg = e f, h=fdh = f d and o=gho = g h. Node ff feeds both gg and hh.

  • The 3-feasible cuts of oo. The minimal ones are {o}\{o\}, {g,h}\{g, h\}, {d,e,f}\{d, e, f\}, {d,f,g}\{d, f, g\} and {e,f,h}\{e, f, h\}. For example, every path into oo passes through gg or hh, and every path into gg or hh passes through ee, ff or dd.
  • The 4-feasible cuts of oo. There are 12 minimal ones. The seven new ones are {a,b,c,d}\{a, b, c, d\}, {a,b,c,h}\{a, b, c, h\}, {a,b,d,f}\{a, b, d, f\}, {a,b,f,h}\{a, b, f, h\}, {b,c,d,e}\{b, c, d, e\}, {b,c,d,g}\{b, c, d, g\} and {b,c,e,h}\{b, c, e, h\}. Over all nine nodes the network has 21 minimal 3-feasible cuts and 28 minimal 4-feasible cuts.
  • Cut functions. Over {g,h}\{g, h\}, o=gho = g h, the table 1000. Over {d,e,f}\{d, e, f\}, o=ef⋅fd=defo = e f \cdot f d = d e f, the table 10000000. Over {a,b,c,d}\{a, b, c, d\} the function is abcda b c d, with only the top bit of 16 set.
  • Not a cut. {d,g}\{d, g\} is not a cut of oo: the path b→f→h→ob \to f \to h \to o avoids it. {e,h}\{e, h\} is not a cut either: the path b→f→g→ob \to f \to g \to o avoids it.
  • A cut that is not minimal. {e,f,g,h}\{e, f, g, h\} is a cut of oo, but it contains the cut {g,h}\{g, h\}. A LUT over it would have an input that it does not need. The merge of fanin cuts can make such a set: in the network with a=xya = x y, b=xab = x a and v=abv = a b, the union of the cut {a}\{a\} of aa and the cut {x,y}\{x, y\} of bb is {a,x,y}\{a, x, y\}, which contains the cut {a,x}\{a, x\}.
  • Not kk-feasible. {a,b,c,d}\{a, b, c, d\} is a cut of oo, but it is not 3-feasible.
  • Cut enumeration. Lists all minimal kk-feasible cuts of every node, by fact 2.
  • LUT mapping. A mapping picks one kk-feasible cut for each LUT root. The cut is the set of LUT inputs.
  • FlowMap. Finds, by max-flow, a kk-feasible cut of least height, where the height is the largest depth label of the cut.
  • Priority cuts. Keeps only a few kk-feasible cuts of each node.
  • Maximum fanout-free cone. The nodes of the cone of a cut that no logic outside the cone uses, as on the AIG rewriting page.
  • Menger's theorem and vertex-disjoint paths. Relate the smallest cut to the largest set of disjoint paths.
  • Boolean network. The Boolean network and the and-inverter graph are the graphs on which cuts are taken.

References

  1. FlowMap, an optimal technology mapping algorithm for delay optimization in lookup-table based FPGA designs, the definitions of a cut (X, X-bar) of the cone of a node, of its node cut-set and of a K-feasible cut
  2. Peichen Pan and Chih-Chang Lin, A new retiming-based technology mapping algorithm for LUT-based FPGAs, Proceedings of the 1998 ACM/SIGDA Sixth International Symposium on Field Programmable Gate Arrays (FPGA 98), pages 35 to 42, the computation of the K-feasible cuts of each node by combining the cuts of its fanins
  3. Cut ranking and pruning, enabling a general and efficient FPGA mapping solution, the enumeration of all K-feasible cuts and the pruning of cuts by rank

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.

LadderLevelWhat the next level needs
Human proofH0 no proof
  • add a proof in proofs/ (06.5)
LeanL0 no Lean part
  • name a Lean module in the lean field (07)
VisualV0 none
  • add viz/scene.ts or a figure (10)
WritingW4 complete
  • a review of the text: no review record reviews/HA6EZ1/text.yaml