Research Article

HotSpot Thermal Floorplan Solver Using Conjugate Gradient to Speed Up

Algorithm 2

: The SA thermal floorplan algorithm with the conjugate gradient thermal solver.
Require: cost(f) SA floorplan evaluate metric;
Ensure: optimal floorplan
1rnorm = (r,r);
2int Iter = 0;
3double α, β, rp, rpold, bnorm, rnorm;
4vector r, p, q, z;
5initial T schedule;
6/stop annealing if temperature has cooled down enough or max no. of iterations have been tried/
7while (TTcold && steps < cfg.Nmax) do
8n = cfg.Kmoves ∗ flp− > n units;
9i = downs = rejects = 0;
10 sumcost = 0;
11 / try enough total or downhill moves per T /
12while (do(i < 2 ∗ n)&&(downs < n))
13  make random move and data process to floorplan
14  new cost = floorplan evaluate metric;
15  // area (A), temperature (T), and wire length (W):
16  lambdaA A + lambdaT T + lambdaW W
17  reusing the T to be linear solver initial solution
18  if (new cost < cost ∥ rand fraction() < exp(−(new cost − cost)/T)) then
19   / downhill always accepted /
20   or / Boltzmann probability function /
21   accepted new cost
22  else
23   rejects++;
24  end if
25  i++;
26end while
27 / stop annealing if there are too little accepts /
28if((rejects/i) > cfg.Rreject)
29   break;
30 / annealing schedule /
31T= cfg.Rcool;;
32 steps++;
33end while