4.1. Initialization Strategy Based on Spectral Clustering
To improve the quality of the initial solution in NoC task mapping, this paper proposes an initialization strategy based on spectral clustering. The method generates high-quality initial mapping solutions by leveraging the communication bandwidth and structural features between tasks, providing a solid starting point for subsequent optimization algorithms.
In this study, the XY routing strategy is adopted, which maintains symmetry in the hop count of paths. To simplify the calculation, the directed edge weights of the IP communication graph are converted into undirected edge weights. Based on the bandwidth information between task pairs in the communication graph, a bandwidth matrix is constructed to quantify the communication intensity between tasks. To further capture the structural similarity between tasks, the Shared k-Nearest Neighbor method is introduced. This method counts the number of shared neighbors between task pairs and constructs an affinity matrix reflecting their structural intimacy. In this process, the structural relationships between neighboring nodes are also considered, with a weighted addition strategy applied to the number of shared neighbors and their positions. The resulting affinity matrix is then normalized using maximum normalization. Once the affinity matrix is obtained, the spectral clustering algorithm is used to partition the task set.
To avoid an unreasonable number of clusters, a dynamically adjustable constraint range
is imposed on the number of clusters
k. Specifically, the minimum number of clusters is fixed at
, ensuring that at least two clusters are formed and thereby preserving the semantic meaning of clustering. The maximum number of clusters is dynamically defined as
, which both limits the computational complexity of spectral clustering and guarantees that each cluster contains at least two tasks. This prevents overly fine-grained clustering and fragmentation. Within this range, the optimal number of clusters is evaluated based on silhouette coefficients. Specifically, the silhouette coefficient measures the balance between intra-cluster similarity and inter-cluster similarity, and its calculation formula is as follows:
Among these, denotes the average similarity of task i within the current cluster, while represents the average similarity of task i with its nearest neighbor clusters. The optimal number of clusters, , is determined by maximizing the profile coefficient , which is then selected as the final number of clusters. This dynamic adjustment mechanism ensures that the initial clustering aligns with the task scale, thereby avoiding poor adaptability and the risk of overfitting that may arise from manually specifying a fixed number of clusters.
Given that the maximum task scale considered in this study is , the setting range of and is relatively narrow and empirically grounded. This dynamic adjustment range is sufficient to support effective clustering initialization in practical implementations. Even if the initial clustering is not globally optimal (e.g., when the optimal number of clusters falls outside the predefined range), the proposed ET optimization algorithm is capable of compensating for suboptimal initial mappings through its strong global exploration and local exploitation capabilities during subsequent iterations. Comprehensive experimental results demonstrate that the proposed method consistently outperforms baseline algorithms across several performance metrics, including communication cost, energy consumption, and latency. These findings validate the effectiveness and robustness of the proposed methodological framework.
Subsequently, based on the clustering results, the task with the highest total communication bandwidth within each cluster is selected as the core task. This task is prioritized for placement at the center region of the NoC topology. The remaining tasks are then mapped outward, extending to the periphery of the topology through a breadth-first search, based on the original order of the clusters. Positions adjacent to the core tasks are filled first, in order to minimize communication distances and reduce the communication overhead caused by inter-cluster data exchanges. The process of the initial mapping is illustrated in Algorithm 1.
Algorithm 1: Initial Mapping |
![Electronics 14 02846 i001]() |
4.2. Mapping Optimization Using ET
COA is a metaheuristic algorithm inspired by the biological behaviors of coatis in their natural environment, specifically their behavior when hunting iguanas and avoiding predators. These behaviors correspond to the exploration and exploitation phases of the algorithm, respectively. During the exploration phase, COA performs a global search by simulating the cooperative hunting behavior of coati groups targeting iguanas. In the exploitation phase, individual coatis rapidly flee to known safe areas and make fine adjustments. Through this behavioral pattern, COA achieves both global exploration and a local search within the solution space of the optimization problem.
After generating the initial population and achieving a certain level of solution quality, this study, while preserving the original advantages of COA, proposes an improved version for the NoC mapping problem: the ET algorithm. To enhance the efficiency and scope of a global search, the ET algorithm introduces a dynamic and adaptive global search strategy through two behavioral models: tree pursuit and ground encirclement. The tree pursuit strategy simulates the behavior of coati individuals climbing trees and quickly approaching iguanas, while the ground encirclement strategy simulates the group’s collaborative process of ambushing iguanas on the ground. The allocation ratio between the two strategies is controlled by the dynamic phase ratio, with its calculation formula given by:
In this context, t represents the current generation, and is the maximum number of iterations. This ratio enables the algorithm to initially assign 90% of the individuals to the tree pursuit strategy, leveraging information from high-quality individuals to accelerate convergence toward the optimal solution and enhance global search capability. As the iteration progresses, the proportion gradually decreases to 30%, with the remaining individuals transitioning to the ground encirclement strategy. This shift improves population diversity and strengthens local exploitation, thereby reducing the risk of premature convergence to local optima. The change rate is set to 0.6, which governs the smooth transition from exploration to exploitation. This parameter was determined empirically through multiple rounds of experimental tuning.
In each iteration, the ET algorithm selects the first
individuals to perform the tree pursuit. This is carried out by randomly selecting one to three task positions to swap, replacing the original individual if the new solution is better, and updating
. The formula is:
Compared to the tree pursuit strategy, the ground encirclement strategy emphasizes diversity and exploration within the search space. This strategy simulates a coati’s ambush on the ground, waiting for the iguana to jump after the raid. Its primary purpose is to expand the search boundary and increase the coverage of the solution space. In this phase, for the remaining
individuals, the ET algorithm introduces a diversified search driven by a random reference solution
.
effectively enhances population diversity and assists the algorithm in escaping local optima. Compared with traditional fixed local perturbation strategies,
introduces greater stochasticity and feasibility guarantees, transforming the ground encirclement strategy from a rigid local search into a more adaptive and exploratory mechanism. For each individual
, a randomized legitimate solution
is generated as a temporary reference target. If the fitness of
is better than that of the current individual, the alignment operation is performed; otherwise, the discretization perturbation operation is applied. The formula is as follows:
The alignment operation identifies the set of positions where the task mappings of the current solution differ from those in . These positions represent potential improvement points in the current individual. Up to 25% of these positions are randomly selected. For each selected position, the algorithm locates the corresponding task in the current solution based on the task at that position in the reference solution, and then swaps the two tasks in the current solution. This exchange ensures that the local structure of the current solution becomes more similar to the reference, without simply replacing tasks. Instead, it subtly adjusts the local task distribution while preserving the global structure of the individual. This mechanism helps the algorithm avoid premature convergence near a single optimal solution.
In contrast, the differential perturbation operation is employed when the reference solution is not necessarily superior to the current individual. Its purpose is to enhance diversity and expand the search space. This operation begins by detecting the positions where the current and reference solutions share the same task mappings. No more than 25% of these positions are randomly selected to define the perturbation range. For the tasks at these positions, the algorithm identifies all idle cores in the current solution and randomly exchanges the selected tasks with blank positions on these idle cores. This operation disrupts structural similarity between solutions, promotes diversity, and enables more flexible task migration. By leveraging idle areas in the core set, the algorithm enhances its exploratory potential.
Although the ET algorithm demonstrates strong global exploration capabilities, improving local accuracy remains crucial for reducing communication costs in the NoC mapping problem. To address this, the ET algorithm first performs a rapid local perturbation on the individual, simulating the quick, small-scale position adjustments made by coatis when avoiding predators. This strategy controls the perturbation intensity through random task exchanges, which not only enhances the global jumping ability in the early stages but also prevents excessive deviation from the potentially optimal region in the later stages, thereby balancing the breadth and accuracy of the search.
Subsequently, the ET algorithm introduces a hill-climbing optimization strategy based on local perturbation and incremental evaluation, in contrast to the traditional hill-climbing strategy, which relies on violent perturbations and global cost re-evaluation. Specifically, in each round of local optimization, the ET algorithm randomly selects 50% of the mapped tasks from the current solution to form a candidate task set , serving as potential sources for migration. Simultaneously, 90% of the available positions among the current idle cores are randomly selected to form a candidate position set , representing potential mapping targets. This strategy maintains perturbation diversity while avoiding the high computational cost of global traversal, thereby enabling controllable local perturbation intensity.
To efficiently support the rapid evaluation of a large number of perturbation candidate pairs, the ET algorithm internally constructs two hash-based mapping structures with constant time complexity: a task-to-location index table and a location-to-task reverse lookup table. These two structures are kept synchronized throughout the state update process, ensuring that operations such as task location queries, mapping modifications, and validity checks can be performed in time. This mechanism enables efficient high-frequency perturbation evaluation during a local search.
For each candidate perturbation pair
, the algorithm attempts to migrate task
t from its current mapping position
to the new position
, and evaluates its impact on the overall communication cost using an incremental computation method. The change in communication cost,
, is determined by the edge weights
between task
t and its communication neighbors, as well as the change in hop distances. This relationship can be expressed as:
Here, represents the set of direct communication neighbors of task t. The primary advantage of this incremental evaluation mechanism is that it requires computing only the local path changes associated with the edges affected by the migration. This significantly reduces unnecessary global recalculations while preserving computational accuracy.
To avoid ineffective fluctuations caused by local disturbances, the ET algorithm incorporates multiple control mechanisms to enhance the convergence and stability of the hill-climbing phase. First, in terms of acceptance criteria, only perturbations that yield a reduction in communication cost greater than 1% are accepted. This prevents frequent switching and unnecessary computational overhead due to negligible improvements. Second, with respect to iteration rounds, the algorithm performs a maximum of two hill-climbing iterations by default. If no effective improvement is observed in consecutive rounds, the process is terminated early to avoid redundant oscillations. These strategies reflect the algorithm’s emphasis on robustness and computational efficiency.
Figure 2 illustrates the overall framework of the ET algorithm and highlights the implementation details of the alignment operation, perturbation mechanism, and hill-climbing optimization strategy. Algorithm 2 illustrates the process of ET algorithm mapping.
Algorithm 2: ET Algorithm |
![Electronics 14 02846 i002]() |