Research paper
A general approach to solving hardware and software partitioning problem based on evolutionary algorithms

https://doi.org/10.1016/j.advengsoft.2021.102998Get rights and content

Highlights

  • A general algorithm framework for hardware software partitioning problem is proposed based on evolutionary algorithms.

  • An effective method to deal with the infeasible solution of hardware software partitioning problem is proposed

  • The performances of genetic algorithm (GA), binary particle swarm optimization (BPSO), binary differential evolution algorithm with hybrid encoding (HBDE), and group theory based optimization algorithm (GTOA) for solving hardware software partiti on ing problem are compared.

  • According to the comparison results, it is pointed out that GTOA and BPSO are more suitable for solving hardware software partitioning problem than GA and HBDE

Abstract

Hardware/software partitioning (HW/SW) is a significant problem in hardware-software co-design, and it is also an NP-hard problem. In order to solve the HW/SW quickly and effectively by evolutionary algorithms, the HW/SW is firstly regarded as a variant of knapsack problem. Based on a new greedy strategy, a greedy repair and optimization algorithm GROM is proposed to eliminate the infeasible solutions. Subsequently, a general algorithm framework based on discrete evolutionary algorithm for HW/SW problem is proposed. On the basis of the above algorithm framework, genetic algorithm (GA), binary particle swarm optimization (BPSO), binary differential evolution algorithm with hybrid encoding (HBDE) and group theory-based optimization algorithm (GTOA) are used to solve large-scale HW/SW instances. The feasibility and effectiveness of the algorithm framework proposed in the paper are verified by comparing the good and bad of the calculation results of above algorithms, and pointed out that the performance of GTOA and BPSO is better than that of HBDE and GA, they are more suitable for solving large-scale HW/SW problem.

Introduction

With the extensive application of embedded systems, hardware and software co-design has become a significant research problem. The hardware is fast to execute, but the cost is high, and it takes more resources. Although the software is slow to execute, the cost is low, and the operation is relatively flexible. According to the requirements, the components in the embedded system are reasonably partitioned software and hardware for execution, which will greatly improve the performance of the entire system. Therefore, hardware/software partitioning (HW/SW)[1] has become a vital problem in hardware-software collaborative design.

Due to the fact that the HW/SW problem is an NP-hard problem [2], when its scale is large, the running speed of determinate algorithms [3], [4], [5], [6]is often very slow. Hence, the determinate algorithms are difficult to satisfy the requirements of the fast solution in practical applications. In recent years, solving large-scale the HW/SW problems based on heuristic algorithms has gradually become a research hotspot, such as Arato et al. [7] proposed a two-dimensional search heuristic algorithm for solving the HW/SW problems. This heuristic makes use of problem-specific knowledge to find high-quality solutions rapidly. Wu et al. [8] regarded the HW/SW problem as an extended 0-1 knapsack problem with communication costs, and proposed a 1D Search Algorithms to solve the problem. Comparing with the method in [7], their approach not only improves the performance of the algorithm, but also reduces the time complexity. Due to the method of Wu in [8] lacks a theory basis, Quan et al. [9] perfected their method. Wang et al. [10] proposed the HEUR algorithm and used it to give a new method for solving the HW/SW problem, in which the communication cost is firstly ignored, the HW/SW problem is transformed a standard 0-1 knapsack problem, whose solution is obtained as a potential solution to the original problem. Then, according to the communication cost, the potential solution is adjusted by tabu search, so as to obtain a feasible solution that satisfies the constraint conditions of HW/SW. Although the HEUR algorithm has greatly improved the quality of the solution than the 1D Search Algorithms [8], tabu search is also very time-consuming in further optimizing the solution when solving large-scale the HW/SW instances. Chen et al. [11] proposed the NodeRank algorithm on the basis of the idea of the Page Rank algorithm. In some cases, the quality of the solutions obtained by NodeRank is better than HEUR. Although many achievements have been made in solving HW/SW problem based on heuristic algorithm, there is still a lack of a fast and effective method to solve it because of its difficulty. At the same time, there is no research report on the general algorithm framework using evolutionary algorithm to solve it quickly. To this end, this paper studies how to use evolutionary algorithms (EAs) [12], [13], [14] to solve the HW/SW problem. Based on an efficient algorithm for handling infeasible solutions of HW/SW, a general algorithm framework for solving HW/SW by using EAs is proposed. On the basis of the framework, GA, BPSO, HBDE, and GTOA were used to solve HW/SW, and the performance of the four algorithms was compared.

Evolutionary algorithm is a kind of heuristic swarm intelligence algorithms, which do not need to calculate derivatives and gradients, do not require the continuity of the objective function, and have inherent implicit parallelism and strong global optimization capabilities [15]. It has been successfully used to solve scheduling problems [16], multi-dimensional knapsack problem [17], set covering problem [18], feature selection problem[19], traveling salesman problem [20], [21] and other combinatorial optimization problems. EAs are generally divided into two categories: one is the discrete evolutionary algorithm that can be directly used to solve combinatorial optimization problems, such as genetic algorithm (GA) [22], ant colony algorithm (ACO) [23], [24], group theory-based optimization algorithms (GTOA) [25], etc.; the other is the continuous evolutionary algorithm, which is suitable for solving numerical optimization problems and cannot be directly used to solve combinatorial optimization problems, such as particle swarm optimization (PSO) [26], differential evolution (DE) [12], [27], grey wolf optimizer (GWO) [28], bat algorithm (BA)[29], [30], multi-heuristic based search method (MHSM)[31] and so on. In order to use continuous evolutionary algorithms to solve binary optimization problems, scholars have proposed many discrete versions of continuous evolutionary algorithms, such as a discrete binary version of the particle swarm optimization (BPSO) [32], binary differential evolution algorithm with hybrid encoding (HBDE) [33], binary artificial algae algorithm (BAAA) [34], binary dragonfly algorithm (BDA) [35], binary-weighted superposition attraction algorithm (BWSA) [36], binary grey wolf optimizer (BGWO) [37], and novel binary artificial bee colony algorithm (BABC) [38], etc. Obviously, the continuous evolutionary algorithm has been successfully used to solve various combinatorial optimization problems, so it is feasible to use it to solve HW / SW. Therefore, in order to give an effective method for solving HW/SW based on EAs, this paper draws lessons from the idea of literature [8] to transform HW/SW into an extended 0/1 knapsack problem with communication cost, and then proposes a new method to solve HW/SW based on EAs.

The remainder of the paper is organized as follows. Section 2 introduces the definition and model of HW/SW. In Section 3, a repair and optimization algorithm by a new greedy strategy is firstly proposed to deal with the infeasible solutions. Then, a general algorithm framework of solving HW/SW based on EAs is proposed. Subsequently, the principles and pseudo-code of GA, BPSO, HBDE, and GTOA are simply described in Section 4. In Section 5, the generation rules and parameter values of different scales of HW/SW instances are introduced firstly. Secondly, the reasonable parameters of each algorithm are given. Finally, comparing and analysing the calculation results that GA, BPSO, HBDE and GTOA for solving the 6 cases of 16 HW/SW instances. Section 6 summarizes the full text and looks forward to future research work.

Section snippets

Definition and mathematical model of HW/SW

The definition of HW/SW is generally described as follows. Let G=(V,E) be an undirected graph, where V denotes the node set and E denotes the edge set. s(vi) and h(vi) (or simply si and hi) represent the software cost and hardware cost of node vi, respectively, while the weight c(vi,vj) (or simply cij) of edge (vi,vj) represents the communication cost between nodes viand vj if they are in different partition. P is called a hardware/software partition if it is a bipartition of V:P={VH,VS}, where

General method of solving HW/SW by EAs

In this section, we will study how to use EAs to solve the HW/SW efficiently, and finally give a general algorithm framework for solving HW/SW by EAs. Because HW/SW is a constrained optimization problem, the infeasible solutions will inevitably be generated when using EAs to solve it. For this reason, We treat HW / SW as a special knapsack problem. According to the method of using EAs to deal with the infeasible solutions of knapsack problem, a repair and optimization algorithm, named GROM, for

Four evolutionary algorithms

In order to illustrate the versatility of EA-HW/SW and the effectiveness of solving HW/SW problem based on EAs, this paper will use four evolutionary algorithms to solve the HW/SW problems according to the EA-HW/SW framework. Because GA is currently a well-known and important method of evolutionary computing research, and has been used to solve many optimization problems in many fields, we will use GA to solve HW/SW problem. BPSO is a discrete version of PSO, which is suitable for binary

Computational experiments

In this Section, for the convenience of discussion, the algorithm of solving HW/SW by GA, BPSO, HBDE, and GTOA based on the algorithm framework EA-HW/SW is still called GA, BPSO, HBDE, and GTOA, respectively.

All the calculations in this paper are executed on Lenovo notebook configured with Intel (R) Core (TM) i5-4210 CPU-1.70GHz and 8GB RAM. The operating system is Microsoft Windows 10. All algorithms are implemented by using VC++, and the compilation environment is Code:Blocks 17.12. All

Conclusions and further works

In this paper, a general approach of using EAs to solve HW/SW is proposed. Firstly, a repair and optimization method for the infeasible solution of HW/SW based on greedy strategy is given. Secondly, a general framework for solving the HW/SW using evolutionary algorithms is proposed. Finally, the performance of GA, BPSO, HBDE and GTOA for solving 16 HW/SW instances are compared. The results show that both BPSO and GTOA are the best algorithm for solving HW/SW problem, while HBDE and GA have poor

CRediT authorship contribution statement

Qinglei Zhai: Formal analysis, Investigation, Writing - original draft. Yichao He: Formal analysis, Methodology, Writing - review & editing. Gaige Wang: Conceptualization, Investigation, Validation. Xiang Hao: Visualization, Data curation.

Declaration of Competing Interest

The authors declared that they have no conflicts of interest to this work.

Acknowledgments

We thank Editor-in-Chief and anonymous reviewers whose valuable comments and suggestions help us significantly improve this article. The first author and corresponding authors contributed equally the same to this article which was supported by Natural Science Foundation of Hebei Province (F2020403013), and Funded by Science and Technology Project of Hebei Education Department (ZD2021016).

References (53)

  • N. Ralf et al.

    An algorithm for hardware/software partitioning using mixed integer linear programming

    Design Automation for Embedded Systems

    (1997)
  • W. Markus

    Integer programming for partitioning in software oriented codesign

    (1995)
  • K.S. Chatha et al.

    Hardware-software partitioning and pipelined scheduling of transformative applications

    IEEE Transactions on Very Large Scale Integration (VLSI) Systems

    (2002)
  • Arató P., Mann Z.á., Orbán A.. Algorithmic aspects of hardware/software partitioning. Acm Transactions on Design...
  • Wu J., Srikanthan T., Chen G.. Algorithmic aspects of hardware/software partitioning: 1d search algorithms. IEEE...
  • H. Quan et al.

    Comments on “algorithmic aspectsof hardware/software partitioning:1d search algorithms”

    IEEE Transactions on Computers

    (2014)
  • J. Wu et al.

    Efficient heuristic and tabu search for hardware/software partitioning

    Journal of Supercomputing

    (2013)
  • Z. Chen et al.

    NodeRank:An efficient algorithm for hardware/software partitioning

    Chinese Journal of Computers

    (2013)
  • R. Storn et al.

    Differential evolution – a simple and efficient heuristic for global optimization over continuous spaces

    Journal of Global Optimization

    (1997)
  • K. Qin et al.

    Differential evolution algorithm with strategy adaptation for global numerical optimization

    Evolutionary Computation, IEEE Transactions on

    (2009)
  • Y. He et al.

    Design and applications of discrete evolutionary algorithm based on encoding transformation

    Journal of Software

    (2018)
  • Y. Yu

    Theoretical analysis and learning algorithms

    (2011)
  • M.A. El Majdouli et al.

    Discrete fireworks algorithm for single machine scheduling problems

    International Journal of Applied Metaheuristic Computing

    (2016)
  • L. Wang et al.

    A hybrid distribution estimation algorithm for solving multidimensional knapsack problem

    Control and Decision

    (2011)
  • H. Li et al.

    A dividing-based many-objectives evolutionary algorithm for large-scale feature selection

    Soft Computing

    (2020)
  • Z.H. Cai et al.

    An improved evolutionary algorithm for the traveling salesman problem

    Chinese Journal of Computers

    (2005)
  • Cited by (13)

    • TSAR-ILP: Tile-Based, Synchronization-AwaRe ILP Allocating Heterogeneous Platforms for Streaming Applications

      2023, IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems
    View all citing articles on Scopus

    Fully documented templates are available in the elsarticle package on CTAN.

    View full text