project-rig / rig_c_sa

Python C module for the Rig simulated annealing placer C kernel
GNU General Public License v2.0
0 stars 1 forks source link

Scale HPLW cost function by sqrt(n). #4

Closed mossblaser closed 8 years ago

mossblaser commented 8 years ago

The HPWL cost function under-estimates net cost for nets with fan-out greater than 3. The error grows at a rate proportional to sqrt(n). By scaling the cost by this amount, the error is reduced for larger-fan-out nets. See "The largest minimal rectilinear steiner trees for a set of n points enclosed in a rectangle with given perimeter" Chung, FRK and Hwang, FK 1979.

The error of HPWLxy (the old cost model) and sqrt(n)*HPWLxy (the cost model in this change) can be seen to be smaller as fan-out grows. A plot is shown below taken from some experiments in my thesis where random nets are generated and and the cost estimated by these cost functions is compared with the cost resulting from running the NER routing algorithm.

Net cost functions

Note that the non-zero error here can be partly attributed to the sqrt(n) error only being correct for "very large" fan outs and also due to the NER router not actually producing perfectly minimal routes... Real-world implementations used a LUT of scaling factors up to about fan-out-50. Due to time/laziness constraints I've not explored this yet.

As an aside, the 'star' cost function (seen blasting off the top of the plot) was considered in the distance-cost branch and found to produce considerably worse placement results.

mundya commented 8 years ago

Rigged