Problemcore
Floorplanning
Also called floorplan design.
Place rectangular blocks of fixed or flexible shapes without overlap so the chip area and the wire length between blocks are small.
Floorplanning is the first step of the physical design of a chip. The design is split into large blocks, such as processor cores, memories and analog parts, and each block has a size, or a fixed area with a choice of shapes. Floorplanning places these blocks as rectangles in the plane, with no two of them overlapping, so that the chip is small and the wires between the blocks are short. It comes before the placement of the standard cells, which then fill the space between and inside the blocks. The problem contains bin packing and strip packing, so it is strongly NP-hard, and in practice it is solved by a search over a combinatorial representation, such as a slicing tree or a sequence pair, with an exact computation of the coordinates for each candidate.
In plain words
Think of a house plan. You have a list of rooms, each with a size, and some rooms must be close to each other because people walk between them often. You want a plan in which no two rooms overlap, the house is small, and the walks are short. A chip is the same: the rooms are large circuit blocks, and the walks are the wires between them. Some blocks have a fixed size, and some can be made long and thin or short and wide. Very often the outline of the chip is given in advance, and then all blocks must fit inside it. Even small versions of this task are hard to solve exactly, so programs try many plans in a clever order and keep the best one.
Definition
Input.
- Blocks . A hard block has a width and a height , and may be allowed to turn by a quarter turn. A soft block has an area and limits on its aspect ratio, so its shape is free on the curve between these limits.
- A netlist: a hypergraph whose vertices are the blocks and the fixed pins of the chip, and whose edges, the nets, have weights .
- Weights of area and wire length, or a fixed outline of width and height .
Output. For each block a shape that it allows and a position of its lower-left corner, with , such that the rectangles have disjoint interiors.
Objective. Let and . The classical form minimizes
where is the half-perimeter wire length of the net , with each block taken at its center. The fixed-outline form requires and and minimizes the wire length alone.
Decision version. Given hard blocks with integer sizes and fixed orientations and an outline , is there a packing of all blocks inside the outline?
Variants
- Hard or soft blocks. Hard blocks give a choice of at most two shapes each, soft blocks a continuum. Mixed sets of both are common.
- Rotation. Hard blocks with a free orientation have two shapes, and mirror images are allowed as well when the pins of the blocks permit it.
- Fixed outline. The outline is given by the chip size or by the parent block in a hierarchical flow. This is the usual modern form, and it is harder for local search, since many candidates do not fit at all (Adya and Markov 2003).
- Slicing only. The floorplan must be a slicing floorplan. The best sizes of the blocks are then found exactly by shape functions, at the cost of some area.
- Extra constraints. Preplaced blocks, blocks on the boundary, alignment of blocks, a maximum distance between two blocks, and keep-out regions. Many of them are difference constraints on the coordinates and fit into the constraint graphs.
- Other costs. Timing on critical nets, routing congestion, power supply and heat, and the number of layers in 3D chips.
Examples
Three blocks. Take of size , of size and of size (width times height), with no nets, so that only the area counts. The blocks have a total area of .
- Without rotation the least area is . Put at , at and at : the chip is , with one empty unit square at . No packing has a smaller area. Every packing can be pushed down and to the left until each block touches the floor, the left wall or another block, without making the chip larger, and then and are sums of block sides, so they are integers. Since for and for , an area at most leaves only the square, with no empty space. There fills a whole column. If is not at a side, the two parts next to it are narrower than , and fits in neither. So is at a side and and share a part. The block fills the width of this part, so is above or below it, and the heights add up to .
- With rotation the least area is . Turn to and put it at , at and at : the square is full.
Area against wire length. Add a net of weight to the rotated example. In the packing the centers of and are at and , so the net has length and the cost is . Now put at , at and the turned at . The centers of and are at the same height, the net has length , and the chip is , with the cost . The second packing is better exactly when , so the weights decide whether area or wire length wins.
A pinwheel. Two blocks, two blocks and a block fill a square in a pinwheel pattern, but every slicing floorplan of them with fixed orientations has area at least , as the slicing floorplan page shows. So the slicing restriction can cost area.
Known algorithms
- Simulated annealing over slicing trees. Wong and Liu (1986) search over normalized Polish expressions with simulated annealing, and size each candidate with shape functions (Wong-Liu floorplanning, Stockmeyer floorplan sizing).
- Non-slicing representations. The sequence pair (Murata and others, 1995), the O-tree (Guo and others, 1999), the B*-tree (Chang and others, 2000) and the corner block list (Hong and others, 2000) each map a code to a packing in or time, and annealing or other local search moves between codes.
- Exact search. Every packing has a sequence pair whose packing is no wider and no higher (Murata and others). So a search over all sequence pairs, with all orientations, finds the least area exactly, but only for small .
- Integer programming. For each pair of blocks, four binary choices say which of left, right, below and above holds, and big-M constraints turn the chosen relation into a linear inequality. This gives a mixed integer program whose size is , solved exactly for small or used to refine a part of a floorplan.
- Fixed-outline floorplanners. Parquet (Adya and Markov 2003) and later tools change the cost so that the search is pushed into the outline first, and then reduce the wire length.
- Analytical and hierarchical methods. Blocks are first spread by a smooth model of wire length and density, as in analytical placement, or split by min-cut partitioning, and then made legal by a packing step.
| Algorithm | Time | Space | Properties | Code |
|---|---|---|---|---|
| Stockmeyer's floorplan sizing | O(n d) worst · average | O(n d) extra | deterministicexactiterative | 1 language |
| Symmetric-feasible sequence pair | O(n) check · repair | O(n^2) extra | deterministiciterative | 1 language |
| Thermal-driven 3D floorplanning | O(M (n^2 + p + g^2 L + n g^2)) annealing | O(n^2 + p + g^2 L) total | randomizednot exactiterative | 1 language |
| Wong-Liu floorplanning | O(s k n^2 d) worst · average | O(n d) extra | randomizednot exactiterative | 1 language |
Bounds
- NP-complete. The decision version is NP-complete in the strong sense. It is in NP: a certificate is the relation (left, right, below or above) of each pair of blocks, and the longest paths in the two constraint graphs check it in polynomial time, because any packing gives such relations and the longest path placement for them is no larger. The reduction from bin packing below gives the hardness.
- Orientation. For a fixed slicing floorplan, the best orientation of all hard blocks is found in time for a tree of depth . For a general floorplan, given by its constraint graphs, the same question is NP-complete (Stockmeyer 1983).
- Area lower bound. The area is at least , and at least . The examples above show that neither bound is always attained.
- Size of the search spaces. There are normalized Polish expressions, with the large Schröder numbers , labeled mosaic floorplans, with the Baxter numbers , and sequence pairs. The growth rates of and are and (Baxter number theorem).
Reductions
- From bin packing. Take a bin packing instance with integer item sizes , bin capacity and bins. Make hard blocks with fixed orientation and the outline . If the items fit into bins, put bin in the row . Conversely, given a packing in the outline, push each block straight down, in the order of increasing , until it touches the floor or a block below it. By induction all values become integers, and the height does not grow. Then each row holds blocks with disjoint -intervals in , which is a bin. Bin packing is strongly NP-complete, through 3-partition, so the decision version of floorplanning is too (strong NP-hardness).
- To and from strip packing. With a fixed width, no rotation, no nets and the height as the cost, floorplanning is exactly strip packing, whose approximation results then apply.
- To longest paths. Once the relation of each pair of blocks is fixed, the coordinates are the longest paths in two directed acyclic graphs, which is how every representation above computes its packing.
Applications
- Chip planning. Floorplanning fixes the places of large blocks and macros, the outline of the chip, and the regions for standard cells, before placement and routing.
- Hierarchical design. Each level of a large design is floorplanned inside the outline given by the level above it, which is why the fixed-outline form is the usual one.
- FPGA and 3D chips. The same problem appears with a grid of resources on an FPGA and with blocks spread over the layers of a 3D chip.
- Layout of rooms and plants. Facility layout in buildings and plants asks the same question with departments in place of blocks and the flow of goods in place of wires.
References
- 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 (the floorplanning problem, its objectives, and slicing and non-slicing representations; general locator)
- D. F. Wong and C. L. Liu, A new algorithm for floorplan design, Proceedings of the 23rd ACM/IEEE Design Automation Conference, 101 to 107, 1986, the cost of area plus weighted wire length, and simulated annealing over normalized Polish expressions
- 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 sequence pair, and the fact that every packing has a sequence pair whose packing is no larger
- Saurabh N. Adya and Igor L. Markov, Fixed-outline floorplanning, enabling hierarchical design, IEEE Transactions on Very Large Scale Integration Systems 11(6), 1120 to 1135, 2003, the fixed-outline formulation and its difference from the minimum area formulation
- Larry Stockmeyer, Optimal orientations of cells in slicing floorplan designs, Information and Control 57(2-3), 91 to 101, 1983, the polynomial orientation algorithm for slicing floorplans, and NP-completeness for general floorplans
- Michael R. Garey and David S. Johnson, Computers and Intractability, A Guide to the Theory of NP-Completeness, W. H. Freeman, 1979, the appendix entry for bin packing and the strong NP-completeness of 3-partition
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 | W2 basic |
|
Tag WCAQB2 Edit this page History Report an error Markdown