# PCB Network Analysis for Circuit Partitioning
## 4 Circuit Partitioning Based on Net Attributes and Patterns
### Scattered Components Allocating by Module Matching  
It is observed that a netlist always contains many of the same modules, and then they have the same electrical specification; see Figure 2. If some scattered components are located between two or multiple IC chip modules, which are the same or closed modules, then the peripheral circuits of the same IC module are almost the same. Thus, it is reasonable to think that the surrounding components are also the same. If the parameters of the scattered components among them are the same, they should be evenly allocated to these closed or the same multiple IC modules. Therefore, we first detect IC chips if they are closed or the same on an individual important network through IC parameters. These parameters include the number of pins and the statistics in the module set such as the number of capacitors, resistors, inductors, others, and volume.  
Let \(\mathfrak{F}\) be a feature function of IC modules \(\{\mathbf{S}_{1},\mathbf{S}_{2},\ldots,\mathbf{S}_{N_{2}}\}\). \(\mathfrak{F}(x_{q}^{mm})\) represents the parameters function of the scattered component \(x_{q}^{mm}\) including type and volume, in which  
```
0: a PCB netlist with \(K\) components, the thresholds \(T_{1},T_{2}\);
0: PCB partition sets \(\{\mathbf{S}_{1},\mathbf{S}_{2},\ldots,\mathbf{S}_{N}\}\);  Select IC as key components;  Obtain Partition initial sets \(\{\mathbf{S}_{1}^{ini},\mathbf{S}_{2}^{ini},\ldots,\mathbf{S}_{N}^{ini}\}\) as in Section 4.1; /*Allocating scattered components by Rule (1); /--Stage 1 repeat \(x_{p}\leftarrow\) select one element from \(\mathbf{X}_{S_{\ast}}\);  Check module subsets \(\{\mathbf{S}_{1},\ldots,\mathbf{S}_{N_{1}}\}\) of \(x_{p}\) connected; If\(d_{P}(x_{p},\mathbf{S}_{P})=\min(d_{1},d_{2},\ldots,d_{N_{1}})\And d_{P}(x_{p},\mathbf{S}_{P})<T_{1}\) Then\(\mathbf{S}_{P}\leftarrow\{x_{p},\mathbf{S}_{P}\}\) \(\mathbf{X}_{S_{\ast}}\leftarrow\mathbf{X}_{S_{\ast}}-\{x_{p}\}\); \(n\gets n+1\); until\(\mathbf{X}_{S_{\ast}}^{(n)}=\mathbf{X}_{S_{\ast}}^{(n+1)}\). /*Allocating scattered components by Rule (2); /--Stage 2 if\(\mathbf{X}_{S_{\ast}}\
eq\emptyset\) repeat \(x_{r}\leftarrow\) select one element from \(\mathbf{X}_{S_{\ast}}\);  Check module subsets \(\{\mathbf{S}_{1},\ldots,\mathbf{S}_{N_{3}}\}\) of \(x_{p}\) connected; If\(|\mathbf{S}_{R}|=\max\{|\mathbf{S}_{1}|,|\mathbf{S}_{2}|,\ldots,|\mathbf{S}_{N_{3}}|\}\) Then\(\mathbf{S}_{R}\leftarrow\{x_{p}^{rm},\mathbf{S}_{R}\}\); \(\mathbf{X}_{S_{\ast}}\leftarrow\mathbf{X}_{S_{\ast}}-\{x_{p}\}\); endif until\(\mathbf{X}_{S_{\ast}}=\emptyset\); endif /*Allocating scattered components by Rule (3); /--Stage 3 \(N^{\prime}=|\{\mathcal{N}_{PG}\}|\); repeat \(\mathcal{N}_{i}\leftarrow\) select one net from \(\mathcal{N}_{PG}\); \(N^{\prime}=N^{\prime}-1\);  Check module subsets \(\{\mathbf{S}_{1},\mathbf{S}_{2},\ldots,\mathbf{S}_{N_{3}}\}\) of \(\mathcal{N}_{i}\) connected, and components in \(\mathbf{X}_{P_{i}G}\); If\(\exists\ q,q^{\prime},j,j^{\prime},\ s.t.\ x_{q},x_{q^{\prime}},\mathbf{X}_{Q}\in \mathbf{X}_{P_{i}G}\), \(\mathbf{S}_{j},\mathbf{S}_{j^{\prime}}\in\{\mathbf{S}_{1},\mathbf{S}_{2}, \ldots,\mathbf{S}_{N_{2}}\}\);  s. t. \(\mathfrak{P}(x_{q})=\mathfrak{P}(x_{q^{\prime}})\And|\mathfrak{P}(\mathbf{S}_ {j})-\mathfrak{P}(\mathbf{S}_{j^{\prime}})|<T_{2}\And|\frac{|\mathbf{X}_{Q}|}{| \mathbf{S}_{j}|}|\in\mathbb{N}\), Then \(\mathit{Allocate}\) them equally; Else \(\mathit{Allocate}\) them roughly equally; until\(N^{\prime}=0\).
```  
**Algorithm 1** The algorithm of circuit partitioning for PCB netlist based on net attributes