Network-on-chip mapping method based on ant colony algorithm
By introducing quantum coding and quantum edge operation based on the ant colony algorithm, combined with on-chip network division and pheromone update, the NP difficulty of IP core mapping in the multi-core processor is solved, and better on-chip network mapping is achieved, which reduces communication energy consumption and improves system performance.
Patent Information
- Application Number
- CN202510220380.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-17
AI Technical Summary
In the multi-core processor design, IP core mapping problem is difficult for the existing technology to find the optimal mapping solution in large-scale networks due to its NP difficulty, resulting in high communication energy consumption and poor performance.
The on-chip network mapping method based on ant colony algorithm is used to allocate the IP cores through the quantum ant colony algorithm, divide them into multiple on-chip networks, and improve search efficiency through pheromone update and quantum mutation operations to avoid local optimal solutions.
It effectively reduces communication energy consumption, improves search efficiency, and can find better mapping solutions in large-scale networks, improving system performance.
Smart Images

Figure CN120162291A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network design, and particularly to an on-chip network mapping method based on an ant colony algorithm. Background Art
[0002] With the further increase in the number of cores of many-core processors, the inter-core interconnection and communication relationships have become increasingly complex. As one of the important links in the design of NoC, the IP core mapping design will face new challenges. The position of the IP core in the network structure will greatly affect the energy consumption of many-core processors, network performance, and platform hardware costs. According to the specific requirements of inter-core communication, how to reasonably allocate numerous IP cores in the network structure to meet the needs of high-performance computing has become an urgent problem to be solved. The IP core mapping problem has become the key to the design of many-core processors. However, since the IP core mapping problem is an NP-hard problem, it is unrealistic to find the optimal mapping scheme by exhaustive methods as the network scale increases.
[0003] NoC mapping is an important step in NoC design. After determining the IP cores selected for the SoC, NoC mapping determines the correspondence from the IP cores to the NoC architecture. Different mapping results have an important impact on the performance of the system, such as execution time, communication delay, and communication energy consumption. The mapping problem belongs to the category of quadratic assignment problems. The branch and bound method is used to solve the energy consumption-optimal NoC mapping problem under bandwidth constraints; however, when the NoC scale becomes large, the execution time of this algorithm increases exponentially, and it is quite complex to solve precisely on a large scale within limited time and space.
[0004] By optimizing the mapping method, communication energy consumption can be saved. In addition, most on-chip networks belong to real-time systems and have strict requirements on the computing and communication time of the system. Therefore, NoC mapping should meet the communication delay constraints of the system and aim to reduce the communication energy consumption of NoC. Summary of the Invention
[0005] The purpose of the present invention is to propose an on-chip network mapping method based on an ant colony algorithm to optimize the on-chip network mapping in order to solve the problem of high communication energy consumption of NoC.
[0006] To achieve the above purpose, on the one hand, the present invention adopts the following technical solution: An on-chip network mapping method based on an ant colony algorithm, which includes the following steps:
[0007] S1: Determine the communication core graph and the topological structure graph, and number the IP cores and each resource node in the on-chip network by using a recursive classification method;
[0008] S2: Divide the on-chip network into multiple small on-chip networks;
[0009] S3: Allocate the IP cores required by a single application to the on-chip network through the quantum ant colony algorithm to obtain a sub-network;
[0010] S4: Select the edge with the largest traffic from the four edges that make up the sub-network, and design a new sub-network using the quantum ant colony algorithm at the adjacent position of the edge with the largest traffic;
[0011] S5: Select the optimal IP cores for communication according to the number of applications running simultaneously in the sub-network.
[0012] As a further description of the above technical solution:
[0013] The steps of the quantum ant colony algorithm are as follows:
[0014] 1) Initialize the population and assign initial values to the information parameters of each individual ant;
[0015] 2) Randomly place multiple ants on one of several nodes;
[0016] 3) Each ant constructs a path according to the ant movement strategy until all ants have completed the construction of the solution path;
[0017] 4) Record the optimal solution generated in this iteration;
[0018] 5) Use the quantum rotation gate to update the pheromone on the path just walked;
[0019] 6) Determine whether the optimal solution meets the termination condition of the algorithm; if the maximum number of iterations is met, terminate, otherwise go back to step 2) to continue.
[0020] As a further description of the above technical solution:
[0021] The pheromone uses quantum coding to represent the pheromone in the ant colony algorithm.
[0022] As a further description of the above technical solution:
[0023] The concentration of the pheromone is the probability that an ant chooses the 0 path or the 1 path, represented by |a| 2 and |b| 2 respectively, where |a| 2 represents the pheromone concentration for an ant to choose the 0 path, and |b| 2 represents the pheromone concentration for an ant to choose the 1 path.
[0024] As a further description of the above technical solution:
[0025] The pheromone concentrations of different paths satisfy the normalization condition: |a| 2 +|b| 2 = 1.
[0026] As a further description of the above technical solution:
[0027] The steps of the quantum ant colony algorithm further include a quantum mutation operation, which selects several ants according to the mutation probability, mutates one or several qubits of the selected individuals, and reverses the two probability amplitudes of the corresponding qubits.
[0028] As a further description of the above technical solution:
[0029] In step S1, the K-Means clustering algorithm is used to cluster resource nodes to obtain a small on-chip network.
[0030] As a further description of the above technical solution:
[0031] If the energy consumption of the new sub-network is higher than that of the original network when running a single application, the new sub-network is abandoned and the original network is copied to replace the new sub-network; if the energy consumption of the new sub-network is lower than that of the original network when running a single application, the new sub-network is retained.
[0032] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are as follows:
[0033] 1. In the present invention, by performing quantum encoding and quantum edge operation on the population based on the ant colony algorithm, the individual diversity is greatly enhanced, the search efficiency is improved, and the degradation phenomenon of the traditional ant colony algorithm is effectively overcome. The quantum ant scheduling algorithm can effectively allocate grid resources dynamically for users, reduce the task time span, reduce the inefficiency of scheduling tasks, improve the performance of the grid system, and achieve the purpose of reducing energy consumption.
[0034] 2. In the present invention, by dividing the on-chip network into multiple small on-chip networks, the communication path planning problem of the large on-chip network can be decomposed into small-scale path planning problems, thereby reducing the possibility of the quantum ant colony algorithm falling into local optimal solutions and obtaining optimal solutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required in the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0036] Figure 1 It is a schematic flowchart of a communication network information transmission method in an offline state. DETAILED DESCRIPTION OF THE INVENTION
[0037] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0038] Please refer to Figure 1 , the present invention provides a technical solution: a network-on-chip mapping method based on the ant colony algorithm, which includes the following steps:
[0039] S1: Determine the communication core graph and the topology graph, and number the IP cores and each resource node in the network-on-chip by using the method of recursive classification;
[0040] S2: Divide the network-on-chip into multiple small network-on-chips;
[0041] S3: Allocate the IP cores required for a single application to the small network-on-chips through the quantum ant colony algorithm to obtain sub-networks;
[0042] S4: Select the edge with the largest traffic from the four edges that make up the sub-network, and design a new sub-network at the adjacent position of the edge with the largest traffic by using the quantum ant colony algorithm, with the original sub-network as the known condition;
[0043] S5: Select the optimal IP cores for communication according to the number of applications running simultaneously in the sub-network.
[0044] By using the quantum ant colony algorithm to allocate the IP cores required for a single application to the network to obtain sub-networks, and repeatedly using the original sub-network as the known condition to design another sub-network by using the quantum ant colony algorithm, a network-on-chip with multiple applications running in parallel can be obtained. Finally, according to the number of applications running simultaneously in the sub-network, the optimal IP cores are selected for communication, and the performance of a single application can be optimized by using the repeated IP core resources.
[0045] The steps of the quantum ant colony algorithm are as follows:
[0046] 1) Initialize the population and assign initial values to the information parameters of each individual ant;
[0047] 2) Randomly place multiple ants on one of several nodes;
[0048] 3) Each ant constructs a path according to the ant movement strategy until all ants have completed the construction of the solution path
[0049] 4) Record the optimal solution generated in this iteration;
[0050] 5) Use the quantum rotation gate to update the pheromone on the path just walked;
[0051] 6) Determine whether the optimal solution meets the termination condition of the algorithm; if the maximum number of iterations is met, terminate, otherwise go back to step 2) and continue;
[0052] The pheromone uses quantum coding to represent the pheromone in the ant colony algorithm.
[0053] The optimized quantum ant colony algorithm has stronger global search ability and can find a better mapping scheme in a larger search space. By introducing qubit and pheromone adjustment strategies, the convergence speed of the algorithm is improved and the number of iterations is reduced. Compared with the traditional mapping algorithm, the mapping method based on the quantum ant colony algorithm has better performance in terms of communication cost, resource consumption and mapping efficiency. The on-chip network mapping method based on the quantum ant colony algorithm shows better performance than the traditional method in terms of mapping model construction, optimization strategy and algorithm performance.
[0054] The concentration of the pheromone is the probability that the ant chooses path 0 or path 1, denoted by |a| 2 and |b| 2 respectively, where |a| 2 represents the pheromone concentration for the ant to choose path 0, and |b| 2 represents the pheromone concentration for the ant to choose path 1.
[0055] The pheromone concentrations of different paths satisfy the normalization condition: |a| 2 +|b| 2 = 1.
[0056] Using quantum coding to represent the pheromone can avoid the pheromone on the search path from being too concentrated too quickly. Through the quantum rotation gate, it jumps out of the local optimum and continues to search to achieve better results. The initial value of the pheromone in the ant colony algorithm is designed to be zero to improve the algorithm that uses quantum coding to represent the pheromone in the ant colony algorithm, and verify that the pheromone at each position is random and satisfies the quantum probability amplitude normalization condition.
[0057] The steps of the quantum ant colony algorithm also include quantum mutation operations. Several ants are selected according to the mutation probability, and one or several qubits of the selected individuals are mutated, and the two probability amplitudes of the corresponding qubits are reversed.
[0058] The quantum mutation operation is usually implemented using a quantum NOT gate. To avoid local convergence of quantum ants. This can make the two spatial positions represented by the ants mutate simultaneously. The quantum mutation operation actually changes the state superposition state of the qubit, so that the original collapse towards state 1 direction is changed to collapse towards state "0 direction, or vice versa. It can improve the calculation accuracy.
[0059] In step S1, the K-Means clustering algorithm is used to cluster resource nodes to obtain a small on-chip network. The communication path planning problem of a large on-chip network can be decomposed into small-scale path planning problems, thereby reducing the possibility of the quantum ant colony algorithm falling into a local optimal solution and obtaining an optimal solution today.
[0060] If the energy consumption of the new sub-network is higher than that of the atomic network during single-application operation, the new sub-network is abandoned and the atomic network is copied to replace the new sub-network: if the energy consumption of the new sub-network is lower than that of the atomic network during single-application operation, the new sub-network is retained. This can optimize the single-application performance by utilizing the repeated IP core resources.
[0061] Algorithm verification:
[0062] First, a typical Network-on-Chip (NoC) topology structure, such as a two-dimensional Mesh structure and a Torus structure, is selected as the experimental object. At the same time, different communication modes and communication traffic are set according to the actual application requirements.
[0063] In the experiment, a variety of evaluation metrics are adopted, such as mapping success rate, average communication cost, network congestion degree, etc. In addition, for comparative analysis, several classical mapping algorithms, such as genetic algorithm, particle swarm optimization algorithm, etc., are selected.
[0064] The experimental environment is as follows: the processor is Intel Core i7, the main frequency is 3.6 GHz, the memory is 16 GB, and the operating system is 64-bit Windows 10. The programming language uses Python, and the implementation of the quantum ant colony algorithm refers to relevant literature and is appropriately modified according to the on-chip network mapping problem.
[0065] The experimental results show that the on-chip network mapping method based on the quantum ant colony algorithm is superior to other classical algorithms in terms of mapping success rate, average communication cost, and network congestion degree.
[0066] In terms of mapping success rate, the quantum ant colony algorithm can find an optimal or near-optimal mapping scheme in most cases. Especially in the case of large communication traffic, its advantage is more obvious.
[0067] In terms of average communication cost, the quantum ant colony algorithm can effectively reduce the communication cost and reduce network congestion. This is mainly because the quantum ant colony algorithm fully considers the communication traffic distribution in the network during the search process, thus avoiding the over-concentration of communication paths.
[0068] In terms of network congestion degree, the quantum ant colony algorithm has a lower network congestion rate compared to other algorithms. This is beneficial to improving the performance of the on-chip network and reducing latency.
[0069] To further verify the advantages of the quantum ant colony algorithm in the on-chip network mapping problem, its performance was compared with that of the genetic algorithm and the particle swarm optimization algorithm. Under the same experimental conditions, the quantum ant colony algorithm has obvious advantages in terms of convergence speed, optimization effect, etc. Compared with the genetic algorithm, the quantum ant colony algorithm can find the optimal solution faster during the iteration process; compared with the particle swarm optimization algorithm, the quantum ant colony algorithm has higher solution accuracy.
[0070] Working principle: By performing quantum encoding on the population and quantum edge operation based on the ant colony algorithm, the individual diversity is greatly enhanced, the search efficiency is improved, and the degradation phenomenon of the traditional ant colony algorithm is effectively overcome. The quantum ant scheduling algorithm can effectively allocate grid resources to users dynamically, reduce the task time span, reduce the failure rate of scheduling tasks, improve the performance of the grid system, and achieve the purpose of reducing energy consumption. By dividing the on-chip network into multiple small on-chip networks, the communication path planning problem of the large on-chip network can be decomposed into small-scale path planning problems, thereby reducing the possibility of the quantum ant colony algorithm falling into a local optimal solution and obtaining the optimal solution.
[0071] As mentioned above, it is only the preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention, according to the technical solution and inventive concept of the present invention, makes equivalent substitutions or changes, and should be covered by the protection scope of the present invention.
Claims
1. A network-on-chip mapping method based on ant colony algorithm, characterized in that: The following steps are involved: S1: Determine the communication core diagram and topology diagram, and use a recursive classification method to number each resource node in the IP core and the on-chip network; S2: Divide the on-chip network into multiple small on-chip networks; S3: Allocate the IP cores required for a single application to a small on-chip network to obtain a sub-network through the quantum ant colony algorithm; S4: Select the edge with the largest communication volume from the four edges that make up the sub-network, and then use the quantum ant colony algorithm to design a new sub-network adjacent to the edge with the largest communication volume; S5: Select the optimal IP core for communication based on the number of applications running simultaneously in the sub-network.
2. The on-chip network mapping method based on ant colony algorithm according to claim 1, characterized in that: The steps of the quantum ant colony algorithm are: 1) Initialize the population and assign initial values to the information parameters of each individual ant; 2) Randomly place multiple ants on one of several nodes; 3) Each ant builds a path according to the ant movement strategy until all ants have completed the construction of the solution path; 4) Record the optimal solution generated by this iteration; 5) Use the quantum revolving door to update the pheromone on the path just traveled; 6) Determine whether the optimal solution meets the termination condition of the algorithm; if it meets the maximum number of iterations, terminate; otherwise, go to step 2) to continue.
3. The on-chip network mapping method based on ant colony algorithm according to claim 2, characterized in that: The pheromone is represented by quantum coding in the ant colony algorithm.
4. The on-chip network mapping method based on ant colony algorithm according to claim 2, characterized in that: The concentration of the pheromone is the probability that the ant chooses path 0 or path 1, expressed as |a| 2 and |b| 2 Respectively, where |a| 2 represents the pheromone concentration when the ant chooses path 0, |b| 2 represents the pheromone concentration of the ant choosing path 1.
5. The on-chip network mapping method based on ant colony algorithm according to claim 4, characterized in that: The pheromone concentrations of the different paths satisfy the normalization condition: |a| 2 +|b| 2 =1.
6. The on-chip network mapping method based on ant colony algorithm according to claim 2, characterized in that: The quantum ant colony algorithm step also includes a quantum mutation operation, which selects a number of ants according to the mutation probability, mutates one or more quantum bits of the selected individuals, and reverses the two probability amplitudes of the corresponding quantum bits.
7. The on-chip network mapping method based on ant colony algorithm according to claim 1, characterized in that: In step S1, the K-Means clustering algorithm is used to cluster the resource nodes to obtain a small on-chip network.
8. The on-chip network mapping method based on ant colony algorithm according to claim 1, characterized in that: If the energy consumption of the new subnetwork is higher than that of the atomic network when a single application is running, the subnetwork is abandoned and the atomic network is copied to replace the new subnetwork: if the energy consumption of the new subnetwork is lower than that of the atomic network when a single application is running, the new subnetwork is retained.