Algorithmadvanced
Chortle-crf
Francis, Rose and Vranesic's LUT mapper that decomposes each tree of the network by bin packing of fanins and maps it by dynamic programming for the fewest LUTs.
- Solves
- LUT mapping
- Time
- O(m d) this implementationO(m log m) with heaps
- Space
- O(n + m) total
- Where
- K = the number of LUT inputs; d = the largest fanin of a gate; m = the number of gate inputs; n = the number of gates
- Model
- Word RAM
- Properties
- deterministicnot exactrecursive
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Robert J. Francis, Jonathan Rose, Zvonko Vranesic, 1991
Chortle-crf is an algorithm for LUT mapping, a step of FPGA CAD: it turns a network of AND, OR and similar gates into a network of -input lookup tables (LUTs) and tries to use as few LUTs as possible. It cuts the network into fanout-free trees and maps each tree bottom up. At each gate it packs the LUTs that come from the fanins into LUTs of size with the first-fit decreasing rule for bin packing, and then joins the packed LUTs into one root LUT. Francis, Rose and Vranesic gave it at DAC 1991. For a tree, they state that the result has the fewest LUTs when .
In plain words
A lookup table with inputs can compute any function of signals. An FPGA builds a circuit from many such tables, so the mapper cuts the logic into pieces of at most inputs, and fewer pieces means a smaller circuit.
Chortle-crf works on trees of gates, from the inputs up. When it reaches a gate, the subtrees below it are already in tables, and each subtree has one top table that is still open. Chortle-crf treats each top table and each plain input as a box whose size is the number of inputs it uses. It puts the boxes into bins of capacity , the largest box first, and each bin becomes one table. Then it chains the bins together until one bin is left at the top. That bin is the open table of the gate, and the next gate up continues from it.
The problem
Input. A Boolean network of gates, each with an operator that is associative and commutative (AND, OR or XOR; inverters on the edges can go into the LUTs), and an integer .
Output. A network of -input LUTs that computes the same outputs. Each LUT has at most distinct inputs and computes any function of them.
Goal. Few LUTs. For a fanout-free tree, the search space of Chortle-crf is every way to split each gate into a tree of smaller gates with the same operator, together with every cover of the result by LUTs that are subtrees. Chortle-crf is exact in this space for trees when , as stated in the next sections. On a network with fanout it is a heuristic, because cutting the network into trees already fixes a part of the answer.
The algorithm
The network is first cut into fanout-free trees: every gate that drives an output or more than one gate input is the root of a tree, and its output is a plain input of the trees that read it. Each tree is then mapped by the procedure below, called on its root. A wire is an item of size 1: a primary input, a tree root, or the output of a LUT that is already closed. An open LUT is the root LUT of a child, with size equal to the number of its inputs; it is not yet a separate LUT, because the parent may still merge it into a larger one.
MAP-GATE(v, K)- 1
items ← empty list - 2
for each fanin f of v: - 3
if f is a gate inside this tree then append MAP-GATE(f, K) to items ▷ an open LUT - 4
else append the wire f to items - 5
sort items by size, largest first - 6
for each item x in this order: put x into the first bin with room for x, or into a new bin - 7
while there is more than one bin: - 8
remove the fullest bin B and close it: B becomes a LUT that computes op(v) of its items - 9
put the output wire of B into the fullest bin that has room for 1, or into a new bin - 10
return the last bin as the open LUT of v, of size equal to its content
The LUT of the tree root is the last bin returned for the root. Ties are broken by the order in which the bins were opened. Each gate keeps only one solution, the one that this procedure builds.
The decision at each gate follows the rule that Cong and Ding state for Chortle-crf in their survey: decompose the gate so that (1) the number of LUTs in its subtree is least, and (2) under (1), the open root LUT is as small as possible. The second condition matters because a small open LUT leaves more room in the bins of the parent.
Example
Take and the tree with and . The trace below is the output of the implementation.
| step | content |
|---|---|
| gate | three wires go into one bin; returns an open LUT of size 3 |
| gate | two wires go into one bin; returns an open LUT of size 2 |
| gate , line L5 | items: (3), (2), (1), (1) |
| line L6 | opens bin A (3); does not fit in A and opens bin B (2); goes to A (4); goes to B (3) |
| line L8 | A is the fullest, so it closes as LUT with 4 inputs |
| line L9 | the wire goes to B, which now has 4 |
| line L10 | B is the root LUT with inputs |
The result has 2 LUTs. No mapping can use 1, because the tree has 7 distinct inputs and one LUT has 4. In general, a tree of LUTs of size has at most free inputs, because inputs carry outputs of other LUTs; with 7 inputs and this gives .
The fullest bin closes first because its output then costs only one slot in a bin that still has room. If bin B closed first here, its wire would not fit in the full bin A, and a third LUT would be needed.
Correctness
The full proof is in proofs/correctness.md. It shows three things. Every LUT has at most inputs, because a bin never holds items whose sizes add up to more than , and the size of an item bounds its distinct inputs. The LUT network computes the same function, because each bin computes the operator of the gate over its items, and an associative and commutative operator can be split over the bins in any grouping. The loop at line L7 stops after at most twice the number of bins, because a step at line L9 that opens a new bin is always followed by a step that does not.
The claim that the LUT count is least for a tree when is not proved here. It rests on two results of Francis, Rose and Vranesic: that the two conditions above, applied at every gate, give a mapping of the tree with the fewest LUTs, and that first-fit decreasing is optimal for the restricted bin packing problem at a gate when . The proof file states both precisely and gives the sources.
Proof: Chortle-crf returns a valid LUT network with the same outputs, its closing loop stops, and the cited conditions for tree optimalityfull
We use the notation of the page. The network has gates with associative and commutative operators (AND, OR, XOR). It is cut into fanout-free trees, and MAP-GATE is called on each tree root. An item is either a wire (size 1) or an open LUT returned by a child (size equal to the content of its last bin). A bin is a list of items, and its content is the sum of the sizes of its items.
Lemma 1 (sizes bound inputs). For every item , the number of distinct signals that reads is at most its size.
Proof. By induction on the order in which items are made. A wire reads one signal and has size 1. An open LUT returned at line L10 is a bin whose content is the sum of the sizes of its items, and the signals it reads are the union of the signals of its items. By induction each item reads at most its size, so the union has at most the content. The output wire made at line L9 has size 1 and reads one signal.
Lemma 2 (bins never overflow). At every point, every bin has content at most .
Proof. The size of a wire is . The size of an open LUT is the content of a bin of a child, which is at most by induction on the depth of the tree. Line L6 puts an item into a bin only if it has room, or into a new bin, where the content is the size of the item. Line L9 does the same with a wire of size 1. Closing a bin removes it. So no step makes a content larger than .
Theorem 3 (valid LUTs). Every LUT in the output has at most distinct inputs.
Proof. A LUT is a bin closed at line L8, or the last bin of a tree root at line L10. Its inputs are the signals read by its items, at most its content by Lemma 1, and the content is at most by Lemma 2.
Lemma 4 (the closing loop stops). Let be the number of bins after line L6. The loop at lines L7 to L9 runs at most times, and it ends with exactly one bin.
Proof. A pass of the loop removes one bin at line L8. If line L9 finds a bin with room, the number of bins falls by one. If not, every remaining bin is full (content ), and line L9 opens a new bin with content , because ; the number of bins stays the same. Look at the next pass, if there is one. Line L8 removes the fullest bin. If that is not the new bin, the new bin is still there with room for 1. If it is the new bin, every bin had content at most 1, so every remaining bin has room. In both cases line L9 finds room, and the number of bins falls. So two passes in a row cannot both keep the number of bins, and the number falls by at least one every two passes. The loop stops when one bin is left, after at most passes. If the loop does not run.
Theorem 5 (same function). For every gate , the open LUT returned for , together with the LUTs closed while mapping the subtree of , computes the output of .
Proof. By induction on the subtree. Write for the operator of and for its items. By induction each open LUT among the items computes the output of its fanin gate, and each wire is the fanin signal itself, so . Each bin computes over its items. Closing a bin at line L8 makes a LUT with output , and line L9 puts that output, as one item, into another bin. Since is associative and commutative, over all items of all bins does not change when the items of are replaced by the single item . This holds before the loop (each item is in exactly one bin after line L6) and after each pass, so when one bin is left, over it equals .
Applied to every tree root, Theorem 5 shows that the LUT network has the same outputs as the gate network: each tree root is a LUT with the name of the root, and other trees read it as a wire.
Theorem 6 (the LUT count, cited). The following two statements are from Francis, Rose and Vranesic (DAC 1991). We give them in the form of Cong and Ding's survey (ACM TODAES 1(2), 1996, Section 3.1.3), and we do not prove them here.
- For a fanout-free tree, decomposing each gate so that (a) the number of -LUTs that cover the subtree of is least, and (b) under (a), the number of inputs of the root LUT of is least, gives a mapping of the tree with the least number of -LUTs.
- First-fit decreasing, followed by the closing steps of lines L7 to L9, solves the restricted bin packing problem at a gate optimally when . (Cong and Ding attribute this to Francis et al. 1991; the survey of Sangiovanni-Vincentelli, El Gamal and Rose, Proc. IEEE 1993, states the bound as .)
Together they give the claim on the page: for a fanout-free tree and , Chortle-crf uses the fewest LUTs over all splits of the gates into smaller gates of the same operator and all covers by LUTs.
The tests check statement 1 and statement 2 together, on random trees, against an exhaustive search that keeps, at every gate, the least number of closed LUTs for every possible size of the root LUT, and that tries every grouping of the items into LUTs. They are measurements, not a proof.
Complexity
Let be the fanin of gate and . At the sort costs , the first-fit pass with bins, and the closing loop steps of each. This implementation therefore runs in time, where is the largest fanin. With the bins kept in a heap keyed by content, each first-fit step and each closing step costs , which gives the bound that Cong and Ding state. Space is for the network and the LUTs. The number of LUTs is at most , since every closed LUT holds at least one item.
Properties
What is proved. The output is a valid LUT network: each LUT has at most inputs and the outputs are unchanged (proof file). The method is deterministic and runs in polynomial time.
What is cited. For a fanout-free tree and , the number of LUTs is the least over all decompositions of the gates and all covers by LUTs (Francis, Rose and Vranesic 1991, as stated by Cong and Ding 1996, Section 3.1.3). The survey of Sangiovanni-Vincentelli, El Gamal and Rose (1993) states the bound as for disjoint-support cubes; the two surveys disagree, and this page follows the more conservative .
What is measured. The tests compare the LUT count with an exhaustive search over every split of every gate and every cover, on random trees of up to 5 gates with fanin up to 4. The counts are equal for every tree tried with . For and the tests check only that the count is never below the optimum. A separate search over single gates with up to 6 child LUTs of every size found no tree where Chortle-crf is worse for from 3 to 8; this does not prove optimality for larger , it only says that small cases do not show a gap.
Not optimal on networks with fanout. Cutting at fanout nodes means that a gate with two readers always ends a LUT. A mapper that duplicates that gate into both readers can use fewer LUTs, which is what the replication step of the paper and the cut-based mappers do.
Variants and improvements
- Reconvergent fanout. When two fanins of a gate share inputs, putting them into the same bin needs fewer pins than their sizes add up to. Chortle-crf tries the pairings of such fanins before the bin packing (exhaustively for few fanins). The implementation on this page does not do this, so it treats the sizes as if the supports were disjoint.
- Replication. At a fanout gate, the paper can copy the root LUT of a small tree into each reader, when this saves LUTs. This implementation does not replicate.
- Chortle-d (Francis, Rose and Vranesic, ICCAD 1991) uses the same bin packing view to minimize the depth of the LUT network instead of the count.
- Cut-based mappers. FlowMap finds the least depth for any network with K-feasible cuts, and CutMap and DAOmap reduce the LUT count at that depth. Cut enumeration and priority cuts are the basis of most later mappers, and they handle fanout without cutting the network into trees.
When to use it
Use Chortle-crf to learn how a mapper can use the freedom to split a wide gate, and as a fast area mapper for networks that are close to trees. For real FPGA flows, cut-based mappers give better results because they do not fix the tree boundaries and they control depth. The bin packing view is still useful inside other mappers whenever a wide associative gate must be split into -input pieces.
Pitfalls
- Closing the wrong bin. The closing loop must close the fullest bin first and put its output into the fullest bin with room. The example shows that the other order can cost an extra LUT.
- Keeping only the least count. If each gate keeps any solution with the fewest LUTs and not the one with the smallest open root, the parent can need more LUTs. Both conditions are needed.
- Shared inputs. A size is an upper bound on the distinct inputs only when the fanins have disjoint supports. If the network repeats an input inside a tree, the LUTs are still valid but may be larger than needed.
- Operators. The split of a gate over bins is only correct for associative and commutative operators. A gate such as a multiplexer must be decomposed into AND and OR gates first.
- Optimality for larger K. Do not quote the tree optimality for as a theorem; the sources state the bound as (or in one survey).
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/chortle-crf/. The authors are listed in prov/H1WBNA.jsonl.
"""Chortle-crf: map a network of AND, OR and XOR gates into K-input LUTs.
A network is a dict that maps a gate name to (op, fanins), where op is
"AND", "OR" or "XOR" and fanins is a list of signal names. A signal that is
not a gate is a primary input. The outputs are a list of gate names.
The network is cut into fanout-free trees at every gate that is an output or
has more than one reader. Each tree is mapped bottom up. At a gate, the root
LUTs of the children and the leaf inputs are packed into bins of size K by
first-fit decreasing, and then the bins are joined into one root LUT. Every
gate keeps one solution: the fewest LUTs, and among those the smallest root.
A LUT is (name, inputs, expr). expr is a signal name or (op, [expr, ...]).
"""
from itertools import product
OPS = {"AND", "OR", "XOR"}
def fanout_counts(net: dict, outputs: list) -> dict:
count = {}
for name, (_, fanins) in net.items():
for f in fanins:
count[f] = count.get(f, 0) + 1
for o in outputs:
count[o] = count.get(o, 0) + 1
return count
def tree_roots(net: dict, outputs: list) -> list:
"""Gates that start a tree: the outputs and every gate with fanout above 1."""
count = fanout_counts(net, outputs)
roots = [g for g in net if g in outputs or count.get(g, 0) > 1]
return roots
class _Item:
"""A packable item: a child root LUT that is still open, or a wire."""
__slots__ = ("size", "expr", "inputs")
def __init__(self, size, expr, inputs):
self.size = size
self.expr = expr
self.inputs = inputs
def _join(op, items):
if len(items) == 1:
return items[0].expr
return (op, [it.expr for it in items])
def _inputs(items):
out = set()
for it in items:
out |= it.inputs
return out
def ffd_bins(sizes: list, k: int) -> list:
"""First-fit decreasing. Returns the bins as lists of item indices, and
the bins are in the order they were opened."""
order = sorted(range(len(sizes)), key=lambda i: (-sizes[i], i))
bins, room = [], []
for i in order:
for b in range(len(bins)):
if room[b] >= sizes[i]:
bins[b].append(i)
room[b] -= sizes[i]
break
else:
bins.append([i])
room.append(k - sizes[i])
return bins
def map_node(op, children, k, namer):
"""Decompose one gate. children is a list of _Item. Returns
(closed_luts, root_item), where closed_luts are the new LUTs that this
gate closes and root_item is the open root LUT of the gate."""
sizes = [c.size for c in children]
if any(s > k for s in sizes):
raise ValueError("an item is larger than K")
packed = ffd_bins(sizes, k) # @line L5
groups = [[children[i] for i in b] for b in packed] # @line L6
bins = [[sum(c.size for c in g), g] for g in groups]
closed = []
while len(bins) > 1: # @line L7
# close the fullest bin (ties: the one opened first)
j = max(range(len(bins)), key=lambda b: (bins[b][0], -b))
size, g = bins.pop(j)
name = namer()
closed.append((name, sorted(_inputs(g)), _join(op, g))) # @line L8
wire = _Item(1, name, {name})
# put its output in the fullest bin that still has room
fit = [b for b in range(len(bins)) if bins[b][0] + 1 <= k]
if fit: # @line L9
b = max(fit, key=lambda b: (bins[b][0], -b))
bins[b][0] += 1
bins[b][1].append(wire)
else:
bins.append([1, [wire]])
size, g = bins[0]
return closed, _Item(size, _join(op, g), _inputs(g)) # @line L10
def chortle_crf(net: dict, outputs: list, k: int) -> list:
"""Map the network. Returns the list of LUTs. The LUT of a tree root has
the name of that root, so every output keeps its name."""
if k < 2:
raise ValueError("K must be at least 2")
for name, (op, fanins) in net.items():
if op not in OPS or not fanins:
raise ValueError(f"bad gate {name}")
roots = set(tree_roots(net, outputs))
luts = []
counter = [0]
def namer():
counter[0] += 1
return f"_lut{counter[0]}"
def solve(g):
op, fanins = net[g]
children = [] # @line L1
for f in fanins: # @line L2
if f in net and f not in roots:
children.append(solve(f)) # @line L3
else:
children.append(_Item(1, f, {f})) # @line L4
closed, root = map_node(op, children, k, namer)
luts.extend(closed)
return root
for r in sorted(roots):
root = solve(r)
luts.append((r, sorted(root.inputs), root.expr))
return luts
def eval_expr(expr, values: dict) -> int:
if isinstance(expr, str):
return values[expr]
op, args = expr
vals = [eval_expr(a, values) for a in args]
if op == "AND":
return int(all(vals))
if op == "OR":
return int(any(vals))
r = 0
for v in vals:
r ^= v
return r
def eval_network(net: dict, outputs: list, values: dict) -> dict:
memo = dict(values)
def ev(s):
if s not in memo:
op, fanins = net[s]
memo[s] = eval_expr((op, list(fanins)), {f: ev(f) for f in fanins})
return memo[s]
return {o: ev(o) for o in outputs}
def eval_luts(luts: list, outputs: list, values: dict) -> dict:
by_name = {name: (inputs, expr) for name, inputs, expr in luts}
memo = dict(values)
def ev(s):
if s not in memo:
inputs, expr = by_name[s]
memo[s] = eval_expr(expr, {i: ev(i) for i in inputs})
return memo[s]
return {o: ev(o) for o in outputs}
def primary_inputs(net: dict) -> list:
pis = set()
for _, (_, fanins) in net.items():
for f in fanins:
if f not in net:
pis.add(f)
return sorted(pis)
def equivalent(net: dict, outputs: list, luts: list, rng=None, samples: int = 512) -> bool:
"""Compare on every input vector, or on random vectors from rng when
there are more than 12 inputs."""
pis = primary_inputs(net)
if len(pis) <= 12 or rng is None:
vectors = product((0, 1), repeat=len(pis))
else:
vectors = (tuple(rng.randint(0, 1) for _ in pis) for _ in range(samples))
for bits in vectors:
values = dict(zip(pis, bits))
if eval_network(net, outputs, values) != eval_luts(luts, outputs, values):
return False
return True
if __name__ == "__main__":
# the example of the page: f = OR(AND(a, b, c), AND(d, e), g, h), K = 4
net = {"x": ("AND", ["a", "b", "c"]), "y": ("AND", ["d", "e"]), "f": ("OR", ["x", "y", "g", "h"])}
for lut in chortle_crf(net, ["f"], 4):
print(lut)
test_chortle_crf.py 155 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/chortle-crf/. The authors are listed in prov/H1WBNA.jsonl.
import random
from functools import lru_cache
from itertools import combinations, product
from chortle_crf import chortle_crf, equivalent, ffd_bins, tree_roots
def random_tree(rng: random.Random, gates: int, max_fanin: int) -> tuple[dict, list]:
"""A fanout-free tree of AND, OR and XOR gates. Each leaf is its own input."""
net = {}
pending = ["g0"]
made = 1
leaves = 0
while pending:
g = pending.pop()
d = rng.randint(2, max_fanin)
fanins = []
for _ in range(d):
if made < gates and rng.random() < 0.5:
child = f"g{made}"
made += 1
pending.append(child)
fanins.append(child)
else:
fanins.append(f"x{leaves}")
leaves += 1
net[g] = (rng.choice(["AND", "OR", "XOR"]), fanins)
return net, ["g0"]
def brute_tree_luts(net: dict, root: str, k: int) -> int:
"""The fewest K-LUTs over every way to split each gate into smaller gates
of the same operator and to cover the result with LUTs, for a tree."""
@lru_cache(maxsize=None)
def group(opens: tuple, wires: int) -> dict:
# opens: sorted sizes of child root LUTs that are still open.
# wires: the number of single wires (inputs or closed LUT outputs).
# Returns {root size: fewest closed LUTs}.
best = {}
total = sum(opens) + wires
if total <= k:
best[total] = 0
n = len(opens)
for r in range(n + 1):
for idx in combinations(range(n), r):
chosen = sum(opens[i] for i in idx)
rest = tuple(opens[i] for i in range(n) if i not in idx)
for w in range(wires + 1):
if r + w == 0 or chosen + w > k:
continue
if r + w == 1 and r == 0:
continue # a LUT that only copies a wire
for u, e in group(rest, wires - w + 1).items():
if e + 1 < best.get(u, 10**9):
best[u] = e + 1
return best
def options(g: str) -> dict:
op, fanins = net[g]
child_opts, wires = [], 0
for f in fanins:
if f in net:
child_opts.append(sorted(options(f).items()))
else:
wires += 1
best = {}
for choice in product(*child_opts):
base = sum(e for _, e in choice)
opens = tuple(sorted(u for u, _ in choice))
for u, e in group(opens, wires).items():
if base + e < best.get(u, 10**9):
best[u] = base + e
return best
return min(options(root).values()) + 1
def check_luts(net, outputs, luts, k, rng=None):
for name, inputs, _ in luts:
assert len(inputs) <= k, (name, inputs)
assert equivalent(net, outputs, luts, rng)
def test_page_example():
net = {"x": ("AND", ["a", "b", "c"]), "y": ("AND", ["d", "e"]), "f": ("OR", ["x", "y", "g", "h"])}
luts = chortle_crf(net, ["f"], 4)
check_luts(net, ["f"], luts, 4)
assert len(luts) == 2
assert brute_tree_luts(net, "f", 4) == 2
def test_ffd_bins():
assert ffd_bins([3, 3, 2, 2, 2], 5) == [[0, 2], [1, 3], [4]]
assert ffd_bins([1, 1, 1, 1], 4) == [[0, 1, 2, 3]]
def test_wide_gate():
# a single AND of 10 inputs with K = 4 needs ceil((10 - 1) / 3) = 3 LUTs
net = {"f": ("AND", [f"x{i}" for i in range(10)])}
luts = chortle_crf(net, ["f"], 4)
check_luts(net, ["f"], luts, 4)
assert len(luts) == 3
def test_optimal_on_trees_k_up_to_5():
rng = random.Random(1991)
for k in (2, 3, 4, 5):
for _ in range(60):
net, outs = random_tree(rng, rng.randint(1, 5), 4)
luts = chortle_crf(net, outs, k)
check_luts(net, outs, luts, k, rng)
assert len(luts) == brute_tree_luts(net, "g0", k)
def test_never_below_optimum_k_6_and_7():
rng = random.Random(6)
for k in (6, 7):
for _ in range(25):
net, outs = random_tree(rng, rng.randint(1, 4), 5)
luts = chortle_crf(net, outs, k)
check_luts(net, outs, luts, k, rng)
assert len(luts) >= brute_tree_luts(net, "g0", k)
def test_dag_split_into_trees():
# n has two readers, so it is the root of its own tree
net = {
"n": ("AND", ["a", "b"]),
"p": ("OR", ["n", "c", "d"]),
"q": ("XOR", ["n", "e"]),
"r": ("AND", ["p", "q", "f"]),
}
assert sorted(tree_roots(net, ["r"])) == ["n", "r"]
for k in (2, 3, 4, 5):
luts = chortle_crf(net, ["r"], k)
check_luts(net, ["r"], luts, k)
def test_random_dags_equivalent():
rng = random.Random(7)
for _ in range(40):
net = {}
signals = [f"x{i}" for i in range(5)]
for i in range(rng.randint(2, 7)):
g = f"g{i}"
net[g] = (rng.choice(["AND", "OR", "XOR"]), rng.sample(signals, rng.randint(2, min(4, len(signals)))))
signals.append(g)
outs = [g for g in net if not any(g in f for _, f in net.values())]
k = rng.randint(2, 5)
luts = chortle_crf(net, outs, k)
check_luts(net, outs, luts, k)
History
Francis, Rose and Chung's Chortle (DAC 1990, pages 613 to 619) was the first mapper for lookup-table FPGAs; it cut the network into trees and searched all decompositions of each gate, which grows exponentially with the fanin. In 1991 Francis, Rose and Vranesic gave Chortle-crf at DAC, which replaced that search with first-fit decreasing bin packing and added the use of reconvergent fanout and replication; the survey of Sangiovanni-Vincentelli, El Gamal and Rose reports that it ran up to 28 times faster than Chortle. In the same year, Chortle-d targeted depth. FlowMap (1992) then gave the least depth for general networks in polynomial time, and the later mappers moved from trees to cuts.
References
- Robert J. Francis, Jonathan Rose and Zvonko Vranesic, Chortle-crf, fast technology mapping for lookup table-based FPGAs, Proceedings of the 28th ACM/IEEE Design Automation Conference (DAC 1991), San Francisco, pages 227 to 233, the decomposition of a node by first-fit decreasing bin packing of the fanin LUTs, the dynamic program over each fanout-free tree, the claim that the result is optimal for a tree when K is at most 5, and the handling of reconvergent fanout and replication
- Jason Cong and Yuzheng Ding, Combinational logic synthesis for LUT based field programmable gate arrays, ACM Transactions on Design Automation of Electronic Systems 1(2), 145 to 204, 1996, Section 3.1.3 (the two conditions on the decomposition of a node, the bin packing and closing steps, the statement that first-fit decreasing is optimal for the restricted bin packing problem when K is at most 5, and the O(m log m) bound)
- Synthesis methods for field programmable gate arrays, the section on Chortle and Chortle-crf (the bin packing of cubes, the claim of a minimum for disjoint-support cubes, the speed against Chortle)
- Chortle, a technology mapping program for lookup table-based field programmable gate arrays, the forest of trees and the exhaustive search over decompositions that Chortle-crf replaces (general locator)
- Technology mapping of lookup table-based FPGAs for performance, Chortle-d, the depth version of the same decomposition (general locator)
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 | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag H1WBNA Edit this page History Report an error Markdown