Download presentation
Presentation is loading. Please wait.
Published byMariah Ray Modified over 8 years ago
1
Partitioning Jong-Wha Chong Wireless Location and SOC Lab. Hanyang University
2
Contents Introduction Partitioning Kernighan-Lin Algorithm Fiduccia-Mattheyses (FM) Algorithm Multilevel Partitioning 2 SoC & Wireless Location Lab.
4
VLSI Design Flow 4 SoC & Wireless Location Lab.
5
Physical Design Flow 5 SoC & Wireless Location Lab.
7
Partitioning 7 SoC & Wireless Location Lab. Divide large circuit into k disjoint subcircuits
8
Optimization goal 8 SoC & Wireless Location Lab. 1. Minimize number of connections between partitions 2. Balance every partition as well as possible 3. Each partition meets design constraints (size, # of external connections)
9
Partitioning Algorithms Partitioning Algorithms 1. Kernighan-Lin (KL) Algorithm 2. Fiduccia-Mattheyses (FM) Algorithm 3. Multilevel Partitioning 9 SoC & Wireless Location Lab.
10
Kernighan-Lin (KL) Algorithm Given: A graph with 2n nodes where each node has the same weight. Goal : A partition (division) of the graph into two disjoint subsets A and B with minimum cut cost and |A| = |B| = n. 10 SoC & Wireless Location Lab. KL-Algorithm
11
Phase 1. Swap node pair Phase 2. Select best case Kernighan-Lin (KL) Algorithm 11 SoC & Wireless Location Lab.
12
Cost D(v) of moving a node v D(v) = |E c (v)| – |E nc (v)| E c (v) : The set of v’s incident edges that are cut by the cut line E nc (v) : The set of v’s incident edges that are not cut by the cut line. High costs (D > 0) indicate that the node should move, while low costs (D < 0) indicate that the node should stay within the same partition. 12 SoC & Wireless Location Lab. Kernighan-Lin (KL) Algorithm
13
Gain of swapping a pair of nodes a und b Δg = D(a) + D(b) - 2 · c(a,b) D(a), D(b) :The respective costs of nodes a, b c(a,b) :The connection weight between a, b The gain Δg indicates how useful the swap between two nodes will be The larger Δg, the more the total cut cost will be reduced 13 SoC & Wireless Location Lab. Kernighan-Lin (KL) Algorithm
14
Gain of swapping a pair of nodes a und b Δg = D(a) + D(b) - 2 · c(a,b) Ex) Δg (3,7) = D(3) + D(7) – 2 · c(a,b) = 2 + 1 – 2 · 1 = 1 → Swapping nodes 3 and 7 would reduce the cut size by 1 14 SoC & Wireless Location Lab. Kernighan-Lin (KL) Algorithm
15
Gain of swapping a pair of nodes a and b The goal is to find a pair of nodes a and b to exchange such that Δg is maximized and swap them. Maximum positive gain G m of a pass The maximum positive gain G m corresponds to the best prefix of m swaps within the swap sequence of a given pass. G m is computed as the sum of Δg values over the first m swaps of the pass, with m chosen such that G m is maximized. 15 SoC & Wireless Location Lab. Kernighan-Lin (KL) Algorithm
16
16 SoC & Wireless Location Lab. Example of KL-Algorithm
17
17 SoC & Wireless Location Lab. Example of KL-Algorithm
18
18 SoC & Wireless Location Lab. Example of KL-Algorithm
19
19 SoC & Wireless Location Lab. Example of KL-Algorithm
20
20 SoC & Wireless Location Lab. Example of KL-Algorithm
21
21 SoC & Wireless Location Lab. Example of KL-Algorithm
22
22 SoC & Wireless Location Lab. Example of KL-Algorithm
23
23 SoC & Wireless Location Lab. Example of KL-Algorithm
24
24 SoC & Wireless Location Lab. Example of KL-Algorithm
25
25 SoC & Wireless Location Lab. Example of KL-Algorithm
26
Fiduccia-Mattheyses (FM) Algorithm Single cells are moved independently instead of swapping pairs of cells. Thus, this algorithm is applicable to partitions of unequal size or the presence of initially fixed cells. Cut costs are extended to include hypergraphs, i.e., nets with two or more pins. While the KL algorithm aims to minimize cut costs based on edges, the FM algorithm minimizes cut costs based on nets. The area of each individual cell is taken into account. Nodes and subgraphs are referred to as cells and blocks, respectively 26 SoC & Wireless Location Lab.
27
Given: a graph G(V,E) with nodes and weighted edges Goal: to assign all nodes to disjoint partitions, so as to minimize the total cost (weight) of all cut nets while satisfying partition size constraints 27 SoC & Wireless Location Lab. Fiduccia-Mattheyses (FM) Algorithm FM-Algorithm
28
Gain Δg(c) for cell c Δg(c) = FS(c) – TE(c) FS(c) : The number of cut nets that connect only to c TE(c) : The number of uncut nets connected to c. The higher the gain Δg(c), the higher is the priority to move the cell c to the other partition. 28 SoC & Wireless Location Lab. Fiduccia-Mattheyses (FM) Algorithm
29
Gain Δg(c) for cell c Δg(c) = FS(c) – TE(c) FS(c) : The number of cut nets that connect only to c TE(c) : The number of uncut nets connected to c. 29 SoC & Wireless Location Lab. Fiduccia-Mattheyses (FM) Algorithm
30
Maximum positive gain G m of a pass The maximum positive gain G m is the cumulative cell gain of m moves that produce a minimum cut cost. G m is determined by the maximum sum of cell gains g over a prefix of m moves in a pass 30 SoC & Wireless Location Lab. Fiduccia-Mattheyses (FM) Algorithm
31
Ratio factor The ratio factor is the relative balance between the two partitions with respect to cell area. It is used to prevent all cells from clustering into one partition. The ratio factor r is defined as where area(A) and area(B) are the total respective areas of partitions A and B 31 SoC & Wireless Location Lab. Fiduccia-Mattheyses (FM) Algorithm
32
Balance criterion The balance criterion enforces the ratio factor. To ensure feasibility, the maximum cell area area max (V) must be taken into account. A partitioning of V into two partitions A and B is said to be balanced if [ r · area(V) – area max (V) ] ≤ area(A) ≤ [ r · area(V) + area max (V) ] 32 SoC & Wireless Location Lab. Fiduccia-Mattheyses (FM) Algorithm
33
Example of FM-Algorithm Example) Given : Ratio factor r = 0.375area(Cell_1) = 2 area(Cell_2) = 4area(Cell_3) = 1 area(Cell_4) = 4area(Cell_5) = 5 33 SoC & Wireless Location Lab.
34
Example of FM-Algorithm Step 0 : Compute the balance criterion [ r · area(V) – area max (V) ] ≤ area(A) ≤ [ r · area(V) + area max (V) ] 0.375 · 16 – 5 = 1 ≤ area(A) ≤ 11 = 0.375 · 16 + 5 34 SoC & Wireless Location Lab.
35
Example of FM-Algorithm Step 1 : Compute the gains of each cell 35 SoC & Wireless Location Lab.
36
Example of FM-Algorithm Step 2 : Select the base cell Balance criterion 1 ≤ area(A) ≤ 11 (from Step 0) Possible base cells are Cell 1 and Cell 5 Balance criterion after moving Cell 1 : area(A) = area(Cell_2) = 4 Balance criterion after moving Cell 5 : area(A) = area(Cell_1) + area(Cell_2) + area(Cell_5) = 11 Both moves respect the balance criterion, Cell 1 is selected, moved, and fixed 36 SoC & Wireless Location Lab.
37
Example of FM-Algorithm Step 3 : Fix base cell, update Δg values 37 SoC & Wireless Location Lab.
38
Example of FM-Algorithm Step 4 : If all cells are fixed? Go to step 5. If not? go to step 3 38 SoC & Wireless Location Lab.
39
Example of FM-Algorithm Step 4 : If all cells are fixed? Go to step 5. If not? go to Step 3 39 SoC & Wireless Location Lab.
40
Example of FM-Algorithm Step 4 : If all cells are fixed? Go to step 5. If not? go to Step 3 40 SoC & Wireless Location Lab.
41
Example of FM-Algorithm Step 4 : If all cells are fixed? Go to step 5. If not? go to Step 3 41 SoC & Wireless Location Lab.
42
Example of FM-Algorithm Step 5 : Find best move sequence c 1 … c m 42 SoC & Wireless Location Lab.
43
Framework for multilevel partitioning Clustering To make things easy, groups of tightly-connected nodes can be clustered, absorbing connections between these nodes Size of each cluster is often limited so as to prevent degenerate clustering, i.e. a single large cluster dominates other clusters Refinement should satisfy balance criteria 43 SoC & Wireless Location Lab.
44
Framework for multilevel partitioning Multilevel partitioning 44 SoC & Wireless Location Lab.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.