ªGeneric Universal Switch Blocksº
Hongbing Fan, Yu-Liang Wu, Member, IEEE, and
Yao-Wen Chang, Member, IEEE
AbstractÐIn the paper , the authors defined the well-structured symmetric switch block MN;Wand showed that MN;Wis universal for any pair of positive integers N and W. However, we find that this result is partially correct. Here, we show that, when N 7, MN;Wis not universal for odd Ws ( 3) and it is universal for any even W.
Index TermsÐField programmable gate array, universal switch block design, FPGA routing.
THISpaper concerns the design of generic switch blocks, which can be used in the two or higher dimensional FPGA architectures.
An N-sided switch block with W terminals on each side (denoted by (N, W)-SB) is said to be universal if every set of (2-pin) nets satisfying the dimension constraint (i.e., the number of nets routed through each side cannot exceed W) is simultaneously routable through the switch block. Experiments show that using universal switch blocks (USB) in an FPGA architecture results in higher routing capacity. Therefore, it is desirable, in general, to design an (N, W)-USB for each pair of positive integers N 2 and W 1. This problem was first proposed and solved for N 4 in , then extended to k 6 in , and, finally, is claimed to be solved in  by showing that the proposed symmetric switch block MN;Wis universal for any pair of N and W.
However, we find that MN;Wis not universal when N 7 and W is odd ( 3). We will show this by presenting unroutable routing requirement (counter examples) for such cases. For example, Fig. 1a shows such a routing requirement for (7, 3)-SB, with routing requirement vector (RRV) V0: n12 1; n23 1; n24 1; n34 2; n15 1; n56 1; n57 1; n67 2 and others nij 0. V0 is not routable in M7;3because M7;3is isomorphic to the disjoint union of M7;2and M7;1 (see Fig. 2), but V0cannot be decomposed into two RRVs that are routable in M7;2 and M7;1. Moreover, we find that MN;Wis universal if and only if N 6 or W is even.
In order to give a simple proof and to employ some known graph theory results, we use graph models to represent routing requirements and switch blocks.
We label the sides of an (N, W)-SB by 1; 2; . . . ; N and let ti;j denote the jth terminal on side i, i 1; . . . ; N; j 1; . . . ; W. With these notations, a 2-pin net through the SB can be represented by a 2-sized subset of f1; 2; . . . ; Ng. For example, a net spanning sides 1 and 2 corresponds to f1; 2g. A routing requirement for the SB can be represented by a collection (multiset) of 2-sized subsets of f1; . . . ; Ng, which is called an N-way global routing with density d
((N, d)-GR for short), where d is the maximum number of occurrence of an element of f1; . . . ; Ng in the collection. Clearly, an RRV can be transformed to an N-way global routing by changing each component nijin the RRV to nijcopies of fi; jg and vice versa. An (N, d)-GR can be viewed as a multiple graph by taking its 2-sized subsets as edges. Fig. 1b shows the graph representation of the routing requirement given in Fig. 1a. An (N, W)-SB can also be viewed as a graph with ti;js as vertices and switches as edges. Then, a detailed routing of a net in the SB corresponds to an edge in the graph of (N, W)-SB. A detailed routing of a global routing corresponds to a set of independent edges. Under these models, the switch block design problem becomes a graph design problem.
For the sake of regularity, we add some singletons (sets of size 1) to an (N, d)-GR such that the number of sets containing each i 2 f1; . . . ; Ng is equal to d. We refer to such a collection as a balanced global routing ((N, d)-BGR).
An (N, d)-BGR is said to be a minimal BGR (MBGR) if it does not contain a subglobal routing N; d0-BGR with d0< d. An (N, d)-BGR is said to be a primitive BGR (PBGR) if it does not contain two unequal singletons. If a BGR, say R, is not primitive, then we can connect two unequal singletons in R and obtain a BGR with a smaller number of unequal singletons. Continuing this process, we will finally derive a PBGR, say R0. Any detailed routing of R0 induces a detailed routing of R by simply deleting the edges representing the 2-sized sets in R0 which were obtained by combining the unequal singletons in R. An (N, d)-PBGR with d W can also be converted into an (N, W)-PBGR by adding singletons and connecting unequal singletons. Therefore, in the designing of a universal (N, W)-SB, we can only consider the routability for all (N, W)-PBGRs.
The BGR representation has two advantages. First, an (N, d)-BGR GR corresponds to a regular hypergraph with vertex set f1; . . . ; Ng and edge set GR. Here, by regular we mean the degrees of all vertices are equal; the degree of a vertex is defined to be the number of edges incident with it. We refer to such a hypergraph as a 2-graph. Note that 2-graphs allow singletons. Second, the regularity of BGR leads to a precise decomposition theorem , which says that, for any given N, there is a finite number of N-way MBGRs and an (N, d)-BGR can be decomposed into a collection of N-way MBGRs.
The symmetric switch blocks MN;W are defined by the following algorithm in :
Algorithm: Symmetric-Switch-Block(N, W)
Input: NÐnumber of sides of the polygonal switch block; WÐnumber of terminals on each side of the switch block. Output: MN;W T; SÐthe N-sided symmetric switch block of
size W; T: set of terminals; S: set of switches. 1 T ti;j; i 1; 2; . . . ; N; j 1; 2; . . . ; W; 2 S ;; 3 for k 1 to bW 2c do 4 for i 1 to N do 5 for j 1 to N do 6 if i 6 j 7 S S [ f ti;k; tj;W k1g; 8 if W is odd 9 for i 1 to N do 10 for j 1 to N do 11 if i 6 j
IEEE TRANSACTIONS ON COMPUTERS, VOL. 51, NO. 1, JANUARY 2002 93
. H. Fan is with the Department of Computer Science, University of Victoria, Victoria, BC Canada V8W 3P6.
. Y.-L. Wu is with the Department of Computer Science and Engineering, The Chinese University of Hong Kong, Shatin, N.T., Hong Kong. E-mail: firstname.lastname@example.org.
. Y.-W. Chang is with the Department of Computer and Information Science, National Chiao Tung University, Hsinchu 300, Taiwan ROC. Manuscript received 25 Aug. 2000; accepted 13 June 2001.
For information on obtaining reprints of this article, please send e-mail to: email@example.com, and reference IEEECSLog Number 112772.
0018-9340/02/$17.00 ß 2002 IEEE
12 S S [ f ti;dW
13 Output MN;W T; S;
MN;Whas a very nice decomposable property. When W is even, MN;W is isomorphic to a disjoint union of M=2 copies of MN;2; when W is odd, MN;W is isomorphic to a disjoint union ofM 12 copies of MN;2and an MN;1(Lemma 1 of ). Fig. 2 shows M7;3and its decomposition.
Next, we show that MN;Wis not universal when N 7 and W is odd ( 3). Let N and W be such a pair of integers. Since MN;W is isomorphic to the disjoint union ofW 1
2 MN;2s and one MN;1, it is sufficient to show the existence of (N, W)-BGRs which do not contain (N, 1)-BGRs as subglobal routings.
Fig. 1b shows the (7, 3)-GR graph corresponding to routing requirement V0 and Fig. 1c, the 2-graph of the corresponding (7, 3)-BGR (called GR0). Now, we show by contradiction that GR0 does not contain a (7, 1)-BGR. Suppose GR0 contains a (7, 1)-BGR, say GR0. Then, GR0 contains exactly one of the sets f1g; f1; 2g, and f1; 5g. GR0 cannot contain f1g since no subset of ff2; 3g; f2; 4g; f3; 4gg can cover each of 2, 3, and 4 exactly once. GR0 cannot contain f1; 2g since any subset of ff5; 6g; f5; 7g; f6; 7gg cannot cover each of 5, 6, and 7 exactly once. Similarly, GR0 does not contain f1; 5g. Hence, GR does not contain a (7, 1)-BGR. It follows that M7;3 is not universal.
For N 7 and W 2t 3 and t 1, let GRt be the (7, 2t + 3)-BGR obtained from GR0 by adding t copies of f2; 3g; f2; 4g; f3; 4g; f5; 6g; f5; 7g; and f6; 7g and 2t copies of f1g,
see Fig. 3a. It can be shown similarly that GRtdoes not contain a (7, 1)-PBGR. Therefore, M7;2t3is not universal when t 1.
For N 8 and W 2t 3 and t 0, let GRN;tbe the (N, 2t + 3)-BGR obtained by adding N copies of singletons of f8g; . . . ; fNg to GRt, see Fig. 3b. Then, GRN;tdoes not contain an (N, 1)-BGR since, otherwise, GRtwould do. Therefore, MN;2t3are not universal for all N 8 and t 0; 1; . . . .
Summing up above, we know MN;W is not universal when N 7 and W is odd ( 3).
Now, the question is when is MN;Wuniversal?
It was shown in ,  that MN;Wis universal when N 6. It is also true when W 1; 2 by Lemma 12 of . We have just shown that MN;Wis not universal when N 7 and W ( 3) is odd. What then are the cases when N 7 and W is even ( 4)? Are they universal? Fortunately, the answer to this question is yes.
We will show that the statement of Lemma 9 in  is true when W is even. That is, an (N, W)-PBGR can be decomposed intoW
2 (N, 2)-PBGRs when W is even. The proof of Lemma 9 in  is flawed. Next, we give a short proof using Tutte's famous f-factor theorem (Corollary 3.11, p. 78 in ).
To describe the theorem, we need some definitions and notations. Let G V ; E be a graph and k be a positive integer. A k-factor of G is a subgraph of G containing every vertex of G and with every vertex having the degree of k. Let D and S be disjoint
94 IEEE TRANSACTIONS ON COMPUTERS, VOL. 51, NO. 1, JANUARY 2002
Fig. 1. Example of RRV, (7, 3)-GR and (7, 3)-PBGR. (a) Diagram of V0. (b) Graph representation of global routing of V0. (c) Corresponding (7, 3)-PBGR GR0.
Fig. 2. M7;3and its decomposition.
Fig. 3. (7, 2t + 3)-PMBGR, (N, 2t + 3)-PMBGR for N 8, t 0; 1; . . . . (a) (7, 2t + 3)-BGR GR7;1. (b) (N, 2t + 3)-BGR GRN;1.
subsets of V . G D denotes the graph obtained from G by deleting all vertices in D and dG D x denotes the degree of vertex x in graph G D. eG S; D denotes the number of edges of G having one end in S and the other in D.
Lemma 1  (k-Factor Theorem). A loop-free multigraph G contains a k-factor if and only if
kjDj q D; S X
x2S k dG D x 0 1 for all disjoint sets D; S V G, where q D; S denotes the number components C of G D S such that eG S; V C kjV Cj is odd. Corollary 1. A regular multigraph of even degree contains a 2-factor. Proof. Let the degree of G be 2r (r 1). Then, for any two disjoint
sets D; S V G, we have 2jDj q D; S X x2S 2 dG D x 2jDj q D; S 2jSj X x2S dG D x 2jDj q D; S 2jSj 2rjSj eG D; S 2jDj 2jSj 2rjSj eG D; S q D; S:
Moreover, for a component C of G D S with odd value of eG V C; S 2jV Cj or, equivalently, eG V C; S, we have eG V C; D 1 and eG V C; S 1 since dG x 2r; x 2 V C: Then, q D; S eG D; S 2rjSj; 2 q D; S eG D; S 2rjDj: 3 If jDj jSj, by (2) we have 2 jDj jSj 2rjSj eG D; S q D; S 0: Otherwise jDj < jSj, by (3) we have 2jDj 2jSj 2rjSj eG D; S q D; S 2jDj 2jSj 2rjSj 2rjDj 2 jSj jDj r 1 0:
Inequality (1) holds in both cases, therefore, G contains a
2-factor by Lemma 1. tu
Corollary 2. When W is even, an (N, W)-PBGR can be decomposed into W
2 (N, 2)-PBGRs.
Proof. Let G be a 2-graph representation of an (N, W)-PBGR with even W. If G does not have singletons, then G is a regular multigraph of even degree. Therefore, G has a 2-factor by Corollary 1. Otherwise, G will have singletons with all of them being equal singletons, say fxg, and the number of them is an even number, say 2m. Let G0 be the regular multigraph obtained by adding 2 copies of fx; yig,W 22 copies of fyi; zig and fyi; wig, andW22 copies of fzi; wig for i 1; . . . ; m, where yi; zi; wiare new vertices (see Fig. 4). Clearly, G0has degree W and a 2-factor of G0 can be boiled down to a 2-factor of G. G0 contains a 2-factor by the above argument; therefore, G contains a 2-factor. Since removing the edges of a 2-factor from G results in a regular graph of even degree, it contains a 2-factor too. Continuing this process, we know G can be decomposed into union of 2-factors and, hence, an (N, W)-PBGR can be decomposed intoW
2 (N, 2)-PBGRs. tu Now, we show MN;W is universal whenever W is even ( 4). Let W be an even number. Then, MN;Wis isomorphic to the disjoint union of W
2 MN;2s. By Corollary 2, every (N, W)-PBGR can be decomposed intoW
2 (N, 2)-PBGRs, where each can be routed in an MN;2 since every MN;2 is universal (Lemma 12 of ). It follows that MN;W is universal.
It is known that the number of switches in MN;Wis N2
W and it is a lower bound for the universal (N, W)-SB. Therefore, an MN;Wis an optimum USB if it is universal.
Summarizing the above, we know that the statement about MN;W in  should be modified to the following theorem. Theorem 1. MN;Wis universal if and only if N 6 or W is even. MN;W
is an optimum universal switch block if it is universal.
In view of practice (practical application), it is quite useful already to have the result that MN;Wis universal for an even W since we can choose to design FPGA switch boxes with an even number of tracks to gain universal routing property. However, as a problem, the generic (N, W)-USB design problem for N 7 and odd W ( 3) is still left open and it seems to be a hard problem because no efficient method is known to compute all N-way MBGRs for any given N.
 B. Bollobas, Extremal Graph Theory. New York: Academic Press, 1978.  Y.D. Chang, G.M. Wu, and Y.W. Chang, ª3-Dimensional Switch Box,º Proc.
Conf. Field Programmable Gate Arrays (FPGA '99), 1999.
 Y.W. Chang, D.F. Wong, and C.K. Wong, ªUniversal Switch Models for FPGA,º ACM Trans. Design Automation of Electronic Systems, vol. 1, no. 1, pp. 80-101, Jan. 1996.
 H. Fan, J. Liu, and Y.L. Wu, ªGeneral Models for Optimum Arbitrary-Dimension FPGA Switch Box Designs,º Proc. Int'l Conf. Computer-Aided Design (ICCAD), pp. 93-98, Nov. 2000.
 M. Shyu, G.M. Wu, Y.D. Chang, and Y.W. Chang, ªGeneric Universal Switch Blocks,º IEEE Trans. Computers, vol. 49, no. 4, pp. 348-359, Apr. 2000.
IEEE TRANSACTIONS ON COMPUTERS, VOL. 51, NO. 1, JANUARY 2002 95
Fig. 4. Transformation of 2-graph PBGR to a multigraph.