Application Mapping Onto Network On Chip Using Genetic Algorithm and Ant Colony Optimisation
Application Mapping Onto Network On Chip Using Genetic Algorithm and Ant Colony Optimisation
Abstract— The concept of Network on Chip (NoC) is emerging II. NOC’S GENERALITIE
appear like a fresh idea in the interconnections of System on Chip The idea of NoC (Network on Chip), influenced by net-
(SoC), providing improved integration of intricate components.
works created for supercomputers, involves a collection of in-
However, as a relatively new technology, it requires substantial
research efforts, especially to streamline and simplify the design terconnected devices residing on a single chip. Communication
phases. The mapping step holds a crucial role in the Network on among these devices is facilitated through the transmission of
Chip design process. Ineffectively mapping application software data across a scalable interconnect network. The advantages
components can significantly hinder the overall performance of offered by NoC include enhanced energy efficiency and reli-
the final system. Therefore, there is a compelling need to improve ability, superior bandwidth scalability compared to traditional
and tools that automate this critical step. The principal objectif of bus architectures, and increased reusability [1].
this study is to create a new technique for mapping applications
onto NoC architecture with the aim of minimizing communication The characteristics defining a NoC include its topology,
costs. This innovative solution utilizes optimization algorithms, outlining how on-chip components are interconnected (e.g., 2D
specifically, the collaborative integration of two algorithms: Ant mesh, torus, ring); the mode of commutation; the implementa-
Colony and Genetic Algorithm. tion of flow control to avert deadlock issues; and the strategies
employed for storage. Figure 1 illustrates an instance of a 3X3
Keywords: Network on Chip, NoC architecture, Application 2D mesh NoC wich contains nine tiles.
Mapping, Genetic Algorithm, Algorithms Ant Colony, Commu-
nication cost.
I. I NTRODUCTION
In the appearance of Network on Chip (NoC) paradigm
stems from the grouth size and complexity of applications
running on System on Chip (SoC). The growing intricacy and
diversity of these applications have made traditional communi-
cation buses between components insufficient. Consequently,
drawing inspiration from computer networks, the concept of
a network on a chip was conceived. Mapping Intellectual Fig. 1. Network on Chip example with 9 Tiles
Property (IP) cores onto the NoC stands out as a pivotal
phase in NoC design, exerting a substantial impact on system The design process of a NoC-based system implies multiple
performance factors such as power consumption, latency, and steps. Initially, the application is translated into a set of com-
load balancing. The process of mapping in NoC design is munication tasks capable of parallel execution. Subsequently,
deemed an NP-hard problem due to the necessity of con- each task is allocated to an available core, selected, and
sidering multiple critical performance metrics for an optimal scheduled. Finally, these cores need to be mapped onto the
mapping algorithm. As a result, various methods have been NoC [2].
proposed in the literature to address this intricate challenge.
This paper focuses on the ultimate step in this process,
Hence, numerous researchers tackle this challenge by em- known as application mapping. It remains a crucial yet un-
ploying heuristic algorithms. In this paper, Genetic Algorithm solved search problem. A mapping algorithm has the potential
and Ant Colony are applied for application mapping. However, to optimize communication energy savings by up to 51.7%,
the primary objective is to synergize Ant Colony and GA to as compared to an ad hoc implementation [3]. Finding an
enhance their collective effectiveness. optimal mapping solution is imperative for achieving high
performance.
The paper is structured as follows: Section 2 provides an
overview of NoC, followed by Section 3, which delves into For instance, when mapping m tasks onto an NoC with
related work. Section 4 outlines prevalent mapping issues, n cores, where m is less than or equal to n, the number of
while our proposed method is detailed in Sections 5. The possible solutions can be as high as n!/(n − m)!. Application
simulation and results are presented in Section 6, and our work mapping is categorized as an NP-hard combinatorial opti-
concludes with a final summary in Section 7. mization problem. Our interest lies in discovering suboptimal
Authorized licensed use limited to: UNIV OF ENGINEERING AND TECHNOLOGY TAXILA. Downloaded on December 26,2024 at 10:15:35 UTC from IEEE Xplore. Restrictions apply.
solutions, often achieved through the utilization of heuristic collaboration between two methods can yield better results in
algorithms. mapping. The collaboration between PSO and GA is utilized
to improve the obtained results is used in [17]. Moreover, the
III. R ELATED WORK hybridization of genetic algorithms and artificial bee colonies
is discussed in [18] with remarkable outcomes compared to
Various approaches have been suggested for NoC mapping, genetics and ABC.
with a predominant focus on the topology of a 2D mesh.
The article highlights the most frequently referenced single-
objective approaches, classifying them into three main cat- IV. APLICATION MAPPING PROBLEM
egories: those employing exact methods, heuristic methods,
and metaheuristic methods. The exact method demanding The mapping problem involves two main components: the
substantial computational time, these strategies may rely on NoC architecture and the application. The NoC architecture
Integer Linear Programming (ILP) as demonstrated in [4] or is structured according to a specific topology. In this work,
employ the branch-and-bound search method as outlined in we employ the 2D topology as illustrated in Fig 2. The
[5]. application consists of a collection of concurrent tasks, and
the purpose of mapping is to allocate these tasks to cores
Within the second category employing a heuristic approach, on the NoC. While mapping can have various objectives,
the N M AP algorithm [6] serves as a common choice for our paper particularly emphasizes minimizing communication
tackling the application mapping issue. The algorithm chooses cost. An ideal mapping solution is one that attains the most
a core from an application and iteratively assigns it to a advantageous arrangement while mitigating communication
tile until all cores are accommodated within the mesh. The cost.
initial solutions undergo refinement through an iterative en-
hancement mechanism. Nevertheless, solutions obtained from In this context, a solution is represented by a table where
this improvement process may be limited by the initial set of the index i corresponds to task’s number, and the index’s
solutions. contents indicate the tile’s number when the task is mapped,
as demonstrated in table I.
BM AP [7] stands out as a binomial mapping algorithm
that employs iterative bidirectional merging, relying on the TABLE I. R EPRESENTATION OF A MAPPING SOLUTION
traffic loads of cores for solution generation. Tasks number 1 2 3 4 5 6 7 8 9
Mapping place 8 3 2 1 9 5 6 7 4
In generating new solutions, CastN et [8] utilizes the
symmetrical characteristics of a NoC 2D to choose the starting
tiles. Finding the best solution for each core relies on the
number of unoccupied neighboring tiles for each tile. In
the Chmap algorithm [9], the prioritization and sequence
of core mapping are determined by taking into account the
communication needs of the core and the details within the
spanning tree. Following this, cores are allocated based on
this established priority.
Onyx [10] specifies four maneuvers that generate a
diamond-shaped trajectory, utilizing this path to allocate pri-
orities to the tiles. In contrast to alternative algorithms, Onyx
demonstrates superior efficiency in communication cost.
In the Spiral approach [11], the assignment begins by
positioning the task with the utmost priority at the center,
followed by the sequential mapping of other tasks to create
a spiral pathway.
Finaly, approaches employing meta-heuristic algorithms
have gained popularity for NP-hard problems, seeking nearly
optimal solutions. In [12], CGM AP utilizes a genetic algo-
rithm with a chaotic mapping operator replacing the random Fig. 2. Application Mapping Problem
process. GBM AP [13] presents an evolutionary algorithm
designed for mapping cores onto the NoC. Additionally, there
are approaches leveraging the behavior of swarm intelligence,
as seen in [14]. This involves a discrete mapping technique A. Network on Chip Model
based on multiple PSOs (Particle Swarm Optimization), aiming The problem is formulated using two definitions:
to optimize performance through deterministic initial solutions.
In [15], a mapping algorithm based on Ant Colony Optimiza- 1) Definition 1: The core graph is a directed graph
tion (ACO) has been introduced for the application mapping G(V, E), where each vertex vi corresponds to a core, and a
onto NoC. The primary goal is to minimize bandwidth re- directed edge ei, j depicts the connection between vi and vj .
quirements. In [16] Cat Swarm Optimization is also applied to The weight of ei,j signifies the communication between these
map IPs onto 2D NoC, yielding highly interesting results. The two vertex.
Authorized licensed use limited to: UNIV OF ENGINEERING AND TECHNOLOGY TAXILA. Downloaded on December 26,2024 at 10:15:35 UTC from IEEE Xplore. Restrictions apply.
2) Definition 2: The NOC architecture is represented by Each member of the population is termed a chromosome,
a graph A(T, L), where each vertex ti signifies a tile in the with each chromosome representing a solution. GA starts
NOC architecture, and each edge li, j represents a physical by randomly selecting a set of feasible solutions from the
link from ti to tj . population[21].
3) Definition 3: We establish the mapping function, which After generating the initial population, a new population is
associates each vertex vi in the core graph with a correspond- created through genetic operations:
ing vertex tj in the NOC architecture, represented by:
1) Selection:This entails selecting individuals for involve-
map : V → T map(vi ) = tj , ∀vi ∈ V ∃tj ∈ T ment in the reproduction of the forthcoming population. The
selection function can be arbitrary or grounded in a probabilis-
Within the core graph, individual edges are considered
tic approach (such as roulette or tournament). An individual is
unique data flows, identified as ck . This designation repre-
selected to participate in the reproduction stage, contributing
sents the bandwidth requirement, denoted by value(ck ). The
to the establishment of the new population [21].
complete collection of data is symbolized as C:
2) Crossover: This process involves disassembling two
k k distinct outcomes and indiscriminately merging their elements
C = c : value(c ) = commi,j (1) to generate a unified result. A progeny result is formed by
With k = 1..|E| and commi,j ∈ E. combining elements from both parental outcomes. Figure 3
illustrate the varieties of crossovers employed [22].
To calculate the communication volume between vj and
vi , it is crucial to count the hops from tilej to tilei . In a 2D
Network-on-Chip (NoC), we utilize the XY routing algorithm,
and the count of hops is ascertained through the following
function:
The positions of tiles j and i in a 2D NoC are denoted as Positions for the crossing points are chosen randomly
(Xj , Yj ) and (Xi , Yi ) respectively. along the chromosome’s length. Following the Crossover
process, the population is enriched with superior individuals.
B. Objective function
The principal aim of this work is to diminish the com- 3) Mutation: It introduces stochastic perturbations to a
munication cost between two tasks allocated on the NoC by potential solution, mimicking the reintroduction of lost ge-
minimizing the number of hops for each communication within netic elements. It encompasses the random inversion of a bit
the application. The computation of communication cost is position in the chromosome. Selecting a gene at random and
accomplished through the following equation: substituting it with another value chosen arbitrarily. Figure 4
exemplifies the varieties of mutations employed [22].
|E|
X
commcost = value(C k )∗nbhops(source(C k ), distination(C k ))
k=1
(3)
k
Here, distination(C ) denotes the destination,
source(C k ) indicates the source of a communication
C k , and value(C k ) represents the data volume associated Fig. 4. Mutation operation
with communication C k .
To confirm the algorithm’s end, the majority of optimiza-
V. G ENETIC ALGORITHM AND A NT COLONY tion algorithms halt genetic operations based on a maximum
number of iterations and generations.
A. Genetic Algorithm
Algorithm 1 delineates the primary stages of the genetic
Genetic algorithms, introduced by Holland in 1975[19],
algorithm.
represent a class of optimization algorithms that revolutionize
problem-solving techniques. GA operates within a research
space known as the population[20]. B. Ant Colony Optimisation
Initially, the population is randomly generated, each mem- Ant Colony Optimization (ACO), is a class of meta-
ber representing an admissible solution. The algorithm evalu- heuristic search algorithms, applied to solving NP Hard prob-
ates individual quality using a function called ”fitness,” which lems [23]. The ant algorithms are biologically inspired by the
distinguishes the best solutions. In our case, the fitness function behavior of ant colonies, and in particular their search for food
is based on the objective function3. [24].
Authorized licensed use limited to: UNIV OF ENGINEERING AND TECHNOLOGY TAXILA. Downloaded on December 26,2024 at 10:15:35 UTC from IEEE Xplore. Restrictions apply.
Algorithm 1 The primary steps of Genetic Algorithm C. Gant Algorithm
Set the initial solutions of the population In order to improve the result obtained,the two metaheuris-
Evaluate and Initialize best solution tics presented above can be collaborative, which leads to a
t := 0 hybridization, this type of hybridization and of high level [26],
while t < max iteration do that is to say the result obtained by the first method will be
(a) Selet() injected into the second method, in this article we start with
(b) Cross() genetics then the ant colonies which is show in the following
(c) Mut() algorithm
t := t + 1
end while
Algorithm 3 The main steps of GANT
return the best solution
Initialize the individuals of the population
Evaluate and Initialize best solution
iteration := 0
The main idea is that ants can communicate with each while t < max iteration do
other through indirect means by altering the concentration of (a) Select()
chemicals called pheromones in their environment. (b) Cross()
(c) Mut()
It is thanks to this indirect communication via pheromones t := t + 1
that the ants manage to find the shortest paths between their end while
nid and food sources because they are able to return to the initialize pheromone according to best of GA;
food source before the ants take the long path. while Not termination condition do
FOR each ant do
This ability of real ant colonies has inspired the defini-
(a) construct ant solutions;
tion of artificial ant colonies capable of finding approximate
(b) local search;
solutions to difficult combinatorial optimization problems.
(c) update pheromone trails;
The central ideas of ACO are presented in the following End For
points: : end while
The problem representation undergoes modification to en- Fig. 5. Benchmarks employed (a):VOPD. Video Object Plane Decoder
able the exploitation of previously successful solutions in the benchmark (b): MPEG4 Moving Picture Experts Group benchmark
creation of new and, ideally, improved ones.
Before unveiling the results, let’s outline the parameters
Algorithm 2 The main steps of ACO employed in our experiment. The NoC utilized in these exper-
initialize parameters and pheromone trails; iments is a 4 × 4 configuration.
while Not termination condition do Following numerous testing iterations in pursuit of optimal
For each ant do results, we have implemented the parameters detailed in the
(a) construct ant’s solutions; table below.
(b) local search;
(c) update pheromone trails; The result obtained regarding communication cost fitnes
End For are presented in tableIII. The visual representations in Figure
end while 6 enable a comparative analysis of the mapping outcomes
achieved by the GA, Ant, and Gant algorithms, specifically
Authorized licensed use limited to: UNIV OF ENGINEERING AND TECHNOLOGY TAXILA. Downloaded on December 26,2024 at 10:15:35 UTC from IEEE Xplore. Restrictions apply.
TABLE II. PARAMETRE USED IN GA, A NT AND G ANT ALGORITHMS MPEG4
B t
O AP
C YX
N AP
C AP
ILP
C P
et
an
tn
MPEG4 3568 3900 3567
M
M
M
N
as
G
H
G
in relation to the two benchmarks employed during the exper- Fig. 7. Gant mapping with alternative approaches in MPEG4
imentation.
To affirm the validity of the proposed methodology, we VOPD
compare the optimal outcome obtained with several other 4,300
approaches, as presented in table IV. 4,300
4,265
4,242
4,217
TABLE IV. C OMPARISON RESULT WITH OTHER APPROACH
4,200 4,167
Results VOPD MPEG4 4,135
4,125 4,119
Gant 4125 3567
GBMAP 4217 3572 4,100
ONYX 4242 3612
B t
O AP
C YX
N AP
C AP
ILP
C P
et
an
CGMAP 4300 3600
tn
G
M
M
M
N
as
NMAP 4265 3852
H
G
CHMAP 4167 3852
ILP 4119 3567
Castnet 4135 3852 Fig. 8. Gant mapping with alternative approaches in VOPD
Authorized licensed use limited to: UNIV OF ENGINEERING AND TECHNOLOGY TAXILA. Downloaded on December 26,2024 at 10:15:35 UTC from IEEE Xplore. Restrictions apply.
[11] MEHRAN, Armin, SAEIDI, Samira, KHADEMZADEH, Ahmad, et
al. Spiral: A heuristic mapping algorithm for network on chip. IEICE
Electronics Express, 2007, vol. 4, no 15, p. 478-484.
[12] FahimeMoein-darbari, Ahmad Khademzade and GolnarGharooni-fard,
CGMAP: a new approach to Network-on-Chip mapping problem||,
IEICE Electron. Express, Vol. 6, No. 1, pp.27-34, (2009)
[13] TAVANPOUR, Misagh, KHADEMZADEH, Ahmad, POURKIANI, So-
mayyeh, et al. GBMAP: an evolutionary approach to mapping cores
onto a mesh-based NoC architecture. Journal of Communication and
Computer, 2010, vol. 7, no 3, p. 1-7.
[14] Sahu PK, Shah T, Manna K, Chattopadhyay S (2014) Application
mapping onto mesh based network on chip using discrete particle
swarm optimization. IEEE Trans Very Large Scale Integr (VLSI) Syst
22(2):300–312
[15] J. Wang, Y. Li, S. Chai, Q. Peng, “Bandwidth-Aware Application Map-
ping for NoC-Based MPSoCs,” Journal of Computational Information
Systems, 7:1, pp. 152-159, 2011.
[16] Bougherara, Maamar, and Yeddou imene. ”Application Mapping onto
Network on Chip Using Cat Swarm Optimization.” International Sym-
posium on Intelligent Informatics. Singapore: Springer Nature Singa-
pore, 2022.
[17] Bougherara, Maamar, Amara Rafik, and Rebiha Kemcha. ”Application
Mapping Onto Network on Chip Using Particul Swarm Optimisation
With Genetic Algorithm “GAPSO”.” 2022 International Conference on
Computer and Applications (ICCA). IEEE, 2022.
[18] Bougherara, Maamar, and Messaoudi Djihad. ”Genetic Artificial Bee
Colony for Mapping onto Network on Chip “GABC”.” Congress on
Intelligent Systems. Singapore: Springer Nature Singapore, 2022.
[19] Nayyar, A., Le, D. N., & Nguyen, N. G. (Eds.). (2018). Advances in
swarm intelligence for optimizing problems in computer science. CRC
press.
[20] Nayyar, A., & Nguyen, N. G. (2018). Introduction to swarm intelli-
gence. In Advances in swarm intelligence for optimizing problems in
computer science (pp. 53-78). Chapman and Hall/CRC.
[21] Zhang, L. B., Zhou, C. G., Liu, X. H., Ma, Z. Q., Ma, M. and Liang, Y.
C. Solving multi objective optimization problems using particle swarm
optimization. In Congress on Evolutionary Computation, Vol. 3, pages
2400–2405, 2003.
[22] ABDOUN, Otman et ABOUCHABAKA, Jaafar. A comparative study
of adaptive crossover operators for genetic algorithms to resolve the
traveling salesman problem. arXiv preprint arXiv:1203.3097, 2012.
[23] DORIGO, Marco, BIRATTARI, Mauro, et STUTZLE, Thomas. Ant
colony optimization. IEEE computational intelligence magazine, 2006,
vol. 1, no 4, p. 28-39.
[24] DORIGO, Marco et DI CARO, Gianni. Ant colony optimization: a new
meta-heuristic. In : Proceedings of the 1999 congress on evolutionary
computation-CEC99 (Cat. No. 99TH8406). IEEE, 1999. p. 1470-1477.
[25] DORIGO, Marco et BLUM, Christian. Ant colony optimization theory:
A survey. Theoretical computer science, 2005, vol. 344, no 2-3, p. 243-
278.
[26] El-Ghazali Talbi. A Taxonomy of Hybrid Metaheuristics . Journal of
Heuristics, 2002 , Vol. 8,no 5, p 541.
Authorized licensed use limited to: UNIV OF ENGINEERING AND TECHNOLOGY TAXILA. Downloaded on December 26,2024 at 10:15:35 UTC from IEEE Xplore. Restrictions apply.