An Optimum Channel Routing Algorithm in the Knock-knee Diagonal Model *

Channel routing problem is an important, time consuming and difficult problem in VLSI layout design. In this paper, we consider the two-terminal channel routing problem in a new routing model, called knock-knee diagonal model, where the grid consists of right and left tracks displayed at +45 and -45. An optimum algorithm is presented, which obtains d + as an upper bound to the channel width, where d is the channel density.


INTRODUCTION
outing is a crucial problem in the VLSI layout design automation process.The process of rout- ing is generally divided into two stages: global rout- ing, which is global assignment of the wiring paths for each net, and detailed routing, which is detailed wiring in individual routing regions.Detailed routing is an important, time consuming and difficult problem.The Channel Routing Problem (CRP) arises in the detailed routing.It consists of connecting ter- minals belonging to nets, which are displayed on two opposite sides (entry and exit lines) of a rectangular channel.
Channel routing problems have been extensively studied in different traditional routing models.In particular, we recall Manhattan Model (MM) [1], the Knock-knee model (KK) [2].In the Manhattan model, two wires may share a grid point only by crossing at that point, but the wires are not allowed to overlap.In the knock-knee model wires may share a grid point either by crossing or by bending at that point, but two wires are not allowed to overlap.
Besides the usual square grid, other tessellations of the plane, such as the hexagonal, octosquare grid, etc., have been proposed for routing.In this paper, *This work has been supported in part by Progetto Finalizzato Sistemi Informatici e Calcolo Parallelo of CNR, Italy.
we consider a new routing model, called Knock-Knee Diagonal model (KKD), where the grid consists of right and left tracks displayed at +45 and -45.We present an optimum algorithm which obtains d + 1 as an upper bound to the channel width, where d is the channel density.

DEFINITIONS OF PROBLEMS
Let P and Q denote two sets of terminals on the entry and exit lines, respectively, IPI IQI m.
The terminals are identified by their integer coor- dinates along the lines.A two-terminal net N (p, q) is a pair of integers where p P and q Q.A net is trivial ifp q.A two-terminal CRP is specified as a set {N N,} of n nets.The main goal of a CRP is to construct a layout in a channel of minimum width.
A fundamental parameter is the density d defined as follows.LetcPt2 Qandx c + e(0<e< 1/4), and let d(x) be the number of nets (p, q) which cross the vertical line x, i.e. ((p < x)/ (q > x)) or ((p > x)/ (q < x)).The density of a CRP is d max{d(x)}.In MM and KK the density d is a trivial lower bound to the channel width.Instead of using a horizontal-vertical grid, we con- sider a diagonal grid for routing.The word "diagonal" means a slope of --45.Diagonal line segments which are displayed at +45 and -45 are called 234 XIAOYU SONG right and left tracks.The grid consists of diagonal line segments which are composed of the left tracks and the right tracks.A channel on the diagonal grid is shown in Figure 1.The entry terminals and exit ter- minals are located at unit distance on two horizontal (entry and exit) lines.The distance between these two lines, called vertical width w, is a multiple of the unit; hence terminals lie at the intersections of left and right tracks.
To judge the interest on the routing models on a diagonal grid, let us compare them with the tradi- tional routing models.As a variation of MM, the routing model: Diagonal Model (DM), has been pro- posed in [3].There have been some interesting re- sults on CRPs in DM [3, 4, 5, 6, 7, 8].Note that some problems which are very difficult in MM, such as the shift-by-1 problem, where each entry terminal must be connected to the exit terminal + 1 (or 1), can be solved easily in DM.In MM it requires lq(k/-) tracks although its density is one.In DM the problem can be optimally embedded in a channel of vertical width equal to one.Moreover, the whole class of problems, shift-by-i, 1 <-<-n, can be optimally solved in DM using a channel of vertical width equal to i. Shift-by-O is also optimally laid out with vertical width one.
In the theoretical investigation of two-terminal CRPs in MM, the best algorithm for MM [1,9] ob- tains w d + O(f) where f is the flux and f -< /-n, n is the number of nets.In particular, the worst case of f usually holds for dense problems [10].The best DM router [8] yields w -< 2d + 1, for d even, or w _< 2d + 3, for d odd, where the difficult pa- rameter f (channel flux) disappears.We can only use the density d to measure the difficulty of problem.
Due to the difficulty of MM, other routing models have been proposed.Among them, the knock-knee model is the most important one due to its great advantage of the saving in the area.Recall that the two-terminal CRP, which is NP-complete in MM, can be solved optimally in KK, namely, d + 1 is an upper bound to w.There exists a complete theory for CRPs in KK [2,11], while no result in the knock-knee model on a diagonal grid.In order to fill up this lacuna, we investigate in this paper the efficiency of the knock-knee diagonal model for CRPs.In KKD wires may share a grid point either by crossing or by bending at that point but cannot share segments.As in KK, it may require more than two layers to obtain a good layout.We shall show that there is a similar optimal result for the two-terminal CRP in KKD, namely, d + 1 as an upper bound to the channel width, where d is the channel density.
Note that in the study of routing problems, for the same terminal locations, the distance between two adjacent tracks is smaller by a factor of V in KKD than in the traditional routing models.If the same track distance is to be maintained for technological reasons, then the unit distance between terminals and the vertical size of the channel for a given routing must be enlarged by a factor of k/.A general re- mark on the diagonal model is that the conductive tracks of each layer are closer than those in the tra- ditional models, by a factor 1//.However, this may not seem to cause problems in the current and future technology.As mentioned before, in the traditional routing models, such as MM and KK, the density of problem d is a trivial lower bound to the channel width w.In KKD an immediate lower bound to w is [d/2] [3].It has been shown [8] that d is a non-trivial lower bound to w in DM and in KKD.

THE ROUTING ALGORITHM
We give an optimal algorithm which never requires a channel width more than d + 1.The whole algo- Exit Line 5  rithm consists of three parts: 1. Construction of chains; 2. Routing the CRP in a channel of width [3/2 d]; 3. Compacting the obtained routing into a channel of width d + 1.In what follows, we discuss these parts one by one, and finally give the complete routing algorithm.

Construction of Chains
We represent nets with arrows.For a net (p, q), if p q, its arrow is a directed horizontal line segment from the starting point with abscissa p to the ending point with abscissa q; and if p q, its arrow is a vertical arrow with one unit length.Let II be an instance of two-terminal CRP.Definition 1.A chain is a sequence of nets C (P, q), (P2, q2),..., (Pn, qn)such that any two nets do not overlap with each other, i.e.Pi+ -> max(p, q) and q+ -> max(pi, qi), and p : qi, 1,...,n.
The main idea of our routing process consists of the following steps: (i) Partitioning the arrow set into chains E, E2, Eo.
(ii) Routing each pair of chains Ei and Ei+ (i odd) successively in a stripe of width 3. Definition 2. For each chain Ei, we define a set Ti of trivial nets, which includes the original trivial nets of II, and a trivial net (s, s) for each net S (r, s) Ej, j < i; and for each net S (s,r)Ej, j>i + 1.In the process of routing there exist some nets previously routed and occupying their final positions, and they may block the routing of some other nets not yet handled (see Figure  2).Therefore, some nets have to be prolonged or contracted for the time being in order to have other wires pass.More specifically, consider two nets N1 (p, q) and N2 (q, r) such that N1 Ei and N2 E i.If < j and p < q, after the routing of N, N1 becomes a trivial net (Definition 2) and must occupy the position of q, this causes a conflict (see Figure 2), because N2 has not been routed and is also a trivial net.To avoid such con- flicts, we introduce the concept of target point.For N1, we replace N by two nets Nl' (p, t) and N" (t, q), where is a proper target point defined below, > q.NI' and N" are respectively called the extended and compensation nets of N1.Definition 3. The target point of a net (p, q) with p < q is the minimum integer -> q such that the set of nets still to be inserted in the chains does not contain either a net (t, r) with r -< or a net (r, t) with r < t; and the set of nets already inserted in the chains does not contain a net (r, t) (see Figure 2).
Using the extended and compensation nets, we can avoid the conflicts between the nets handled previously and successively.The compensation net is used to return to the original destination.Note that after the construction of the extended and compensation nets, it may well be that there are two arriving and two leaving nets at point t, but this does not cause "Trivial Net" Trivial Net Nz= (q,r) A Conflict q t Ni'=(t.q)q t FIGURE 2 Illustration of the definitions of trivial, extended, and compensation nets.
the inconsistency because they are routed in different routing phases.
We now construct the chains of a CRP H. Let I-I {N1, N2, Nn} be a CRP and El, E2,.Ed be the chains.
The following proposition guarantees that the ex- tended and compensation nets do not increase the density of the problem.Proposition 1 [61.The number of chains in the ex- tended construction of a CRP II is equal to d.
Routing the CRP in a Channel of Width [3/2 d] The channel consists of stripes S1, Sid/21, each of width 3. The basic connections in a stripe of chan- nel are two busses, called lower bus and upper bus, and O-connections (for "trivial" nets).Each bus goes through the channel.The busses introduce a division of the points on the stripe borders into two groups, called 1-points and 2-points, respectively (see Figure 4).The 0-connection of point p (connection of p for short) is defined as shown in Figure 4, depending on the position of p.
The chains E, E are grouped in pairs (E, Ei+l) (i is odd), and each pair (E, Ei+) is routed in stripe Sli/21.In general, the "trivial nets" of E and E+ use 1-or 2-connections, while the long connec- tions of E and Ei+t are routed by using the lower and upper bus, respectively.-, -, -, FIGURE 3 The construction of chains for a CRP.

Upper bus
Lmaer bus FIGURE 4 Basic connections in a stripe.
We now construct the routing using the five routing rules presented below.We enumerate all the possible cases in the routing of E and Ei+ in stripe S[i/2].
Rules 1 to 4 deal with the cases in which if an extended net is in E, its compensation net will be in E i, > + 1, while the case in which such a net is in Ei+l is treated in rule 5. Rule 1. Routing (p, q) W 1. Connect the entry point p of the current stripe to the lower bus.There are three cases: (a) p is a 2-point.
From p start with the left track and move on the 0-connection of p to meet the lower bus (p' in Figure 5.1).
From p start with the right track and move on the 0-connection of p to meet the lower bus (p" in (c) (p is a 1-point)/ (:l(r, p) Ww) (i.e.nets (r, p) and (p, q) are adjacent in Ww).This case is covered in the following point (3), while treating the connection of the end point of (r, p).
2. Proceed on the lower bus to the right. 3. Connect the lower bus to the exit point q of the current stripe.We have four cases: (a) q is a 2-point.
Use the routing shown in Figure 5.1.
Use the routing shown in Figure 5.2.
Let A (p, q).The routing is shown in Figure 5.4.
Rule 2. Routing (r, s) U This rule is symmetrical to Rule 1, exchanging left and right, and 1-points with 2-points.Rule 3. Routing (p, q) R ap 1. Connect the entry point p of the current stripe to the upper bus.There are four cases: (a) p is a 1-point.
From p start with the right track and move on the 0-connection of p to meet the upper bus (p' in From p start with the left track and move on the 0-connection of p to meet the upper bus (p" in (c) (p is a 2-point) A (El(r, p) Rap)/ (:t(q 1, r) LUp).This case is covered in the following point (3), whil treating th connection of the end point of (r, p).(d) (p is a 2-point)/h (::IB (p 1, r) Lup).Let A (p, q).The routing is shown in Figure 5.6.
2. Proceed on the upper bus to the right. 3. Connect the upper bus to the exit point q of the current stripe.We have three cases: (a) q is a 1-point.
Use the connections of Figure 5.5.
Use the routing shown in Figure 5.7.
Let A (p, q).The routing of A and B are shown in Figure 5.8.This rule is symmetrical to Rule 3, exchanging left with right, and 1-points with 2-points.
N2 and/or N3 may not be present.There are two cases" (a) q is a 1-point.
Use the global routing for N1 and NI', and the routing for N2 and N3 shown in Figure 5.9.Note that the global routing for N1 and NI' uses a portion of the 0-connection of q.If there are not N2 and N3, the 0-connection of q is modified by using a portion of two buses as shown Figure 5.Put each two points (b, b'), 1 -< <-n, together by sharing one point with a knock-knee shown in Figure 6.2.
Rule 2. Compaction of Ai+ and A'.
Put each two points (ai, ai'), 1 -< -< n, together by sharing one point according to the different cases shown in Figure 6.3.Note that these cases occur when there are connections passing through ai and a'.If this does not occur the compaction is done simply by putting the corresponding points ai and a' together.
The correctness of the compaction process can be easily proved by noting that there are no conflicts among the compacted points.
From the above discussion, we can see that, after the compaction of H, we obtain a new routing R in which the channel consists of stripes $2, S[d/2]-i, of width 2, the stripes S and Sl0/.I, of width 5/2.

The Complete Routing Algorithm
We now give the complete routing according to the above discussions.The Optimal Channel Routing Algorithm Input: A CRP II {N1, N2 Nn}; Output: Routing R; begin baseline := 0; {Zero is the vertical coordinate of the entry line} Use the chain construction algorithm to construct chains El, E2, Ed; for := 1 to [(d + 1)/21 1 do begin Use rules 1-5 to route the nets of a pair of chains (Ei, El+l) in the current stripe of height 3; Use 0-connections to route nets in Ek, where (kand k + 1), and trivial nets to reach the exit line of the current stripe; baseline:= baseline + 3 end; if d is odd then begin Use rules 1-4 to route the nets of a chain Ed in the current stripe of height 2; Use 0oconnections to route nets in E (k : d), and trivial nets to reach the exit line of the cur- rent stripe end; Use the compaction algorithm to compact the ob- tained routing end.
From the above discussions and proposition 2, we conclude with the following theorem" Theorem 1.The presented algorithm produces a routing for two-terminal CRP with the channel width d + 1 in KKD, where d is the channel density.The running time of the algorithm is O(md), where m is the length of channel, and d is the density.
Applying the algorithm to the example of Figure 3, we obtain the routing in a channel of width 6, where d 5, as shown in Figure 7.
FIGUREA channel on a diagonal grid.

FIGURE 6 . 1
FIGURE 6.1 Definitions of two adjacent L' and

FIGURE 7
FIGURE 7 The routing of an example CRP.