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 | 1 | rnorm = (r,r); | 2 | int Iter = 0; | 3 | double α, β, rp, rpold, bnorm, rnorm; | 4 | vector r, p, q, z; | 5 | initial T schedule; | 6 | /stop annealing if temperature has cooled down enough or max no. of iterations have been tried/ | 7 | while (T ≥ Tcold && steps < cfg.Nmax) do | 8 | n = cfg.Kmoves ∗ flp− > n units; | 9 | i = downs = rejects = 0; | 10 | sumcost = 0; | 11 | / try enough total or downhill moves per T / | 12 | while (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++; | 26 | end while | 27 | / stop annealing if there are too little accepts / | 28 | if((rejects/i) > cfg.Rreject) | 29 | break; | 30 | / annealing schedule / | 31 | T= cfg.Rcool;; | 32 | steps++; | 33 | end while |
|