## 4 Design Methodology for SOA-Enabled HONoC
### SOA Placement Algorithm for Laser Source Power Saving and SNR Enhancement  
The SOA gain modelling in Equation (5) shows that using a single SOA is superior to using multiple SOAs in that it uses less bias current to obtain the same gain, as described in Equation (7).  
\[G(I_{total})>\sum_{i=1}^{n}G(I_{i}),\;\;I_{total}=\sum_{i=1}^{n}I_{i} \tag{7}\]  
In addition to the gain efficiency of the SOA, the small number of SOAs with high gain is advantageous in terms of the area in which the SOA devices and control units are placed. However, this strategy should be validated. As the worst-case insertion loss determines the output power of laser sources and even one SOA has impact on various routing paths, an effective SOA placement rule is needed to reduce the laser source power using the appropriate number of SOAs. Considering the insertion loss due to the SOA placement in the routing path, the power consumption of the HONoC can be effectively reduced by equalizing the maximum number of hops that do not pass through the SOA in all routing paths. We denote this maximum hop count without SOAs as \(h\), which is determined by \(t_{x}\) and \(t_{y}\), indicating the SOA spacing on the \(X\)-axis and \(Y\)-axis, respectively.  
The accumulated crosstalk noise power at the destination depends on not only the number of SOAs but also the location of the SOAs. For example, as shown in Figure 5, the crosstalk power increases when the SOA is placed nearer to the destination rather than the source. In other words, to minimize the crosstalk power amplified through the SOAs in the optical signal path, SOA should be placed close to the source. In the mesh-based HONoC with XY routing, the optical signal is transmitted along the \(Y\)-axis after the \(X\)-axis. Hence, placing more SOAs on the \(X\)-axis is preferred to \(Y\)-axis in terms of SNR. Accordingly, we propose the SOA placement algorithm as follows. In this study, it is assumed that all SOA gains are the same for the convenience of design and analysis of the network.  
Figure 4: Overall flow of the proposed design methodology.  
In Algorithm 1, the optimal SOA spacing in the \(X\)-axis (\(t_{x}\)) and that in the \(Y\)-axis (\(t_{y}\)) are selected according to the maximum number of hops among the possible routing paths without SOAs (\(h\)). Therefore, the total number of SOAs placed in the network depends on the possible combinations of \(t_{x}\) and \(t_{y}\) with a consistent \(h\). To minimize the additional power consumption of the SOAs, use of the smallest number of SOAs should be pursued. If there are several cases with the same number of SOAs, the narrowest \(X\)-axis spacing is chosen to improve the SNR (lines 1-10). After the spacing of the SOAs is determined, SOAs are placed on the link of the corresponding router (lines 11-23).  
```
0: mesh size (\(m\), \(n\)), maximum hop count of possible paths without SOAs (\(h\))
0: number of SOAs (\(n_{SOA}\)), SOA spacing of \(X\)-axis and \(Y\)-axis (\(t_{x}\), \(t_{y}\))
1:\(n_{SOA}=(n-1)/1+(m-1)/(h+1)\)
2:For\(i\) from 1 to \(h+1\)do
3:\(j=h+2-i\)
4:\(n[i]=(n-1)/i+(m-1)/j\)
5:If\(n[i]<n_{SOA}\)then
6:\(n_{SOA}=n[i]\)
7:\(t=i\)
8:endif
9:Endfor
10:\(t_{x}=t\), \(t_{y}=h+2-t\), \(n_{SOA}=m\cdot t_{x}+n\cdot t_{y}\)
11:For\(i\) from \(t_{x}\) to \(n-1\)do
12:For\(j\) from 1 to \(m\)do
13:Allocate SOA at east link of R(\(j\), \(i\))
14:\(j=j+1\)
15:Endfor
16:\(i=i+t_{x}\)
17:Endfor
18:For\(i\) from \(t_{y}\) to \(m-1\)do
19:For\(j\) from 1 to \(n\)do
20:Allocate SOA at south link of R(\(i\), \(j\))
21:\(j=j+1\)
22:Endfor
23:\(i=i+t_{y}\)
24:Endfor
```  
**Algorithm 1** SOA Placement for Laser Source Power Saving and SNR Improvement