Definitioncore
Horizontal and vertical constraint graphs
Also called floorplan constraint graphs.
Two DAGs on the blocks whose edges say one block is left of or below another, so longest paths give the least width and height of a packing.
The horizontal and vertical constraint graphs of a set of rectangular blocks are two directed acyclic graphs on the blocks. An edge in the horizontal graph says that block must lie to the left of block , and an edge in the vertical graph says that must lie below . They are the common decoding step of floorplanning in chip design: a sequence pair, a B*-tree or an O-tree fixes the relations, and the longest paths in the two graphs give the least and coordinates that obey them. When every pair of blocks is joined by a path in one of the two graphs, the result has no overlap, and its width and height are the lengths of the longest paths through each graph.
Definition
Blocks and placements. There are blocks . Block has a width and a height . A placement gives each block a lower-left corner , and block then covers the rectangle . Two blocks overlap when the interiors of their rectangles meet. A placement is a packing when no two blocks overlap. In a placement, is left of when , and is below when . The interiors of two rectangles meet exactly when the interiors of both their -intervals and their -intervals meet, so a placement is a packing if and only if for each pair at least one of four relations holds: left of , left of , below or below .
Constraint graphs. A horizontal constraint graph is a weighted directed graph on the vertex set . Each edge between two blocks has the weight and means " is left of ". The source has an edge of weight to every block, and every block has an edge of weight to the sink . A vertical constraint graph is the same with the heights as weights and "below" as the meaning. A placement satisfies the pair when for each edge of between blocks, for each such edge of , and all coordinates are at least . These are difference constraints. The pair is complete when for every two blocks there is a directed path from one to the other in or in .
Longest-path placement. When both graphs are acyclic, let be the length of a longest path from to in , and the same in . The longest-path placement is and . Its width is and its height is . A longest to path is a critical path: the blocks on it decide the width or the height.
Facts. Each one follows from the definitions in a few lines.
- Feasibility. Some placement satisfies the pair if and only if both graphs are acyclic. If has a cycle , adding the constraints along it gives , which is false since the widths are positive. If both graphs are acyclic, the longest-path placement satisfies each edge, because a longest path to is at least as long as a longest path to followed by the edge .
- Least placement. Every placement that satisfies the pair has and for each block. Along a longest path , the constraints give and , so is at least the length of the path. So the longest-path placement has the least width and the least height, at the same time, among all placements that satisfy the pair.
- No overlap. If the pair is complete and acyclic, the longest-path placement is a packing. A path in starts with an edge of weight , and all other weights are positive, so fact 2 applied to the path gives : is left of . A path in puts one block below the other in the same way.
- Every packing has a pair. For a packing, put an edge in whenever is left of , and in whenever is below . Both graphs are acyclic, because (or ) grows strictly along each edge. The pair is complete, because each pair of blocks has one of the four relations. The packing satisfies its own pair, so by fact 2 the longest-path placement of the pair is a packing that is no wider and no taller. It is the packing pushed as far left and down as its relations allow. So an optimal packing for area is always the longest-path placement of some complete acyclic pair.
- Only reachability counts. Adding an edge when a path already exists does not change any value, because that path is at least long. Removing such an edge does not change them either. So a pair can be replaced by its transitive reduction or by its transitive closure, and what matters are the two strict partial orders "left of" and "below" that the graphs generate.
- Cost. With edges, a topological sort and one pass give all of in time on the word RAM. A complete pair has at least one path for each of the pairs of blocks, and when each pair is a direct edge there are edges, so decoding a sequence pair this way costs . The weighted longest common subsequence method of Tang, Tian and Wong finds the same longest paths in time without building the graphs.
Extra constraints. Design rules often add constraints that are not of the form "left of". A lower bound is an edge of weight . An upper bound , for example to keep two blocks close, is an edge of weight . Such edges can close cycles. The least solution then exists if and only if no cycle has positive total weight, and the Bellman-Ford algorithm finds it, or reports the positive cycle, in time. A fixed outline is met if and only if and .
Examples and non-examples
A complete pair. Take four blocks with sizes : , : , : and : (width times height). Let have the edges and , and let have the edges , and . The six pairs are joined as follows: and in , and , , and (by the path ) in . So the pair is complete. The longest paths give:
| block | size | rectangle | ||
|---|---|---|---|---|
The width is , on the critical path , and the height is , on . The area is , and the blocks cover of it. By fact 2, no placement that keeps these five relations is narrower than or lower than .
Non-example: a missing relation. Remove the edge . Now no path joins and in either graph, so the pair is not complete. The longest paths give , and becomes , which overlaps in the square . Satisfying the constraints is not enough: without completeness, nothing keeps two blocks apart.
Non-example: a cycle. Add the edge to . The cycle asks for and , so no placement satisfies the pair.
Redundant relations are allowed. Add the edge to as well, so that is both left of and below . The pair is still complete and acyclic, and the placement is still a packing, but now , and the height grows to . A pair that relates a pair of blocks in both graphs is legal, but it can cost area. Representations such as the sequence pair and TCG put each pair of blocks in exactly one graph.
A slicing structure. For a slicing floorplan, a vertical cut puts every block of the left part left of every block of the right part, and a horizontal cut does the same for below and above. So the transitive closure of is built from the slicing tree by series composition at the vertical cuts and by disjoint union at the horizontal cuts: it is a series-parallel order.
Related definitions
- Sequence pair. Two orders of the blocks that define a complete pair in which each pair of blocks has exactly one relation. Its edges go forward in one of the two orders, so both graphs are acyclic.
- B*-tree and O-tree. Trees that fix the coordinate of each block from its parent and find each coordinate with a contour, so they build neither graph.
- TCG (transitive closure graph). Lin and Chang (2001) store the pair itself, both graphs transitively closed, with each pair of blocks in exactly one of them. A move edits edges and then repairs the closure.
- Difference constraints and DAG longest paths. The constraint system and the algorithm that solves it; the critical path is the same notion as in critical path scheduling.
- Mosaic floorplan. A dissection of the chip into rooms. Its graphs can be taken on adjacent rooms only, an edge for each pair of rooms that touch across a segment.
- Floorplanning. The optimization problem in which these graphs evaluate one candidate.
References
- Hiroshi Murata, Kunihiro Fujiyoshi, Shigetoshi Nakatake and Yoji Kajitani, VLSI module placement based on rectangle-packing by the sequence-pair, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 15(12), 1518 to 1524, 1996, the horizontal and vertical constraint graphs of a sequence pair and the packing by longest paths in them
- Jai-Ming Lin and Yao-Wen Chang, TCG: a transitive closure graph-based representation for non-slicing floorplans, Proceedings of the 38th Design Automation Conference, 764 to 769, 2001, the representation by a pair of transitively closed constraint graphs in which each pair of blocks is related in exactly one graph
- Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest and Clifford Stein, Introduction to Algorithms, fourth edition, MIT Press, 2022, Section 22.2 (single-source shortest paths in directed acyclic graphs, and longest paths by negated weights) and Section 22.4 (difference constraints and shortest paths)
- Andrew B. Kahng, Jens Lienig, Igor L. Markov and Jin Hu, VLSI Physical Design, From Graph Partitioning to Timing Closure, second edition, Springer, 2022, Chapter 3, Chip Planning (constraint graphs of floorplans and sequence pairs; general locator)
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 3CZSKW Edit this page History Report an error Markdown