Definitionintro
Half-perimeter wirelength
Also called HPWL, bounding box wirelength.
Half the perimeter of the bounding box of a net's pins, exact for nets of two or three pins and the standard estimate of routed wire length.
The half-perimeter wirelength (HPWL) of a net is the width plus the height of the smallest axis-parallel rectangle that contains all its pins. It is a lower bound on the length of every rectilinear tree that connects the pins, and it is equal to the length of the shortest such tree when the net has two or three pins. For larger nets it can be too small by a factor that grows with the number of pins. It is cheap to compute, separates into an part and a part, and is a convex function of the pin positions, so it is the standard objective of placement.
Definition
Let a net have pins with positions in the plane. Its half-perimeter wirelength is
For a netlist with nets and net weights , the total HPWL is . It costs time for pins in total.
Pin positions. A pin sits on a cell. If cell has its reference point at and the pin has offset inside the cell, the pin position is , with the offset turned or mirrored when the cell is turned or mirrored. A model with pin offsets uses these positions. A model without pin offsets puts every pin at the center of its cell, which is the usual choice in global placement. The two models can give different values and different optimal placements, so a statement about HPWL must say which one it uses. Pads and other fixed pins have fixed positions in both models. On this site the examples put pins at the cell centers unless they say otherwise.
Equivalent forms. . It is also the optimal value of the small linear program "minimize subject to and for all ". So the total HPWL is a convex function of the cell positions that is piecewise linear but not differentiable, and placement under HPWL can be written as a linear program once the order constraints that prevent overlap are fixed.
Two facts with proof. Let and be the width and height of the bounding box, and let be the length of a rectilinear Steiner minimum tree on the pins (see the rectilinear Steiner tree problem).
- Lower bound. Every connected union of horizontal and vertical segments that contains the pins has length at least . The projection of a connected set onto the -axis is an interval that contains all , so it has length at least . Only the horizontal segments add to that projection, and each adds at most its length, so the horizontal segments have total length at least . In the same way the vertical segments have total length at least . So for every net.
- Exact for . For two pins, an L-shaped path has length . For three pins, let be the point whose coordinates are the medians of the and of the . Connect each pin to it by an L-shaped path. The three horizontal parts have total length , because the median lies between the other two values, and the vertical parts add . With the lower bound, .
For a horizontal trunk at the median from to , with a vertical branch from each pin, has length . Pair the sorted values from the outside in: each pair adds at most , and the middle value of an odd count adds 0. So
Examples and non-examples
- Two pins. Pins at and : , the length of any monotone staircase between them.
- Three pins. Pins at , and . The box is , so . The median point is , and the three L-shaped paths have lengths , and , which sum to 7. No tree is shorter.
- Four corners, a non-example. Pins at the corners of a square: , but every rectilinear tree on them has length at least 6 (an H shape with three segments of length 2 reaches 6). Here HPWL is too small by a factor .
- A grid of pins. Take the unit grid of pins . Then . Every point of the Hanan grid (the grid of horizontal and vertical lines through the pins, see the Hanan theorem) is a pin, so a Steiner minimum tree is a spanning tree of the grid graph and has length . For this is 8 against an HPWL of 4. The ratio grows like in the number of pins, so no constant factor links HPWL and Steiner length for large nets.
- Pin offsets change the answer. Two cells of width 4 sit side by side with centers at and . A net joins a pin at offset (the right edge) of the first cell with a pin at offset (the left edge) of the second. Without offsets the net has HPWL 4. With offsets both pins are at and the HPWL is 0. Mirroring both cells moves the pins to and , and the HPWL becomes 8.
- Not a routed length. HPWL ignores blockages, congestion, layers and vias. A net that the router must detour around a macro has a routed length larger than its RSMT, and so larger than its HPWL.
Related definitions
- Rectilinear Steiner minimum tree. The exact length of the shortest connection. Computing it is NP-hard (see rectilinear Steiner tree problem). FLUTE gives it exactly for small nets by lookup tables. HPWL is the cheap lower bound that is tight for .
- Rectilinear minimum spanning tree. Another estimate, at most times the Steiner length (Hwang 1976, see rectilinear minimum spanning tree). It costs more than HPWL.
- Clique and star models. Quadratic placers replace HPWL by a sum of squared distances on the edges of a clique or a star (see clique net model). These are smooth, but they are not equal to HPWL for .
- Smooth approximations. Analytical placers replace the max and the min by a soft maximum, as in the log-sum-exp wirelength, so that gradients exist.
- Cut-line form. On a grid with integer pin coordinates, the HPWL of a net equals the number of the lines and that separate its pins. Summed over nets, the total HPWL equals the sum over these lines of the number of nets that cross them. Min-cut placement is built on this form.
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 4, Global and Detailed Placement (the wirelength objective and its estimates, including the half-perimeter of the bounding box)
- Naveed A. Sherwani, Algorithms for VLSI Physical Design Automation, third edition, Kluwer, 1999, the chapter on placement (estimates of wire length used by placement algorithms)
- M. Hanan, On Steiner's problem with rectilinear distance, SIAM Journal on Applied Mathematics 14(2), 255 to 265, 1966, the reduction of the rectilinear Steiner problem to the grid of horizontal and vertical lines through the points
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 5FH55N Edit this page History Report an error Markdown