Algorithmresearch
Electrostatics-based placement
Also called ePlace.
Lu and coauthors' placement that models cells as charges, computes the density penalty as electric potential by FFT and minimizes with Nesterov's method.
- Solves
- Placement
- Time
- O(k (P + n + M^2 log M)) worst · averageO(P + n + M^2 log M) best
- Space
- O(P + n + M^2) extra
- Where
- M = the number of bins on each side of the grid; P = the number of pins; k = the number of iterations; n = the number of movable cells
- Model
- Real RAM
- Properties
- deterministicnot exactiterative
- Evidence
- Proof sketchCode in 1 languages
- Origin
- Jingwei Lu, Pengwen Chen, Chin Chih Chang, Lu Sha, Dennis Jen Hsin Huang, Chin Chi Teng, Chung Kuan Cheng, 2014
Electrostatics-based placement is a global placer for the placement problem in chip design. It treats each cell as a positive electric charge equal to its area. Crowded regions then have a high electric potential, and the electric field pushes the cells out of them. The density penalty is the potential energy of the system, found by solving Poisson's equation on a grid of bins with cosine and sine transforms, computed by the fast Fourier transform. The placer minimizes a smooth wirelength plus times this energy by Nesterov's method with a diagonal preconditioner, and raises until the overflow is small. ePlace (Lu and coauthors, 2014 and 2015) introduced the method, and RePlAce extended it. It is an analytical placement method: a heuristic with a smooth objective, whose output is still to be legalized.
In plain words
Think of every part of the circuit as a small charged ball. Balls with the same charge push each other away, and the push is strongest where many balls are packed together. The wires act like rubber bands that pull connected balls together.
The placer lets both forces act, a little at a time, and makes the push stronger step by step. In the end the balls are spread fairly evenly over the board, and the bands still keep connected balls near each other. A short cleanup step then puts each ball on an exact spot.
The problem
The input is a netlist with movable cells of widths and heights , fixed pads, nets with weights , and pins, with every pin at the center of its cell. The region is the square , cut into bins of side . The output is a position for each cell in the region, with a small wirelength and a small overflow
where is the cell area inside bin divided by . Overlap is allowed in the output; the legalizer removes it.
Electrostatics. Let be the density on the grid, and the coordinate in bin units. The potential solves
where is the mean density, which must be removed for a solution to exist with this border condition. The field is . With and the cosine coefficients of (a 2D discrete cosine transform, with ),
and in the same way. Every term has a zero normal derivative on the border, because at and .
Objective. With the log-sum-exp wirelength and the energy with , minimize . ePlace takes the gradient of for cell as , the force on a charge in a field, and ignores the change of the field caused by the cell itself.
The algorithm
EPLACE(cells, nets, pads, M × M bins, γ, target τ*)- 1
put the cells near the center of the region (v ← u ← start) - 2
λ ← Σ|∇W_γ| / Σ q_i |ξ_i| at the start; a ← 1 - 3
repeat - 4
ρ ← bin densities of the cells at v - 5
a_uv ← DCT of ρ; ψ, ξ ← potential and field from a_uv / (ω_u² + ω_v²) - 6
g_i ← (∇_i W_γ(v) − λ q_i ξ(v_i)) / (|E_i| + λ q_i) ▷ preconditioned gradient - 7
α ← |v − v_prev| / |g − g_prev| ▷ inverse Lipschitz estimate - 8
u_new ← clamp(v − α g) to the region - 9
a_new ← (1 + √(4a² + 1)) / 2; v ← clamp(u_new + (a − 1)/a_new · (u_new − u)); u ← u_new; a ← a_new - 10
λ ← 1.1 λ - 11
until τ(v) ≤ τ* - 12
return u
Line L5 is the electrostatic step. The forward transform is a DCT, and the potential and the two field components are inverse transforms of the same coefficients with cosines and sines. With the FFT each costs . In line L6, is the number of nets of cell ; ePlace divides by this approximate diagonal of the Hessian so that cells of very different sizes move at similar speeds. Line L7 is the step of ePlace: the inverse of a local estimate of the Lipschitz constant of the gradient, from the last two points. Line L9 is Nesterov's update: is the main sequence and the look-ahead point. ePlace changes by a factor near 1 that depends on the change of HPWL in the last step; the implementation here uses the fixed factor 1.1.
Example
Potential of one full bin. A grid of bins of side 1 has all cell area in bin : there and 0 in the other three bins, so . Then , and the coefficients are , and . At the bin centers:
| bin | ||||
|---|---|---|---|---|
| 2 | ||||
| 0 | ||||
| 0 | ||||
| 0 |
For example . The potential is highest in the full bin and lowest in the far corner, and the field points from the full bin toward the empty ones in every bin. The four potentials sum to 0, and the energy is . The tests check these values against the direct sums.
A run. On 5 random netlists of 16 unit cells in an region with unit bins (seed 14, all cells started within 0.1 of the center), the overflow starts at 0.75 and falls below the target 0.1 in 16 to 22 iterations. With 32 cells it starts at 0.875 and needs 25 to 95 iterations.
Correctness
The electrostatic part is exact: the coefficients reproduce at the bin centers, the series solves Poisson's equation with the border condition for the cosine interpolant of , and is . See the proof. The tests check the transform against the direct formula, the Poisson equation by finite differences at the bin centers, the field by finite differences of , and the gradient of by finite differences.
The optimization has no such guarantee. Nesterov's method reaches error for a convex function with a Lipschitz gradient and a fixed step, but is not convex, changes at every step, and the step of line L7 is an estimate. So the placer is a heuristic: it stops when the overflow is small, not at a proved optimum.
Proof: The cosine coefficients reproduce the density, the cosine series solves Poisson's equation with a zero normal derivative, and the field is minus its gradientfull
Let , let be an array, and write , and . Bin has its center at . Line L5 computes
Lemma 1 (orthogonality at the bin centers). For ,
Proof. Write and . Then . For , is the real part of , where the denominator is not 0. If is even, and the sum is 0. If is odd, the sum is , which has real part 0. So for . By the product formula, the sum of the lemma is . Both indices lie in . If both are 0, giving . If , the first is and the second 0, giving . If , both are nonzero, giving 0.
Theorem 1 (the transform is exact). For every bin, , and is the mean of .
Proof. The vectors are pairwise orthogonal and nonzero by Lemma 1, so they are a basis of , and the products of two of them are a basis of the arrays. Write in this basis. Taking the inner product with and using Lemma 1 twice gives , so . For , .
Theorem 2 (Poisson's equation and the field). Let , the cosine interpolant of ; by Theorem 1 it equals at the bin centers. The function satisfies on , its normal derivative is 0 on the border, and its integral over the square is 0. The field of line L5 is in length units.
Proof. For , , so every term is defined. , so by Theorem 1. The derivative of is , which is 0 at and at , because . So on the vertical sides, and in the same way on the horizontal sides. Each term with has one factor with or with , whose integral over is , so . Finally , and gives the factor in ; the same holds for .
A uniform has for by Theorem 1 and Lemma 1, so and : a spread placement feels no density force.
Theorem 3 (termination and running time). The loop of lines L3 to L11 runs at most the given number of times. One iteration costs time with FFT-based transforms, and with the separable direct sums of the implementation, if no cell overlaps more than a constant number of bins.
Proof. The implementation stops at the iteration limit even if stays above . The value and gradient of visit each pin a constant number of times, . Line L4 clears bins and adds each cell to bins. A separable direct transform does sums of length for each of outputs, twice, so ; a DCT or DST of length by the FFT costs , and of them cost . Lines L6 to L10 do work per cell, and costs .
Complexity
- Wirelength. The value and the gradient of cost .
- Density. With no cell larger than a few bins, line L4 costs .
- Transforms. One DCT and three inverse transforms by the FFT, . The implementation here uses separable direct sums, , which is simpler and fast enough for small grids.
- Field at the cells and the update. .
So iterations cost time and space. With about one bin per cell, , and the transforms cost per iteration.
Properties
What is proved.
- The coefficients give back exactly at the bin centers, and is the mean density.
- The series solves for the cosine interpolant of , with a zero normal derivative on the border, and . A uniform density gives and no field.
- The method stops after the iteration limit, and each iteration costs the time above.
What is measured. The numbers in the example come from the implementation on toy inputs, not from benchmarks. ePlace was measured on the ISPD 2005 and 2006 benchmarks against the placers of its time, and RePlAce on the same suites and on routability benchmarks; both report smaller HPWL than the earlier analytical placers at the same target density. See those papers for the numbers. None of those results has a proof.
Variants and improvements
- Weighted average wirelength. ePlace uses the weighted average model instead of LSE (see the log-sum-exp wirelength page). It is closer to HPWL for the same .
- Smoothing with the overflow. ePlace ties to the overflow, large at the start and small at the end, so the wirelength gets sharper as the cells spread.
- Mixed size. ePlace-MS places macros and standard cells together, with the macros as large charges, and then fixes the macros before the cells are finished.
- RePlAce. Adds a local density per bin, so the penalty adapts to the region, and routability-driven inflation of cells in congested regions.
- GPU placers. DREAMPlace runs the same model as a deep learning toolkit on a GPU, with the transforms and gradients as batched operations.
- Other density penalties. Earlier analytical placers, such as NTUplace3, use a bell-shaped smoothing of the bin density instead of a potential. Force-directed placement in Kraftwerk also uses a potential from Poisson's equation, but with a quadratic wirelength and a linear solve.
When to use it
Use an electrostatics-based placer for large standard cell and mixed-size designs when you want the best wirelength from global placement and can afford a few hundred gradient iterations. The density penalty is global, so it spreads cells smoothly over the whole region, and the cost per iteration is near linear. For a quick placement, a quadratic placer such as SimPL is simpler and often faster. The output must still go through legalization and detailed placement.
Pitfalls
- Forgetting to remove the mean. With zero normal derivative on the border, Poisson's equation has a solution only if the source has zero mean. Drop the term .
- The wrong transform. The border condition calls for a cosine series. A plain FFT of assumes a periodic region, where a cell at the right edge pushes cells at the left edge.
- A grid too coarse. If a bin is much larger than a cell, the density inside a bin is flat and cells in the same bin feel no force from each other.
- The step without a bound. The estimate of line L7 can be very large when the gradient barely changes; ePlace backtracks if the estimate is not consistent. The implementation here caps at one bin.
- Exponent overflow. Use the shift by the maximum in , as on the log-sum-exp page.
Implementations
Each implementation follows the pseudocode above. A comment @line links a line of code to a line of the pseudocode. Point at a line of the pseudocode to see the matching code. The build runs the native tests of each language.
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/electrostatics-based-placement/. The authors are listed in prov/KESX1E.jsonl.
"""Electrostatics-based global placement in the style of ePlace, on a small grid.
Pins 0 .. n-1 are the movable cells and pins n, n+1, ... are the fixed pads.
A cell position is its center, and every pin sits at the center of its cell.
The region is [0, M B] x [0, M B], cut into M x M bins of side B.
The cosine transforms are direct separable sums in O(M^3) time; ePlace computes
the same transforms by the FFT in O(M^2 log M) time.
The wirelength model is log-sum-exp (ePlace itself uses the weighted average model).
"""
import math
# ---------- wirelength ----------
def lse_wirelength(x, y, nets, weights, pads, gamma):
"""Return (W, gx, gy): the total LSE wirelength and its gradient over the cells."""
n = len(x)
gx, gy = [0.0] * n, [0.0] * n
total = 0.0
for e, w in zip(nets, weights):
for coord, grad, k in ((x, gx, 0), (y, gy, 1)):
vals = [coord[p] if p < n else pads[p - n][k] for p in e]
hi, lo = max(vals), min(vals)
ea = [math.exp((v - hi) / gamma) for v in vals]
eb = [math.exp((lo - v) / gamma) for v in vals]
sa, sb = sum(ea), sum(eb)
total += w * (hi + gamma * math.log(sa) - lo + gamma * math.log(sb))
for p, a, b in zip(e, ea, eb):
if p < n:
grad[p] += w * (a / sa - b / sb)
return total, gx, gy
def hpwl(x, y, nets, weights, pads):
n = len(x)
total = 0.0
for e, w in zip(nets, weights):
xs = [x[p] if p < n else pads[p - n][0] for p in e]
ys = [y[p] if p < n else pads[p - n][1] for p in e]
total += w * (max(xs) - min(xs) + max(ys) - min(ys))
return total
# ---------- density and the Poisson equation ----------
def bin_density(x, y, W, H, M, B):
"""rho[u][v] = cell area inside bin (u, v), divided by the bin area B^2."""
rho = [[0.0] * M for _ in range(M)]
for i in range(len(x)):
x0, x1 = x[i] - W[i] / 2, x[i] + W[i] / 2
y0, y1 = y[i] - H[i] / 2, y[i] + H[i] / 2
for u in range(max(0, int(x0 // B)), min(M, int(x1 // B) + 1)):
ox = min(x1, (u + 1) * B) - max(x0, u * B)
if ox <= 0:
continue
for v in range(max(0, int(y0 // B)), min(M, int(y1 // B) + 1)):
oy = min(y1, (v + 1) * B) - max(y0, v * B)
if oy > 0:
rho[u][v] += ox * oy / (B * B)
return rho
def _table(M, f):
"""T[u][x] = f(pi u (x + 1/2) / M), the basis at the bin centers."""
return [[f(math.pi * u * (x + 0.5) / M) for x in range(M)] for u in range(M)]
def dct2(rho):
"""Coefficients a[u][v] with rho[x][y] = sum_uv a[u][v] cos(w_u (x + 1/2)) cos(w_v (y + 1/2)),
w_u = pi u / M. Separable direct sums."""
M = len(rho)
C = _table(M, math.cos)
c = [1.0 / M] + [2.0 / M] * (M - 1)
t = [[c[v] * sum(rho[x][y] * C[v][y] for y in range(M)) for v in range(M)] for x in range(M)]
return [[c[u] * sum(t[x][v] * C[u][x] for x in range(M)) for v in range(M)] for u in range(M)]
def _synth(A, fu, fv):
"""S[x][y] = sum_uv A[u][v] fu[u][x] fv[v][y]."""
M = len(A)
t = [[sum(A[u][v] * fv[v][y] for v in range(M)) for y in range(M)] for u in range(M)]
return [[sum(t[u][y] * fu[u][x] for u in range(M)) for y in range(M)] for x in range(M)]
def potential_and_field(rho, B):
"""Solve -lap psi = rho - mean(rho) with zero normal derivative on the border, by the cosine series.
Return (a, psi, ex, ey) at the bin centers; the field is xi = -grad psi, in length units."""
M = len(rho)
a = dct2(rho) # @line L5
w = [math.pi * u / M for u in range(M)]
Ap = [[0.0 if u == v == 0 else a[u][v] / (w[u] ** 2 + w[v] ** 2) for v in range(M)] for u in range(M)]
Ax = [[Ap[u][v] * w[u] for v in range(M)] for u in range(M)]
Ay = [[Ap[u][v] * w[v] for v in range(M)] for u in range(M)]
C, S = _table(M, math.cos), _table(M, math.sin)
psi = _synth(Ap, C, C)
ex = [[val / B for val in row] for row in _synth(Ax, S, C)]
ey = [[val / B for val in row] for row in _synth(Ay, C, S)]
return a, psi, ex, ey
def psi_at(a, tx, ty):
"""The potential at a point (tx, ty) in bin units, from the coefficients."""
M = len(a)
total = 0.0
for u in range(M):
for v in range(M):
if u == v == 0:
continue
wu, wv = math.pi * u / M, math.pi * v / M
total += a[u][v] / (wu * wu + wv * wv) * math.cos(wu * tx) * math.cos(wv * ty)
return total
def overflow(rho, area_total, B, target=1.0):
"""tau = sum over bins of the area above the target density, divided by the total cell area."""
return sum(max(0.0, r - target) for row in rho for r in row) * B * B / area_total
# ---------- the placer ----------
def eplace(n, nets, pads, W, H, M, B, gamma=None, tau_stop=0.1, max_iter=300, start=None, history=None):
"""Return the cell centers after Nesterov's method on W_gamma + lambda N, as in ePlace."""
X = M * B
weights = [1.0] * len(nets)
q = [W[i] * H[i] for i in range(n)]
area = sum(q)
deg = [0] * n
for e in nets:
for p in e:
if p < n:
deg[p] += 1
if gamma is None:
gamma = 0.5 * B
if start is None:
start = [(X / 2, X / 2)] * n
lo = [(W[i] / 2, H[i] / 2) for i in range(n)]
hi = [(X - W[i] / 2, X - H[i] / 2) for i in range(n)]
def clamp(px, py):
return ([min(max(px[i], lo[i][0]), hi[i][0]) for i in range(n)],
[min(max(py[i], lo[i][1]), hi[i][1]) for i in range(n)])
def gradients(px, py):
_, wx, wy = lse_wirelength(px, py, nets, weights, pads, gamma)
rho = bin_density(px, py, W, H, M, B) # @line L4
_, _, fx, fy = potential_and_field(rho, B)
cx, cy = [], []
for i in range(n):
u = min(M - 1, max(0, int(px[i] // B)))
v = min(M - 1, max(0, int(py[i] // B)))
cx.append(fx[u][v])
cy.append(fy[u][v])
return wx, wy, cx, cy, rho
vx, vy = clamp([p[0] for p in start], [p[1] for p in start]) # @line L1
wx, wy, cx, cy, rho = gradients(vx, vy)
dens = sum(abs(q[i] * cx[i]) + abs(q[i] * cy[i]) for i in range(n))
lam = sum(abs(g) for g in wx + wy) / dens if dens > 0 else 1.0 # @line L2
ux, uy = vx, vy
a = 1.0
prev = None
for it in range(max_iter): # @line L3
if it > 0:
wx, wy, cx, cy, rho = gradients(vx, vy)
tau = overflow(rho, area, B)
if history is not None:
history.append((tau, hpwl(vx, vy, nets, weights, pads)))
if tau <= tau_stop: # @line L11
ux, uy = vx, vy
break
gx = [(wx[i] - lam * q[i] * cx[i]) / (deg[i] + lam * q[i]) for i in range(n)] # @line L6
gy = [(wy[i] - lam * q[i] * cy[i]) / (deg[i] + lam * q[i]) for i in range(n)]
if prev is None:
alpha = 0.1 * B # @line L7
else:
dv = math.sqrt(sum((vx[i] - prev[0][i]) ** 2 + (vy[i] - prev[1][i]) ** 2 for i in range(n)))
dg = math.sqrt(sum((gx[i] - prev[2][i]) ** 2 + (gy[i] - prev[3][i]) ** 2 for i in range(n)))
alpha = dv / dg if dg > 0 else 0.1 * B
alpha = min(alpha, B)
prev = (vx, vy, gx, gy)
nux, nuy = clamp([vx[i] - alpha * gx[i] for i in range(n)], [vy[i] - alpha * gy[i] for i in range(n)]) # @line L8
an = (1 + math.sqrt(4 * a * a + 1)) / 2 # @line L9
beta = (a - 1) / an
vx, vy = clamp([nux[i] + beta * (nux[i] - ux[i]) for i in range(n)],
[nuy[i] + beta * (nuy[i] - uy[i]) for i in range(n)])
ux, uy, a = nux, nuy, an
lam *= 1.1 # @line L10
return ux, uy # @line L12
test_electrostatics_based_placement.py 138 lines
# SPDX-License-Identifier: MIT
# Part of https://algorithm.tamnd.com/electrostatics-based-placement/. The authors are listed in prov/KESX1E.jsonl.
import math
import random
from electrostatics_based_placement import (
bin_density,
dct2,
eplace,
lse_wirelength,
overflow,
potential_and_field,
psi_at,
)
def random_rho(rng, M):
return [[rng.choice([0.0, 0.25, 0.5, 1.0, 1.5, 2.0]) for _ in range(M)] for _ in range(M)]
def test_bin_density_against_a_direct_sum():
rng = random.Random(1)
for _ in range(80):
M, B = 4, 2.0
n = rng.randint(1, 7)
W = [rng.choice([0.5, 1.0, 1.5, 3.0]) for _ in range(n)]
H = [rng.choice([0.5, 1.0, 2.0]) for _ in range(n)]
x = [rng.randint(0, 32) / 4 for _ in range(n)] # multiples of 1/4: the float sums are exact
y = [rng.randint(0, 32) / 4 for _ in range(n)]
rho = bin_density(x, y, W, H, M, B)
for u in range(M):
for v in range(M):
direct = 0.0
for i in range(n):
ox = max(0.0, min(x[i] + W[i] / 2, (u + 1) * B) - max(x[i] - W[i] / 2, u * B))
oy = max(0.0, min(y[i] + H[i] / 2, (v + 1) * B) - max(y[i] - H[i] / 2, v * B))
direct += ox * oy
assert rho[u][v] == direct / (B * B)
def test_dct_matches_the_direct_formula_and_inverts():
rng = random.Random(2)
for M in (1, 2, 3, 5, 8):
rho = random_rho(rng, M)
a = dct2(rho)
for u in range(M):
for v in range(M):
cu = (1 if u == 0 else 2) / M
cv = (1 if v == 0 else 2) / M
direct = cu * cv * sum(rho[x][y] * math.cos(math.pi * u * (x + 0.5) / M) * math.cos(math.pi * v * (y + 0.5) / M)
for x in range(M) for y in range(M))
assert abs(a[u][v] - direct) < 1e-12
for x in range(M):
for y in range(M):
back = sum(a[u][v] * math.cos(math.pi * u * (x + 0.5) / M) * math.cos(math.pi * v * (y + 0.5) / M)
for u in range(M) for v in range(M))
assert abs(back - rho[x][y]) < 1e-12
assert abs(a[0][0] - sum(map(sum, rho)) / (M * M)) < 1e-12
def test_potential_solves_the_poisson_equation_at_the_bin_centers():
rng = random.Random(3)
h = 1e-3
for M in (4, 6):
rho = random_rho(rng, M)
mean = sum(map(sum, rho)) / (M * M)
a, psi, _, _ = potential_and_field(rho, 1.0)
for x in range(M):
for y in range(M):
tx, ty = x + 0.5, y + 0.5
assert abs(psi_at(a, tx, ty) - psi[x][y]) < 1e-12
lap = (psi_at(a, tx + h, ty) + psi_at(a, tx - h, ty) + psi_at(a, tx, ty + h)
+ psi_at(a, tx, ty - h) - 4 * psi_at(a, tx, ty)) / (h * h)
assert abs(-lap - (rho[x][y] - mean)) < 1e-4
def test_field_is_minus_the_gradient_and_vanishes_on_the_border():
rng = random.Random(4)
h = 1e-5
M, B = 5, 2.0
rho = random_rho(rng, M)
a, _, ex, ey = potential_and_field(rho, B)
for x in range(M):
for y in range(M):
tx, ty = x + 0.5, y + 0.5
dx = (psi_at(a, tx + h, ty) - psi_at(a, tx - h, ty)) / (2 * h) / B
dy = (psi_at(a, tx, ty + h) - psi_at(a, tx, ty - h)) / (2 * h) / B
assert abs(ex[x][y] + dx) < 1e-6 and abs(ey[x][y] + dy) < 1e-6
for t in (0.3, 1.7, 4.2):
for edge in (0.0, float(M)):
assert abs(psi_at(a, edge + h, t) - psi_at(a, edge - h, t)) / (2 * h) < 1e-8
assert abs(psi_at(a, t, edge + h) - psi_at(a, t, edge - h)) / (2 * h) < 1e-8
def test_uniform_density_has_no_field():
_, psi, ex, ey = potential_and_field([[0.7] * 4 for _ in range(4)], 1.0)
assert all(abs(v) < 1e-12 for grid in (psi, ex, ey) for row in grid for v in row)
def test_lse_gradient_against_finite_differences():
rng = random.Random(5)
h = 1e-6
for _ in range(30):
n = rng.randint(1, 5)
pads = [(rng.uniform(0, 8), rng.uniform(0, 8)) for _ in range(2)]
nets = [rng.sample(range(n + 2), rng.randint(2, min(4, n + 2))) for _ in range(rng.randint(1, 6))]
weights = [rng.randint(1, 3) for _ in nets]
x = [rng.uniform(0, 8) for _ in range(n)]
y = [rng.uniform(0, 8) for _ in range(n)]
gamma = rng.choice([0.25, 1.0, 2.0])
_, gx, gy = lse_wirelength(x, y, nets, weights, pads, gamma)
for i in range(n):
for coord, g in ((x, gx), (y, gy)):
coord[i] += h
up = lse_wirelength(x, y, nets, weights, pads, gamma)[0]
coord[i] -= 2 * h
down = lse_wirelength(x, y, nets, weights, pads, gamma)[0]
coord[i] += h
assert abs((up - down) / (2 * h) - g[i]) < 1e-5
def test_placer_spreads_cells_on_fixed_seeds():
rng = random.Random(14)
for k in range(4):
n, M, B = 24, 8, 1.0
q = 6
pads = [(0.0, rng.uniform(0, 8)), (8.0, rng.uniform(0, 8)), (rng.uniform(0, 8), 0.0),
(rng.uniform(0, 8), 8.0), (0.0, rng.uniform(0, 8)), (8.0, rng.uniform(0, 8))]
nets = [[i, n + rng.randrange(q)] if i == 0 or rng.random() < 0.3 else [i, rng.randrange(i)] for i in range(n)]
nets += [rng.sample(range(n + q), rng.randint(2, 3)) for _ in range(n)]
r2 = random.Random(k)
start = [(4 + r2.uniform(-0.1, 0.1), 4 + r2.uniform(-0.1, 0.1)) for _ in range(n)]
hist = []
x, y = eplace(n, nets, pads, [1.0] * n, [1.0] * n, M, B, start=start, history=hist, max_iter=200)
assert hist[0][0] > 0.5 and hist[-1][0] <= 0.1
assert overflow(bin_density(x, y, [1.0] * n, [1.0] * n, M, B), n, B) <= 0.1
assert all(0.5 <= v <= 7.5 for v in x + y)
History
Lu, Chen, Chang, Sha, Huang, Teng and Cheng presented ePlace at DAC 2014 and in ACM TODAES in 2015. The electrostatic analogy of density was older: Kraftwerk (1998) used Poisson's equation for its spreading forces. The new parts of ePlace were the global charge model with a spectral solver, Nesterov's method with a Lipschitz step estimate, and the preconditioner. ePlace-MS (2015) handled mixed-size designs, and RePlAce (Cheng, Kahng, Kang and Wang, 2019) added local density control and routability; RePlAce became the global placer of the OpenROAD flow.
References
- Jingwei Lu, Pengwen Chen, Chin-Chih Chang, Lu Sha, Dennis Jen-Hsin Huang, Chin-Chi Teng and Chung-Kuan Cheng, ePlace, electrostatics-based placement using fast Fourier transform and Nesterov's method, ACM Transactions on Design Automation of Electronic Systems 20(2), article 17, 2015, the electrostatic density model, the spectral solution of Poisson's equation, Nesterov's method with a Lipschitz step estimate, and the preconditioner
- Jingwei Lu, Pengwen Chen, Chin-Chih Chang, Lu Sha, Dennis Jen-Hsin Huang, Chin-Chi Teng and Chung-Kuan Cheng, ePlace, electrostatics based placement using Nesterov's method, Proceedings of the 51st Design Automation Conference (DAC), 2014, the conference version of the method
- Chung-Kuan Cheng, Andrew B. Kahng, Ilgweon Kang and Lutong Wang, RePlAce, advancing solution quality and routability validation in global placement, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 38(9), 1717 to 1730, 2019, the extension of ePlace with local density functions and routability-driven cell inflation
- 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 (analytical global placement with a density penalty; general locator)
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 | H1 sketch |
|
| Lean | L0 no Lean part |
|
| Code (python) | I0 not checked yet |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag KESX1E Edit this page History Report an error Markdown