Conceptadvanced
Universal switch block
Also called Chang-Wong-Wong universal switch module.
An FPGA switch block that can route every set of two-pin connections that its side widths allow, built by Chang, Wong and Wong with the fewest switches, 6W for W tracks a side.
A universal switch block is an FPGA switch block with tracks on each of its four sides that can route every set of two-pin connections in which no side has more than connections. Chang, Wong and Wong defined it in 1996, built one with switches, and proved that no switch block with fewer switches is universal. The planar pattern of the Xilinx XC4000 family has the same switches but is not universal. The concept belongs to the FPGA CAD topic of this sub-area; in content it is a definition with a theorem, which this page states and proves.
In plain words
At a crossing of two routing channels, each side has a fixed number of tracks. Some nets must turn from one side to another, and some must go straight. Each net uses one switch, and no two nets may use the same track end.
If too many nets want the same side, no switch block can help, because the side runs out of track ends. A universal block is one that never fails for any other reason: whenever every side has room, it finds a track for every net.
The cheap pattern that keeps each net on the same track number fails on a small case: three nets that turn around three sides of the crossing need three different tracks when only two exist. The universal block avoids this by letting some turns swap tracks, and it does so with no more switches than the cheap pattern.
The idea
The model
Name the sides , , and , each with terminals to . A switch block is a graph on the terminals whose edges join different sides. A requirement is a finite list of nets, each a pair of different sides. Write it as a loopless multigraph on the vertex set with one edge for each net. The density condition, which Chang, Wong and Wong call the dimension constraint, is
A routing of in gives each net one switch , such that no terminal is used by two nets. The block is universal when every that meets the density condition has a routing in .
The condition is necessary for every block, since a side with more than nets has too few terminals. So a universal block is one that routes everything that any block could route.
The lower bound of 6W
Theorem 1. Every universal block on four sides with tracks has at least switches.
Proof. Fix two sides . The requirement with nets meets the density condition. A routing uses switches between and with pairwise different terminals, so every terminal of has a switch to side . This holds for each of the three sides , so every terminal has degree at least 3, and the block has at least switches.
So a universal block with exactly switches has , and between any two sides its switches form a perfect matching, given by a permutation of the tracks.
The case W = 2
For , a block with is given by one bit for each of the six pairs of sides: means the switches are , and means they are .
Lemma 2. A block with and is universal if and only if sums to an odd number on each of the four triangles of side pairs and to an even number on each of the three 4-cycles.
Proof. Let have maximum degree at most 2. Then each connected component of is a path or a cycle, of length 2, 3 or 4, since there are only four vertices. Components share no side, so they can be routed one at a time.
A routing gives each end of each net a track: if the net uses track on side , it uses track on side . The routing is legal exactly when the two nets at a side of degree 2 use different tracks there. On a path, choose the track of the first end freely. Each edge then fixes the track at its far end, and at each inner vertex the next net must take the other track, which is always possible. So every path routes. On a cycle of length , going once around flips the track times at the vertices and adds on each edge, so the start track comes back to itself if and only if is even. A cycle of length 2 has the same pair twice, so its sum is , which is even. A triangle needs an odd sum, and a 4-cycle needs an even sum.
Conversely, if some triangle or 4-cycle breaks its parity rule, the requirement made of that cycle meets the density condition and has no routing, by the same argument.
All bits zero is the planar pattern, where every triangle has the sum 0, so it fails on the three nets , , . The choice used on this page is and the other four bits 0. Each triangle holds exactly one of the edges and , so its sum is 1, and each 4-cycle holds both of them or neither, so its sum is 0 or 2.
Any W
Let . The block puts a copy of the block on each pair of tracks for , with the same pair on all four sides. If is odd, the last track gets the six switches . So has switches.
Lemma 3. Let be odd and a loopless multigraph on four vertices with maximum degree at most . Then has a matching that covers every vertex of degree .
Proof. Let be the set of vertices of degree , and write for the number of edges between and .
- : the empty matching.
- : the vertex has degree , so take one of its edges.
- , : if , take that edge. If not, the edges of and of all go to the other two vertices and . If both and had neighbors only in , then , which is too large. So and have different neighbors among and , and the two edges form a matching.
- , , with the fourth vertex: a matching that covers three vertices has two edges, so it is perfect. Assume no perfect matching exists. The degree sum is even and is odd, so is odd and has a neighbor, say . Then , or is a perfect matching. If , then all edges of go to , and . So , which forces , and then all edges of go to . Then forces , and all edges of go to . Now , a contradiction.
- : is -regular. From we get , and in the same way and . The three numbers , , sum to , so one of them is positive, and that pairing gives a perfect matching.
Theorem 4. is universal for every .
Proof. Let meet the density condition. If is odd, take the matching of Lemma 3 and route its nets on track : each side is in at most one edge of , so no terminal is used twice. The rest has maximum degree at most , since covers every vertex of degree . If is even, and .
Next split into parts of maximum degree at most 2. Take two copies of and, for each vertex , join its two copies by parallel edges. The result is a loopless -regular multigraph. By Petersen's 2-factor theorem, whose proof by an Eulerian circuit and König's theorem on a regular bipartite multigraph also holds for multigraphs, its edges split into 2-factors. Restricted to the first copy, they split the edges of into subgraphs of maximum degree at most 2. Route subgraph on the track pair by Lemma 2. Different pairs and the last track use different terminals, so the whole routing is legal.
With Theorem 1, has the fewest switches that a universal block can have. Chang, Wong and Wong give their own construction and proof. The one above is a short way to reach the same result.
Limits of the idea
Universality is a property of one switch block. A net in an array passes several blocks, and it must use the same track on the channel segment between two of them. So an array of universal blocks still needs a search for a detailed routing, and the global problem stays hard. The idea also assumes bidirectional switches, one switch per net in the block, and two-pin connections. A net with three or more pins at one block needs more than one switch there.
Examples
Three turning nets, W = 2. The nets are , and . In , the pairs and keep the track, and swaps it. Route from to . Then must start at and swaps to . Then starts at and ends at . Each side uses tracks 0 and 1 once each. The planar pattern fails here, as the proof of Lemma 2 shows.
A full requirement, W = 3. Take two nets , two nets , one net and one net . Every side has degree 3, so the set of Lemma 3 holds all four sides, and the pairing has both edges, so is one net and one net , routed on track 2. The rest is the 4-cycle . Route the second from to (a swap), then from to , then the second from to (a swap), and from to .
Counts. For to 4 there are 10, 56, 214 and 641 requirements that meet the density condition. routes all of them. The planar pattern fails on 0, 4, 24 and 88 of them; for , the four failures are the four triangles.
Where it is used
- Architecture of the switch blocks. The result tells an architect that routability of one block costs no extra switches: the same switches as the planar pattern can route every requirement. Chang, Wong and Wong also show that the XC4000-type pattern and the anti-symmetric patterns are not universal, and compare the patterns in experiments with a router.
- Routing and channel width. A router on an array with universal blocks never fails inside one block for lack of a switch, only for lack of tracks. The effect on the minimum channel width of a whole design is measured, not proved. Betz, Rose and Marquardt compare several patterns inside a full flow in Chapter 7.
- Exact routing. With the planar pattern, the track choice is a graph coloring of the nets; with other patterns it is a constraint problem that SAT-based FPGA routing solves exactly. The routing resource graph holds the pattern as edges.
- Edge coloring. For the planar pattern, routing one block is an edge coloring of with colors. A triangle with one edge per side pair has chromatic index 3 but maximum degree 2, which is why the planar pattern fails. Universal blocks avoid the need for an edge coloring with colors.
References
- Yao-Wen Chang, D. F. Wong and C. K. Wong, Universal switch modules for FPGA design, ACM Transactions on Design Automation of Electronic Systems 1(1), 80 to 101, 1996, the definition of a universal switch module by the dimension constraint, the construction with 6W switches and Fs = 3, the proof that fewer switches cannot be universal, and the proof that the XC4000-type module is not universal
- Yao-Wen Chang, D. F. Wong and C. K. Wong, Universal switch-module design for symmetric-array-based FPGAs, Proceedings of the ACM Symposium on Field-Programmable Gate Arrays (FPGA '96), 80 to 86, 1996, the conference version of the construction
- Vaughn Betz, Jonathan Rose and Alexander Marquardt, Architecture and CAD for Deep-Submicron FPGAs, Kluwer, 1999 (doi 10.1007/978-1-4615-5145-4), Chapter 7, Detailed Routing Architecture (switch block patterns compared inside a full routing flow; general locator)
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W4 complete |
|
Tag VB1R58 Edit this page History Report an error Markdown