Appled Mathematcal Scences, Vol. 9, 015, no. 14, 653-663 HIKARI Ltd, www.m-hkar.com http://dx.do.org/10.1988/ams.015.411911 Obstacle-Aware Routng Problem n a Rectangular Mesh Network Norazah Adzhar Department of Mathematcal Scences, Faculty of Scence Unverst Teknolog Malaysa 81310 UTM Johor Bahru, Johor, Malaysa Shaharuddn Salleh Centre for Industral and Appled Mathematcs Unverst Teknolog Malaysa 81310 UTM Johor Bahru, Johor, Malaysa Copyrght 014 Norazah Adzhar and Shaharuddn Salleh. Ths s an open access artcle dstrbuted under the Creatve Commons Attrbuton Lcense, whch permts unrestrcted use, dstrbuton, and reproducton n any medum, provded the orgnal work s properly cted. Abstract In an automatc desgn process for very large scale ntegraton/prnted crcut board (VLSI/PCB), routng problem s one of the most mportant and crucal part after components placement phase. Ths process s notorously dffcult, and a problem conssts of a set of two-pn nets, s known to be NP-complete. In ths problem, we consdered a rectangular mesh network wth all the locaton for blocks wth pns on the boundares and obstacles s predefned. Gven a set of two-pn nets, our goal s to establsh connectons n the network by avodng all the obstacles whle satsfyng the desgn rules. In ths paper, we are usng smulated annealng routng method wth Dkstra s shortest path algorthm to provde the best path for each connecton f t exsts. The smulaton results showed that by acceptng some uphll movements based on Boltzmann probablty functon led to better results and yeld to lower energy level. Ths suggests the technque s sutable for adopton nto real problem. Keywords: PCB s routng, Rectangular mesh network, Shortest path algorthm, Smulated annealng method
654 Norazah Adzhar and Shaharuddn Salleh 1 Introducton Routng n a PCB or VLSI desgn s the process of determnng and prescrbng paths between varous electronc components n order to establsh the connecton between a gven source node and ts target. Routng n a modern chp s a notorously dffcult problem, and even the smplest routng problem, whch conssts of a set of two-termnal nets, s known to be NP-complete [1]. Snce routng problem s very complex, ths problem s usually splt nto two parts whch s known as global routng and detaled routng n order to make t manageable. Global routng wll tessellated the routng layout nto an array of rectangular mesh and each mesh have varously referred to as grd cells, global routng cells, global routng tles or bn. Ths process s as llustrated n Fgure 1. Fgure 1: Parttoned layout nto N Nrectangular array Several methods has been proposed n the lterature for two-termnal routng problem such as wave propagaton method by Lee s[], lne-search routng[3-4], A* search routng[5] and shortest path approach. Several mprovements have been made to Lees s algorthm n terms of codng scheme [6-7], search space [8] and search algorthm [9]. Past research often used heurstcs method such as smulated annealng to produce a set of sequence-par n the global routng problem [10]. However, the routng area s not utlzed wth the placement of obstacles. Obstacles n the layout may represent blocks that are placed on the surface, some nets that are already lad out, actve element and others. The presence of obstacles wll complcate the problem. It lmts number of communcaton lnks n the regon; therefore the best path for a respectve net mght not be short. Moreover, each successful connecton wll block later paths. The problem wll become more complex snce our objectve s to have the maxmum possble number of paths n a routng regon. In ths paper, we are solvng routng problem n VLSI/PCB desgn wth the presence of blocks wth actve pns on the boundares whch represent the obstacles n our problem. Shortest path method s used to generate the best path n order to meet our objectves requrement. Smulated annealng technque whch s based on coolng theory n sold s used n soluton refnng procedure to provde better results. The rest of the paper s organzed as follows. Secton s the problem background. In Secton 3, the routng model s dscussed and n Secton 4, smulated
Obstacle-aware routng problem n a rectangular mesh network 655 annealng routng algorthm was presented. Secton 5 presents the smulaton part under random data, and the performance s evaluated. Fnally, Secton 6 concludes the paper. Problem Statement In ths problem, our routng regon was assumed to be tessellated nto p p square cells, and each cell was assumed contaned exactly one pn. Wth regard to wrng, we assumed that the locatons of blocks wth pns on the boundares were specfed. Supposed we were gven a set of routng requrements, whch conssted of two-termnal nets, N { N1, N,..., N n } where N ( S, T ) wth S and T as the source and target nodes, respectvely, the ultmate goal of ths routng problem was to maxmze the number of nets routed and mnmze total wre length. In order to do ths, we frst sought the maxmum number of nterconnectng structure for a set of nets, N for each layer(s) whle mnmzng the level of congeston throughout the regon. The objectve functon for ths problem was defned as Max R m! m 1 j 1 q a, where q 1 non blockng, a 0 blockng m m representng matrx of order by par, m total number of nets, order, and j nets. (1) A complete wrng on ths SD-Torus network should obey the desgn rules and satsfy the necessary condtons as follows: () N N, j j () For each N, there must be exactly one connecton only. () Each path can cross but should not overlap each other. (v) Each connecton wll be made usng the communcaton lnks wth no specfc drecton. Ths allows for a smpler representaton of the routng confguraton, even though t reduces freedom durng routng. 3 Routng Model As a result of ts mportance to the ndustry, we were motvated to produce a sgnfcant method to perform optmal routng. Fgure llustrates the conceptual structure of a 9 9 rectangular mesh model wth the locatons of obstacles s predefned. For clarty, the llustraton for all processng nodes s omtted.
656 Norazah Adzhar and Shaharuddn Salleh Blocks Fgure : Routng n layout of sze 9 9 wth the presence of obstacles The major features of ths grd model are as follows: We defne p p p as the grd sze. For a 4 4 rectangular grd, we desgnated an ID for each node n the frst row as 1,, 3 and 4 respectvely wth the upper left corner as 1 and the upper rght corner as 4. Smlarly, the ID for each node n the last row was 13, 14, 15 and 16 respectvely wth the lower left corner as 13 and the lower rght corner as 16. The poston of blocks wth actve pns on the boundares s predefned. Snce, the blocks tself wll become an obstacle, therefore the communcaton lnks n the entre blocks s become passve and each lnks s assgned as 99 n our program. Other actve edges held a value of 1 as ts weght. Each connecton s ndependent of other connectons. Each pn wll belong to only one net. Each pn could communcate wth other pns n the left, rght, upward or downward drecton as long as the path dd not overlap. Only one pn could log data n a gven sub-bus at a tme. Ths operaton was performed sequentally and depended hghly on the net orderng. Therefore, earler connecton would block later paths. 3.1 Smulated Annealng Routng Algorthm Routng algorthm wll manage network traffc and determne the best route for to connect source node and destnaton node. Once a path s establshed, the path t takes wll be blocked and cannot be used to route other pars of nodes. Ths wll ncrease the congeston nsde the routng regon and makes later route longer than optmal and sometmes mpossble to complete, thus, ncrease the energy level throughout the network as well as the cost (manly refers to lnk numbers). A shortest path algorthm s crucal for ths problem. It was mportant to have all nodes connected n the shortest way to reduce energy level and network cost. In addton, we could provde larger routng space to route the remanng nets, thus maxmzng the number of successve nets n the layer. In ths paper, we are usng Dkstra s algorthm as a tool to provde best path snce all the weghts n the graph s postve values. Current sequental routng often apples heurstc methods to further refne the soluton. Through these processes, the connectons for some nets wll be swapped and re-routed n a dfferent order to mprove the routng qualty. In ths research,
Obstacle-aware routng problem n a rectangular mesh network 657 we appled a probablstc method smulated by Metropols et. al. and Krkpatrck et al. [11-1] called smulated annealng to produce better sequence. Ths algorthm has become a very useful tool n solvng varous combnatoral optmzaton problems. Ths method was based on the theory of annealng n solds. The term smulated annealng was derved from the roughly analogous physcal process of heatng and then slowly cooled a substance to obtan a strong crystallne structure [11]. Durng the smulaton, temperature was lowered gradually untl the system froze and no further change occurred. At each temperature, the smulaton must proceed long enough for the system to reach a steady state or thermal equlbrum. Ths method avods beng trapped n local mnma by acceptng uphll movement sometmes. The acceptance was determned usng Boltzmann probablty functon: T P( E) e where E s the cost dfference between the current and prevous solutons, whle T s the current temperature. For a gven annealng schedule of temperature, T { t, t,...}, our mplemented smulated annealng algorthm are as follows: 1 1. Determne an ntal sequence for all to be routed nets, called L 0. Set L L0.. Then Dkstra s algorthm s appled to compute shortest path for each nets. For each S, assgn to every node a tentatve dstance value: set t to zero for our ntal node and to nfnty for all other nodes. 3. Mark all nodes unvsted. Set the ntal node as current. For the current node, consder all of ts unvsted neghbors and calculate ther tentatve dstances. Compare the newly calculated tentatve dstance to the current assgned value and assgn the smaller one. 4. When we are done consderng all of the neghbors of the current node, mark the current node as vsted. A vsted node wll never be checked agan. 5. If T has been marked vsted, then compute d( S, T ). If T s not reached, therefore a blockage has occur. Abandon the net and contnue wth the next net n L. Repeat the process for every nets n L. 6. Compute ntal energy, E 0 usng equaton: m j 1 E E q d, for 1,,3,..., m! Where s the sequence ( can be referred as number of teratons too). Compute the number of successful routed nets, R. Mark that sequence as accept. 7. From L, generate new sequence by swappng any two dfferent elements randomly. 8. Set L L' and repeat Steps -5. Evaluate the new energy for the new sequence, EL ( ') and the new RL ( ').
658 Norazah Adzhar and Shaharuddn Salleh 9. If R( L') R( L0), proceed to Step 13. 10. If R( L') R( L0), reject the sequence and repeat Step 7. 11. If R( L') R( L0), compute the energy change, EL ( '). If E( L) E( L') 0, proceed to Step 13. Otherwse, go to Step 1. T 1. Apply Boltzmann dstrbuton formula. If P( E) e where ~ U(0,1), go to Step 13. Otherwse, reject the move and repeat Step 7. 13. Accept the canddate sequence as a current soluton, and set L L', E( L) E( L') and T Tk. Usng reducng parameter, 0.95, update the temperature counters and parameters. Set k k 1, Tk 1 Tkand repeat Step 7. Stop untl no further changes occur. 4 Smulaton Results For obstacles-aware routng problem n rectangular pattern, our proposed algorthm has been mplemented by usng Mcrosoft Vsual C++ 010 [13] and run on a Intel Core Duo CPU.00GHz machne wth 3GB Memory. Instead of maxmzng number of routed nets n a layer, decrease the congeston level n the layer s also crucal. Thus, the overhead cost wll be lower and the performance s mproved. The energy level that has been usng n ths paper s derved from our objectve functon n (1) by smply replaced a wth d becomes: E where m E q d, for 1,,3,..., m! j 1 d s number of communcaton lnks taken to get be formulated as: d(, j) d(, k) d( k, j). T from S. d can Suppose the gven locaton of blocks wth pns for p 7 s as llustrated n Fgure 3 and the net requrement s as follows: N1 (3,7), N (10,34), N3 (17,41), N4 (16,4), N5 (0,4). Fgure 3: Placement of obstacle n 7 7mesh model
Obstacle-aware routng problem n a rectangular mesh network 659 The process of calculatng maxmum number of routed nets, R and energy level, E n ths OAP model can be summarzed as n Table 1. At the second teraton, N 3 s swapped wth N 5 and producng the sequence N1, N, N5, N4, N 3. By usng ths sequence, the number of blocked nets s reduced, thus R s ncreased even though E s ncreasng too. However, as the process contnues, the value of E wll gradually lowered nto an optmal and acceptable result. Table 1: Calculaton of R and E n p 4 routng regon. j N q 1 1 N 1 (3, 7) 6 1 N 1 d(10,34) 8 d R E d 3 6 3 N 1 d(17, 41) 1 3 4 N4 0 d(16, 4) 0*Path s blocked 5 N5 0 d(0, 4) 0 *Path s blocked 1 N 1 1 d(3, 7) 6 4 30 N 1 d(10,34) 8 3 N 5 1 d(0, 4) 4 4 N4 1 d(16, 4) 1 5 N 0 3 d(17, 41) 0 *Path s blocked Notce that E reflects to the total length of wre needed to perform wrng and the complexty/congeston level n that routng regon. Then, a smulaton s performed on 9 9rectangular array usng our program called OAP. Three blocks of obstacles s placed nsde the regon whch takes about 15% of the layout wth N 7 as shown n Fgure 4(a) and the result s summarzed n Fgure 4(b). 8 6 4 (a) 0 0 4 6 8 10 1 14 (b) Fgure 4: (a) Placement of obstacles (b) Number of connectons versus teratons no.
660 Norazah Adzhar and Shaharuddn Salleh The graph n Fgure 4(b) showed that our proposed algorthm able to route up to 6 nets out of 7 wth E 61 compare to prevous best result of R 5 and E 51. Ths ncrement n energy level s due to the extra number of nets to be routed. However, as the program contnues, the energy level wll gradually decrease to an optmal and acceptable result. The program s then further tested on larger sze of MESH wth p 11, 18 pns and N 9 as llustrated n Fgure 5(a). 10 8 6 4 0 0 4 6 8 10 1 (a) (b) Fgure 5: (a) Placement of obstacles (b) Number of connectons versus teratons no. From the results n Fgure 5(b), the algorthm agan succeeds n producng lower number of blocked nets. In ths case, only one net has appeared to be blocked for connecton. Ths problem can be easly overcome by ntroducng new layer to the regon but s not dscussed n ths paper. No swappng preference scheme s apply specfcally n our proposed algorthm. However, for orgnal MESH problem wthout obstacles, we notce that route shorter nets frst often yeld to better result. Snce shorter nets wll be routed n lowest cost too, therefore, more routng space s left for later nets yeld to hgh number of R. However, t s not necessary to be true when appled nto MESH wth obstacles problem. Ths s due to the fact that the shortest way to route shorter nets mght be long due to the presence of obstacles. For ths problem, t has been notced that routng longer nets frst often yeld to better results n comparson to shorter nets preference routng method. Ths s due There s no specfc scheme for sequence-based routng method, and the task to fnd such of net orderng has proven to be NP-hard [14]. Fnally, another smulaton was performed wth vared obstacles dstrbutons to emphasze the performance of ths method. In ths smulaton, the placement of obstacles s ncreased gradually by 10% over p 1 network sze contanng 144 processng nodes and value of R and E s recorded. In Case 1, blocks of obstacles was frst ntroduced wth N=4 and the result s recorded. Then, an extra block s placed n the layout wth another two extra nets added n each cases. The
Obstacle-aware routng problem n a rectangular mesh network 661 result s as shown n Fgure 6(a). As the number of obstacles and number of nets to be routed ncreases, our program stll able to perform complete routng untl Case 3, but n Case 4 wth 5 blocks and 10 nets, the maxmum number of R acheved was 8 wth E 101. In ths case, the routng layout become more congested but yet stll produced a hgh number of R. Meanwhle, the congeston level for all cases s also kept mnmum as possble. Ths s as llustrated n Fgure 6(b). Therefore, our proposed algorthm s proved to produce an optmal and acceptable results for most cases. 1 10 8 6 4 0 Case 1 Case Case 3 Case 4 10 100 80 60 40 0 0 Case 1 Case Case 3 Case 4 R Blocked Nets (a) (b) Fgure 6: (a) Maxmzaton number of R among four cases wth ncreasng obstacles placement and net requrement (b) Mnmzaton of E for all cases. The whole result s tabulated n Table. Our proposed algorthm manages to produce hgh number of connectons n varous network szes wth less congeston level throughout the regon. Therefore, t suggests that ths method s sutable for adopton nto real problem. Table : The whole result. Net. Sze #Nets Obs. # R %R E % Con. 7x7 5 14/84 4 80 8 33.33 9x9 7 1/144 6 85.71 61 4.36 11x11 9 8/0 8 88.89 96 43.63 1x1 4 14/64 4 100 44 16.67 6 1/64 6 100 65 4.6 8 8/64 8 100 90 34.09 10 35/64 8 80 101 38.6 *Net.=Network, Obs.=Obstacles, Con.=Congeston.
66 Norazah Adzhar and Shaharuddn Salleh 5 Summary An ndustral PCB can have more than 7000 nets wth 1 layers. Ths routng problem was prevously routed manually and wth the advances of technology, t can be solved n less than a second for small sze network. Ths paper descrbed an obstacles-aware routng problem. Ths routng graph can be modeled as G( N, E ), where graph N represents a set of processng nodes, and the element of graph E s the lnk of communcaton between nodes. Supposed we were gven a set of routng requrements, whch conssts of pars of processng nodes (henceforth regard as nets), N { N1, N,..., N n } where N ( S, T ), N ( S, T ),..., N ( S T ) wth S and T as the source and 1 1 1 n n, n target nodes, respectvely. In ths paper, we proposed a method to maxmze the number of connectons n grd consstng of mesh-connected processng nodes wth number of nets and the locaton of blocks wth actve pns on the boundares s predefned. Each routed nets wll become obstacles tself to other nets and ths ncrease the complexty to route later paths. Here, we used annealng technque to further refne the sequence and produce better result. It avods beng trap at local mnmum by acceptng some uphll movements based on the Boltzmann dstrbuton formula. The smulaton results proved that, ths method s able to produce consderably hgh number of routed nets even the placement of obstacles s ntroduced. Nevertheless, the energy level s kept mnmzed whle maxmzng number of R. Therefore, the congeston level nsde the routng regon s lower. Ths suggests that out proposed method s sutable for adopton nto real problem. Acknowledgments. The author would lke to thank the Mnstry of Hgher Educaton of Malaysa for the scholarshp gven. References [1] L. T. Wang, Y. W. Chang, and K. T. Cheng, Electronc Desgn Automaton: Synthess, Verfcaton, and Test, Boston: Elsever, 009. [] C. Y. Lee, An algorthm for path connectons and ts applcatons, IRE Trans Electronc Computers, EC-10 (1961), 346-365. http://dx.do.org/10.1109/tec.1961.519 [3] K. Mkam and K. Tabuch, A computer program for optmal routng of prnted crcut connectors, n Proc. Int. Federaton for Informaton Processng, November 1968, 1475 1478. [4] D. Hghtower, A soluton to lne routng problems on the contnuous plane, n Proc. ACM/IEEE Desgn Automaton Conf., June 1969, 1 4. http://dx.do.org/10.1145/80060.809014
Obstacle-aware routng problem n a rectangular mesh network 663 [5] P. E. Hart, N. J. Nlsson, and B. Raphael, A formal bass for the heurstc determnaton of mnmum cost paths, IEEE Trans. on Systems Scence and Cybernetcs, 4 (1968), 100-107. http://dx.do.org/10.1109/tssc.1968.300136 [6] S. B. Akers, A modfcaton of Lee s path connecton algorthm, IEEE Trans Electronc Computers, EC-16 (1967), 97-87. http://dx.do.org/10.1109/pgec.1967.6460 [7] F. O. Hadlocks, A shortest path algorthm for grd graphs, Networks, 7 (1977), 33-334. http://dx.do.org/10.100/net.330070404 [8] S. M. Sat, and H. Youssef, Iteratve computer algorthms: and ther applcatons n engneerng, IEEE Computer Socety Press, 1999. [9] J. Soukup, Fast Maze Router, Proc. DAC, (1978), 100-10. http://dx.do.org/10.1109/dac.1978.1585154 [10] M. P. Vecch, and S. Krkpatck, Global Wrng by Smulated Annealng, IEEE Trans. On Computer-Aded Desgn, CAD- (1983). http://dx.do.org/10.1109/tcad.1983.170039 [11] N. Metropols, A.W. Rosenbluth, M. N. Rosenbluth, A. H. Teller, E. Teller, Equaton of State Calculatons by Fast Computng Machnes. J. Chem. Phys. 1 (1953), 498. http://dx.do.org/10.1063/1.1699114 [1] S. Krkpatrck, C.D. Gellat, M. P. Vecch, Optmzaton by Smulated Annealng. Scence, 0 (1983), 671-680. http://dx.do.org/10.116/scence.0.4598.671 [13] S. Salleh, A. Y. Zomaya and A. B. Sakhnah, Computng for Numercal Methods Usng Vsual C++, Wley, Hoboken, NJ, 008. http://dx.do.org/10.100/978047019634 [14] L.C. Abel, On the orderng of connectons for automatc wre routng. IEEE Trans. On Computers, 1 (197), 17 133. http://dx.do.org/10.1109/t-c.197.348 Receved: November 1, 014; Publshed: January 19, 015