Problemadvanced
Interconnect binding
Also called multiplexer minimization, port assignment.
Choose the buses, multiplexers and operand ports that connect registers and units after binding so that the number and width of multiplexer inputs is least.
Interconnect binding is the last binding step of high-level synthesis. Once every operation has a functional unit and every value has a register, the datapath still needs wires from registers to unit inputs and from unit outputs to registers. Each input that receives data from more than one place needs a multiplexer, or a bus. Interconnect binding chooses the operand ports of commutative operations, the buses and the multiplexers so that the number of multiplexer inputs is least. Even the choice of operand ports alone, for a single adder, is NP-hard.
In plain words
After binding, we know which adder does each addition and which register holds each number. Now the wires must be drawn. An adder input that takes numbers from three different registers needs a switch with three inputs in front of it, and switches cost area and time. For an addition like x plus y, it does not matter which input gets x and which gets y, so we may flip it. Flipping some additions can make each input see fewer registers. Choosing the flips well is a hard puzzle, even for one adder. The same goal applies to the inputs of registers and to shared buses.
Definition
Input. A scheduled and bound design: for each operation , a unit with operand ports , the registers or units that supply its operands, and the register that receives its result, as on the resource binding and register binding pages. Some operations are commutative, such as add, multiply, and, or.
Connections. A sink is an input port of a unit or the input of a register. The sources of a sink are the distinct registers, units or primary inputs that ever drive it. A sink with sources needs a -input multiplexer, and a sink with one source is a plain wire.
Feasible solutions. For each commutative operation, a choice of which operand goes to which port of its unit. The units, registers and schedule stay fixed.
Objective. Minimize the total number of multiplexer inputs, . A simpler objective counts all connections, , including the plain wires.
Decision form. Given the bound design and an integer , can the operands be placed so that the cost is at most ?
When the bindings are not yet fixed, the problem merges with register and unit binding, and the cost depends on all three choices at once.
Variants
- Bus style. Instead of a multiplexer per sink, data moves over a few shared buses. Two transfers can share a bus if they never happen in the same step, so the fewest buses is a clique partition of the compatibility graph of transfers, see clique cover and Tseng-Siewiorek clique partitioning.
- Binding with interconnect cost. The register binding is chosen so that values from the same unit share registers, as in weighted bipartite matching binding.
- Multiplexer width and depth. On FPGAs, a multiplexer with more inputs than a lookup table takes several levels of logic, so the cost of a -input multiplexer grows faster than .
- Register files with ports. Values live in multiport register files, and the problem assigns reads and writes to file ports in each step.
Examples
One adder, three registers. Registers hold three values, and one adder performs , and in three steps. Written as given, port 1 receives and port 2 receives : two 3-input multiplexers, 6 inputs. Flipping the third addition to gives port 1 the sources and port 2 the sources : two 2-input multiplexers, 4 inputs. Fewer is impossible. Each register must reach a port. If each reached only one port, two of the three registers would share a port, but every two of them are added together, so they must reach different ports. Hence some register reaches both ports, and the best is .
A case with nothing to gain. If the adder only computes and , put on port 1 both times: port 1 has one source and needs no multiplexer, and port 2 has a 2-input multiplexer.
Known algorithms
- Clique partitioning of transfers. For the bus style, the greedy of Tseng-Siewiorek clique partitioning groups transfers into buses.
- Operand swapping heuristics. Visit the commutative operations and flip each one that lowers the count, until no flip helps. Each pass is linear, and the result is a local optimum.
- Joint binding. Binders that weigh shared sources, such as the weighted bipartite matching binder, reduce the interconnect while they bind registers.
- Integer programming. A 0-1 variable per operation for its port order and per pair of source and sink gives the optimum for small designs.
- Odd cycle transversal methods. For one two-port unit, the problem is exactly odd cycle transversal, as shown below, so its exact and parameterized algorithms apply.
Bounds
Fix one commutative unit with two ports, and let be the number of distinct registers it reads. Every placement uses between and port connections, since each register reaches one or both ports.
One two-port unit: the exact count. Build a graph on the registers, with an edge for each operation with . A placement of the operands puts each edge's two ends on the two ports. Let and be the registers that reach port 1 and port 2. The connections number . Then
the fewest vertices whose removal leaves a bipartite graph. Proof: removing leaves each edge with one end only in and one end only in , so is bipartite with sides and . Conversely, let be bipartite with sides and . Put the end of each edge on port 1, the end on port 2, and for an edge inside choose either way. Then and , so . The triangle example has and costs .
Reductions
Vertex cover to odd cycle transversal. Take a graph . Build from by adding, for each edge of , a new vertex joined to and . Then equals the least vertex cover of . If covers , then has no edge between two old vertices, and each new vertex is joined only to old ones, so is bipartite. If breaks every odd cycle of , it meets each triangle . Replace each by : afterwards has at most one neighbour left and lies on no cycle, so the new set still works and is no larger. It contains an end of each edge of , so it is a cover.
Interconnect binding is NP-complete. By the two steps above, given and , build , make one register per vertex of and one addition per edge of on one adder, in different steps. The least number of port connections is , so it is at most exactly when has a vertex cover of size . Vertex cover is NP-complete (Karp 1972). The result register of each addition adds the same fixed count in every placement. If has two disjoint edges, every port of 's adder sees at least two sources in every placement, so every connection is a multiplexer input and the same reduction works for the multiplexer count. A placement is checked in polynomial time, so the decision form is in NP. Pangrle (1991) studied the complexity of the general connectivity binding problem.
Applications
- Datapath area. In FPGA designs, multiplexers can take more area than the shared units, so a binding that saves one adder but adds many multiplexer inputs can lose.
- Clock period. A wide multiplexer in front of a unit lengthens the critical path, so reducing multiplexer inputs also helps timing.
- Bus-based architectures. Datapaths with a few shared buses use the transfer compatibility graph to decide which transfers ride on which bus.
References
- Giovanni De Micheli, Synthesis and Optimization of Digital Circuits, McGraw-Hill, 1994, Chapter 6, Resource Sharing and Binding (the interconnect that sharing creates, and bus and multiplexer styles)
- Chia-Jeng Tseng and Daniel P. Siewiorek, Automated synthesis of data paths in digital systems, IEEE Transactions on Computer-Aided Design 5(3), 379 to 395, 1986, the compatibility graph of data transfers and its partition into cliques, one bus per clique
- Barry M. Pangrle, On the complexity of connectivity binding, IEEE Transactions on Computer-Aided Design 10(11), 1460 to 1465, 1991, whole paper (the NP-completeness of connectivity binding)
- Deming Chen and Jason Cong, Register binding and port assignment for multiplexer optimization, Proceedings of the Asia and South Pacific Design Automation Conference, 2004, whole paper (binding and operand port choice to reduce multiplexer inputs on FPGAs)
- Richard M. Karp, Reducibility among combinatorial problems, in Complexity of Computer Computations, Plenum (1972), 85 to 103, the list of 21 problems (Node cover)
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 59F7QY Edit this page History Report an error Markdown