Mathematical Problems in Engineering

Volume 2014 (2014), Article ID 103059, 15 pages

http://dx.doi.org/10.1155/2014/103059

Research Article

A Tabu Search-Based Memetic Algorithm for Hardware/Software Partitioning

Geng Lin,¹ Wenxing Zhu,² and M. Montaz Ali3,4

¹Department of Mathematics, Minjiang University, Fuzhou 350108, China

²Center for Discrete Mathematics and Theoretical Computer Science, Fuzhou University, Fuzhou 350108, China

³School of Computational and Applied Mathematics, Faculty of Science, University of the Witwatersrand, (Wits), Johannesburg 2050, South Africa

⁴TCSE, Faculty of Engineering and Build Environment, University of the Witwatersrand, (Wits), Johannesburg 2050, South Africa

Received 24 March 2014; Revised 16 June 2014; Accepted 16 June 2014; Published 13 July 2014

Academic Editor: Jiaji Wu

Copyright © 2014 Geng Lin et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

Abstract.

Hardware/software (HW/SW) partitioning is to determine which components of a system are implemented on hardware and which ones on software. It is one of the most important steps in the design of embedded systems. The HW/SW partitioning problem is an NP-hard constrained binary optimization problem. In this paper, we propose a tabu search-based memetic algorithm to solve the HW/SW partitioning problem. First, we convert the constrained binary HW/SW problem into an unconstrained binary problem using an adaptive penalty function that has no parameters in it. A memetic algorithm is then suggested for solving this unconstrained problem. The algorithm uses a tabu search as its local search procedure. This tabu search has a special feature with respect to solution generation, and it uses a feedback mechanism for updating the tabu tenure. In addition, the algorithm integrates a path relinking procedure for exploitation of newly found solutions. Computational results are presented using a number of test instances from the literature. The algorithm proves its robustness when its results are compared with those of two other algorithms. The effectiveness of the proposed parameter-free adaptive penalty function is also shown.

1. Introduction

The embedded systems have become omnipresent in a wide variety of applications and typically consist of application specific hardware components and programmable components. With the growing complexity of embedded systems, hardware/software codesign has become an effective way of improving design quality, in which the HW/SW partitioning is the most critical step.

HW/SW partitioning decides which tasks of an embedded system should be implemented in hardware and which ones should be in software. A task implemented with a hardware module is faster but more expensive, while a task implemented with a software module is slower but cheaper. For this reason, the main target of HW/SW partitioning is to balance all the tasks to optimize some objectives of the system under some constraints [1].

In recent years, there has been an increasing interest in the study of the HW/SW partitioning problem. Several exact approaches [2–5] to the problem have been developed. However, since most of the exact formulations of the HW/SW partitioning problem are NP-hard [6], the practical usefulness of these approaches is limited to fairly small problem instances only. For larger instances, a number of heuristic algorithms, both traditional and general purpose, have been proposed.

There are two traditional families of heuristics: the software-oriented heuristic and the hardware-oriented heuristic. The software-oriented heuristic starts with a complete software solution and parts of the system are migrated to hardware until all constraints are satisfied. On the other hand, the hardware-oriented heuristic starts with a complete hardware solution and moves parts of the system to software until a constraint is violated.

Up to now, many general-purpose heuristics or metaheuristics have also been applied to solve the HW/SW partitioning problem. These include simulated annealing [7–9], genetic algorithm [10–12], tabu search [8, 13–15], artificial immune [16], and the Kernighan-Lin heuristic [17, 18]. There are also some other methods for solving the problem; see [19] for details.

It must be mentioned that the HW/SW partitioning problem is to minimize a cost while satisfying some design constraints. In fact, the problem is a discrete constrained optimization problem, and the optimal solutions usually lie on the boundary of the feasible region. Hence, it is necessary to develop effective techniques in handling the constraints.

This paper presents a tabu search-based memetic algorithm (TSMA) for solving the HW/SW partitioning problem. The TSMA uses an adaptive penalty function to convert the original problem into an equivalent unconstrained integer programming problem; both problems have the same discrete global minimizers. The TSMA is then applied to unconstrained integer programming problem in order to solve the original problem. The TSMA integrates a tabu search procedure, a path relinking procedure, and a population updating strategy. These strategies achieve a balance between intensification and diversification of the search process. The algorithm has been tested on four benchmark test instances in the literature. Experimental results and comparisons show that the proposed algorithm is effective and robust.

The remaining part of this paper is organized as follows. Section 2 gives the system model and problem formulation. Section 3 presents the parameter-free adaptive penalty function used in converting the original problem into the unconstrained problem. Section 3 also presents some theoretical properties of the resulting unconstrained problem. In Section 4, a full description of TSMA is presented. Experimental results on four benchmark test instances are presented in Section 5. Final remarks are given in Section 6.

2. Hardware/Software Partitioning Model and Formulation

The HW/SW partitioning model discussed in this paper is similar to that presented in [16]. In order to make the paper self-contained, this section briefly reviews the description of the HW/SW partitioning model considered in [16].

2.1. Function Description

The main function of the system is usually described by a high-level programming language, and then the function will be mapped into a control-data flow graph (CDFG). The CDFG is composed of nodes and arcs [20, 21]. Generally, the CDFG is a directed acyclic graph (DAG). In the DAG, the nodes are determined by the model granularity, that is, the semantic of a node. A node can represent a short sequence of instructions, a basic block, a function, or a procedure [12]. The arcs between nodes denote their relationship. Each node in DAG can receive data from its previous nodes and can send data to its next nodes.

2.2. Binary Integer Programming Formulation

In a directed acyclic graph (DAG) with node set and arc set , every node is labeled with several attributes. The attributes for a node are defined as follows.

(i) denotes the cost of in software implementation.(ii) denotes the executing time of in software implementation.(iii) denotes the cost of in hardware implementation.(iv) denotes the executing time of in hardware implementation.(v) is an array, which denotes the set of incoming nodes of and stores the set of corresponding communication times.(vi) is an array, which denotes the set of outgoing nodes of and stores the set of corresponding communication times.(vii) denotes the number of times that node is executed.

Figure 1 [16] shows the partition model used in this paper, where denote the hardware nodes implemented by application specific integrated circuit (ASIC) or field programmable gate array (FPGA). The software nodes are executed in a programmable processor (CPU). All the nodes exchange data through a shared bus, and they share the common memory to store the interim data. All the hardware nodes without dependency can be executed concurrently [16].

Figure 1: The partition model discussed in this paper [16].

After all nodes are determined to be implemented by hardware or software, all the nodes are scheduled. The total executing time can be evaluated by the list schedule algorithm [11, 22], and the cost of the design can be evaluated. The detailed steps of the list schedule algorithm are shown in Algorithm 1.

(1) Initialization. Set two attributes for every node, start and finish, which are used for recording the node’s

     starting time and finishing time. Choose all nodes without data dependency from the node set and put them

     into a ready queue. Choose one software node from the queue to be executed by CPU, and all hardware nodes

     to be executed at the same time. Set 0 as the values of the start attributes for the running nodes. Set the sum

     of the executing time and the communication time as the values of the finish attributes. If there is a software

     node being executed by CPU, set CPU = BUSY.

(2) repeat

(3)   Select the node with the minimal time from the ready queue, mark it as .

(4)   Remove node from the queue. If is a software node, set .

(5)   If , choose one software node from the queue to execute and set .

        Set , , where denotes the communication

        time of node with other nodes.

(6) Choose all hardware nodes to execute concurrently. Set their and attributes as in Line (5).

(7) until The ready queue is empty

(8) return Choose the maximal time of all the nodes as the system executing time, denoted as .

Algorithm 1: List schedule algorithm [16, 22].

In this paper, the objective is to minimize the total cost of the system under the time constraint. Since the cost of software is usually negligible, the HW/SW partitioning problem can be described as follows [11]:

where means that node is implemented by hardware, denotes the total executing time, and TimeReq denotes the required time which is given in advance by the designer.

Let denote a solution of the problem . indicates that node is implemented by hardware (software). Then problem can be formulated as the following constrained binary programming problem:

where denotes the total executing time of which can be evaluated by the list schedule algorithm, that is, Algorithm 1. We suppose without loss of generality that , , , , , , , and TimeReq are nonnegative integers.

3. The Adaptive Penalty Function

In this section, we introduce the basic form of the penalty function for constrained optimization problem and present an adaptive penalty function to convert the problem into an unconstrained binary optimization problem.

3.1. The Basic Penalty Function

A variety of penalty functions have been proposed to deal with constraints. Of them, the exact penalty function and the quadratic penalty function are most basic and widely used [23–25]. Using these penalty functions problem can be converted into the following unconstrained problem:

where , is the penalty parameter, and . For (resp., ), the optimization method that uses (1) is known as the exact (the quadratic) penalty function method.

Let , and denote by the feasible solution space of ; that is, . We construct the following auxiliary problem:

where , is the penalty parameter, and .

3.2. The Proposed Adaptive Penalty Function

It is a well-known fact that the penalty parameter in (1) is sensitive and problem-dependent. Hence, it is difficult to choose a value for [26] that can be used for a wide range of optimization problems. Therefore, a number of authors [27–31] have suggested parameter-free penalty functions to do away with the sensitive parameter . Following the same reasonings, we propose the following param0065ter-free adaptive penalty function:

where

and is an upper bound on the global minimum value of problem . Since the cost of the system is smaller than , we can initialize . The value of needs to be updated by the current best known objective function value at a feasible solution.

Based on this adaptive penalty function, we construct the following problem:

Definition 1. A solution is called a discrete local minimizer of problem , if , for all , where is a neighborhood of . Furthermore, if , for all , then is called a discrete global minimizer of problem .

Theorem 2. Let be an upper bound on the discrete global minimum value of problem ; then problems and have the same discrete global minimizers and global minimal values.

Proof. Let be a discrete global minimizer of problem ; then , and , for  all . Consider two sets and .

For all , by (3), we have , then

For all , we have two cases: (i) and , and (ii) and .

Case (i). By (2), we have

Case (ii). By (2), we have . Since , it holds

From (4), (5), and (6), it is obvious that is a discrete global minimizer of problem .

Conversely, let be a discrete global minimizer of problem , then

Suppose that ; that is, . If , then

where is a discrete global minimizer of problem ; that is, . If , then

Hence,

Since , inequality (10) implies that which means that is not a discrete global minimizer of problem . So , and problems and have the same discrete global minimizers and global minimal values.

Theorem 3. Suppose that is a solution of problem , and . Then is a feasible solution of problem .

Proof. If is an infeasible solution of problem , then . By (2), if , we have . If , then . So, it holds that , which contradicts the condition . Hence, the theorem holds.

4. The Proposed Memetic Algorithm for HW/SW Partitioning

Memetic algorithms (MAs) are a kind of global search technique derived from Darwinian principles of natural evolution and Dawkins’ notion of memes [32]. They are genetic algorithms that use local search procedures to intensify the search [33]. MAs have been applied to solve a variety of optimization problems [34–40].

In this section, a tabu search-based memetic algorithm, TSMA, is presented to solve the parameter-free unconstrained problem . First, a general framework of TSMA is presented, followed by detailed descriptions of various components of the algorithm.

4.1. General Framework of the Hybrid Memetic Algorithm

The steps of the general framework of TSMA for solving is shown in Algorithm 2. Throughout its execution, the TSMA updates the upper bound with the function value at the current best solution .

Require: A directed acyclic graph;

Ensure: Approximate global maximal solution ;

(1)    Initial , .

(2)    Generate randomly a population .

(3)    for    do

(4)       Use the local search procedure (see Section 4.3) to minimize problem from

            every individual , also denote the obtained solution by .

(5)        if    then

(6)            Let , and .

(7)        end if

(8)    end for

(9)    while termination criteria (see Section 4.6) do not meet do

(10)      Use the crossover operator (see Section 4.2) to generate a new offspring , and

          apply the local search procedure to refine , also denote it by .

(11)      if    then

(12)          Let , and .

(13)      end if

(14)      if    then  

(15)                   .

(16)      else

(17)                Use the path relinking procedure PR (see Section 4.4) to the solution

                        and the current best solution to obtain a solution .

(18)      end if

(19)      if    then

(20)          Let , and .

(21)      end if

(22)     Use the population updating method (see Section 4.5) to update the population that is

          to decide if .

(23) end while

(24) return   and as an approximate discrete global minimizer and global minimal

      value of problem , respectively.

Algorithm 2: General structure of TSMA.

Before the TSMA begins, its iterative process performs three main steps; see Algorithm 2. In step 1, it initializes the first upper bound of with the known trivial solution where , . In step 2, it generates the initial random population set of size ; that is, , , . In step 4, the TSMA refines each member of the initial population by the local search, the tabu search, and treats as the starting population set.

As the iteration process begins, the TSMA repeatedly performs three main steps: crossover followed by tabu search, path relinking, and the updating of . In step 10, a new solution is identified using the crossover operation followed by tabu search. In step 17, the path relinking procedure may be applied to in an attempt to generate an improved solution from . Finally, in step 22, the population updating process is performed to decide whether and which solution should be replaced, provided that such an improved has been generated. The remaining steps of Algorithm 2 are used to update and . This iterative process repeats itself until some stopping conditions are met.

The main iterative components of TSMA, the crossover followed by the tabu search procedure, the path relinking procedure, and the population updating strategy are explained in the subsequent subsections.

4.2. Crossover Operator

We adopt the fixed crossover operator [41] to generate a new offspring. First, a pair of individuals are selected randomly from the population. Next, if two selected individuals have the same bit value, their offspring inherits it. Otherwise, it takes value 0 or 1 randomly. Suppose that and are two selected individuals from the population. The pseudocode of the crossover operator is given in Algorithm 3.

Require: Two selected individuals and ;

Ensure: A new offspring ;

(1) for    do

(2)   if    then

(3)       Let .

(4)   else

(5)        takes value 0 or 1 randomly.

(6)   end if

(7) end for

(8) return   as a new offspring.

Algorithm 3: Crossover operator.

4.3. The Tabu Search Procedure

Tabu search (TS) is a metaheuristic optimization that has been applied successfully to solve a number of combinatorial optimization problems [42–45]. It combines search strategies that are designed to avoid being trapped in a local minimizer and to present revisiting recently generated solutions [46]. The neighborhood structure and the tabu tenure with which TS is implemented are fundamental to achieving the above objectives. A new solution is generated from the existing solution , within a defined neighborhood of , by the operation called a “move.” The solution is not generated again for a number of iterations (tabu tenure).

The tabu search procedure presented here differs mainly in solution generation. While we preserve the tabu tenure feature of TS, we do away with the neighborhood structure in generating from . The solution generation procedure has been suggested here to conform to the problem at hand and to make the search greedier. In particular, a sequence of flips (each flip returns a solution) on the (allowed) components of are carried out. The best solution from the sequence is considered as . More specific to the problem considered, a flip gain of a node (node corresponds to the variable ) is defined as follows:

A positive gain is a gain when the objective value of problem decreases if the component (variable) is flipped from the current value to its complement; that is, if , then its value is changed to . Therefore, for each variable we keep an associated tabu tenure which prevents from being flipped again until diminishes (). Hence, the th gain () is calculated using (11) when it is permitted by the tabu tenure or some aspiration criterion is satisfied.

At the beginning of the tabu search procedure, () are initialized by the user and if is flipped the corresponding is updated, as suggested by Cai et al. [42], as follows:

The updating rule (12) is called the feedback mechanism in Cai et al. [42], as this updating prevents from being too large or too small.

We have proposed a simple aspiration criterion that permits a variable to be flipped in spite of being tabu if it leads to a solution better than the best solution produced by the tabu search procedure thus far. There are a number of parameters which are needed to be initialized. These are the maximum numbers of iterations, , and the values (). The tabu search procedure we have suggested here is now summarized in Algorithm 4. Notice that the index in step 4 denotes that the node is not in the tabu list () or when the aspiration criterion is met (which is a positive gain). The tabu search procedure process stops when of iterations is reached and returns the best solution found in the process.

Require: An initial solution .

Ensure: The best solution .

(1)    Set the parameters and . Initiate , , and .

(2)   while    do

(3)      Calculate the flip gain , using (11).

(4)       = argmax or .

(5)      Let . Rename the solution corresponding to this change as again. Calculate by (12), let .

(6)      if    then

(7)          Let .

(8)      end if

(9)      .

(10)    for    do

(11)         if    then

(12)           Let .

(13)         end if

(14)    end for

(15)    if    then

(16)        Break.

(17)    end if

(18) end while

(19) return  .

Algorithm 4: The tabu search procedure.

4.4. Path Relinking (PR) Procedure

The path relinking technique was originally proposed by Glover et al. [47] to explore possible trajectories connecting high quality solutions obtained by heuristics. It has been applied successfully to solve a number of optimization problems such as data mining [48], unconstrained binary quadratic programming [49], capacitated clustering [50], and multiobjective knapsack problem [51].

The PR procedure presented here explores solution trajectories using two good solutions. Within the iteration process of TSMA, there are always two such solutions: the current best solution and the produced by the tabu search procedure. When , PR is executed in an attempt to improve the current best solution . At the beginning, PR identifies the number of variables whose values differ in and . The indices of these variables are then kept in a set . PR then starts its iteration process. For each index in an iteration is executed. PR stops if an improved has been found during an iteration.

An iteration starts with identifying the index corresponding to the highest gain; that is, . Let the solution corresponding to the flipping of be . The following tasks are then performed to see (a) whether PR has obtained a new best solution or (b) whether PR is approaching towards the current .

(a)If , then PR stops as it has found a new best solution.(b)Otherwise, is modified by where . The index is then removed from .

PR then proceeds with next iteration for the next index in . The pseudocode of the PR is illustrated in Algorithm 5.

Require: An initiating solution , the current best solution .

Ensure: A solution .

(1)    Initiate ,

(2)   for    do

(3)      if    then

(4)          .

(5)      end if

(6)   end for

(7)   while    do

(8)      Calculate the flip gains .

(9)       = argmax.

(10)    if    then

(11)         Let , and , .

(12)        Break.

(13)    else

(14)         = argmax.

(15)        Let , .

(16)    end if

(17) end while

(18) return  .

Algorithm 5: Path relinking (PR) procedure.

4.5. Population Updating Strategy

A combination of intensification and diversification is essential for designing high quality hybrid heuristic algorithms [52, 53]. We have presented how the TSMA implements its search intensification strategies via the tabu search procedure and PR; we now present its search diversification strategies. This is achieved by updating the population set with the solution obtained by the tabu search procedure or PR. In this subsection, will be referred to as the trial solution.

Like any other algorithm [35, 38], the TSMA uses its population updating to cater for both quality and diversity of the member of . A measure is needed to decide whether the trial solution should be inserted into and if so which solution should it replace. To this end, the following function is suggested when :

where is the current best solution and is a parameter, which balances the relative importance of the solution quality and the diversity of the population. The function , , is defined as

where

In the updating process, we want to achieve two objectives: solution quality and population diversity. At early stages of TSMA, points in are scattered and diversely distributed. Therefore, a further diversification is not needed. Hence, the decision whether and which solution deletes should be based on the contribution of the function value in and not purely be based on the location of in the solution space with respect to the points in (i.e., density of the points ). Notice that this always holds in (13) when . For ( is likely to be far from ), in (13) is likely to dominate in .

At later stages of TSMA, points in are likely to be clustered together. Hence, diversification of the points in is needed. Clearly, it is likely that (for being more likely to be close to ) is small ensuring less contribution from it and more from in .

With the functional form (13) of , we now device a strategy to achieve both objectives. Central to this strategy is the comparison of measure values, namely, , , . Here (resp., ) represents a measure with respect to the function value at (resp., the function value at ) and its distance (sparsity) with respect to (sparsity of with respect to ). The point with the minimum measure is then identified; denote it by . In particular, we find

(or , for all , when ). When , we update as .

On the other hand, if , then is updated with with a small probability. This is because inclusion of in with probability one will reduce the diversity of . In particular, update is carried out with small probability, where , for all . Here is replaced to increase the diversity in . The pseudocode for the population updating procedure is presented with Algorithm 6.

Require: Population , the current best solution , and a solution .

Ensure: Updated population .

(1)    Calculate according to (13);

(2)   for    do

(3)      calculate according to (13).

(4)   end for

(5)   Let , .

(6)   if    then

(7)       is inserted into , and is deleted from .

(8)   else

(9)      if    then

(10)       Let .

(11)         is inserted into , and is deleted from .

(12)    end if

(13) end if

(14) return  .

Algorithm 6: Population updating procedure.

Finally, we present the time required to update the set . It needs to calculate the distance between and . The distance can be calculated in time , and it needs to calculate . Moreover, it takes time to find the solution with the smallest and the second smallest values in , . Therefore, the total running time of the population updating procedure is bounded by .

4.6. Termination Criteria

In this paper, we use two criteria to stop TSMA. If the maximum number of generations is reached, then we stop the algorithm. On the other hand, when the quality of the best solution from one generation to the next is not improved after generations, then we stop the algorithm. Therefore, the TSMA stops when any of these two criteria is met.

5. Computational Experiments

In this section, we present experiments performed in order to evaluate the performance of TSMA. The benchmark test instances used are introduced followed by the parameter settings for TSMA. Finally, computational results, comparisons, and analyses are reported. The algorithm is coded in C language and implemented on a PC with 2.11 GHz AMD processor and 1 G of RAM.

5.1. Test Instances

Task graphs for free (TGFF) [54] can create directed acyclic graphs (DAGs), that is, task graphs. Given identical parameters and input seeds, it can generate identical task graphs. We have used TGFF (Window Version 3.1) to generate four DAGs as hardware/software partitioning test instances. These DAGs were also used to test the performance of the artificial immune algorithm (ENSA-HSP) [16]. The TGFF (Window Version 3.1) can be obtained at the website (http://ziyang.eecs.umich.edu/~dickrp/tgff/), and the parameters are given in the Appendix. Since these DAGs do not contain cycles, all nodes in each DAG are executed only once; that is, .

The characteristics of these test instances are given in Table 1. These are the times when all nodes are implemented by software (TimeSw), the time when all nodes are implemented by hardware (TimeHw), the required time (TimeReq), and the cost when all nodes are implemented by hardware (CostHw).

Table 1: The characteristics of four test instances.

No.
DAG
TimeSw
TimeHw
TimeReq
CostHw

1
30 nodes
9736
1782
4963
3039

2
60 nodes
19591
2279
9203
6085

3
90 nodes
28718
3060
13323
8399

4
120 nodes
37354
3056
16775
11187

5
300 nodes
92156
2940
39940
27819

6
500 nodes
155151
3094
66463
45171

5.2. The Parameter Settings

The tabu search procedure requires parameters , and . We have used , , and . These values are different from those used by Cai et al. [42] for unconstrained binary quadratic programming. Justifications for these choices are that the tabu search procedure proposed here is different from [42], and the scale of test problems used in this paper is smaller than that of the test problems used in [42]. Moreover, we have chosen these values based on our numerical experiments.

An important parameter of TSMA is the size of the population set . The bigger the value of is, the higher the CPU time is. This is because operations are needed to update . The parameter in (13) is used by TSMA to diversify , and as such it has an important significance in the performance of TSMA. We have chosen the values of these two parameters after some numerical experiments.

We first conduct a number of preliminary experiments using the test instance number 3, that is, the instance with 90 nodes. We have fixed , , , , and and run TSMA with various values of and . This experiment was conducted to get suitable ranges for both parameters.

With the values of , , , and chosen as above, we have then conducted another series of runs of TSMA using the test instance with 90 nodes. We have used . For each value of , six values of , that is, , are used to constitute pairs. Hence, there are 24 pairs. For each pair, TSMA was run 5 times, making a total of 120 runs. The average results of 5 runs on each pair are reported in Table 2.

Table 2: Experimental results of our algorithm with tuning of values and on the test instance with 90 nodes.

10
20
30
40

Cost
Time (s)
Cost
Time (s)
Cost
Time (s)
Cost
Time (s)

0.001
3570
15.092
3568
19.531
3561
23.687
3560
23.735

0.003
3571
15.651
3562
18.265
3564
18.625
3559
20.127

0.005
3567
16.539
3561
20.283
3560
15.982
3561
21.077

0.008
3560
16.585
3561
15.617
3566
19.234
3559
20.524

0.01
3562
16.516
3568
15.681
3569
16.484
3558
20.437

0.012
3568
16.597
3556
18.421
3568
16.102
3560
19.511

The results in Table 2 show that and are suitable values to choose. Hence, we have used these values throughout the numerical experiments. We present all parameter values used in TSMA in Table 3, where the column 2 presents the subsections where the corresponding parameter has been discussed.

Table 3: Settings of parameters.

Parameters
Section
Value

4.1
20

4.3
10

4.3

4.4
0.008

4.4
0.2

4.6
500

4.6
50

5.3. Numerical Comparisons

In order to show the effectiveness of TSMA, we compare its results with those of the evolutionary negative selection algorithm (ENSA-HSP) [16] and traditional evolutionary algorithm (EA) [16]. TSMA was run 20 times on each test instance in Table 1; hence, average results are used in the comparison. Results of ENSA-HSP and EA have been taken from [16]. Comparisons of results are presented in Table 4, where columns under the captions “best,” “mean,” and “worst” report the best cost, the average cost, and the worst cost, respectively. The column under the caption “time” reports the average CPU times for TSMA. We are unable to present the CPU times for the other two algorithms as this would require running these algorithms ourselves, since the CPU times of EA and ENSA-HSP were not reported in [16]. The last column of Table 4 reports the percentage of improvement on the best results by TSMA. The results obtained by all three algorithms on the first 4 test instances are further summarized in Figures 2, 3, 4, and 5.

Table 4: Obtained results for EA, ENSA-HSP, and TSMA.

DAG
EA [16]
ENSA-HSP [16]
TSMA
Improve

Best
Mean
Worst
Best
Mean
Worst
Best
Mean
Worst
Time

30 nodes
1350
1409
1473
1335
1339
1350
1335
1335.0
1335
1.078
0%

60 nodes
2923
2980
3072
2884
2912
2931
2800
2806.1
2814
12.625
2.91%

90 nodes
3804
3915
4100
3617
3726
3761
3552
3557.1
3564
41.545
1.80%

120 nodes
5363
5506
5619
5177
5308
5346
5001
5005.2
5021
145.259
3.40%

300 nodes

12556
12581.6
12639
1456.672

500 nodes

20497
20578.8
20667
3204.913

Figure 2: Experimental results on test instance with 30 nodes.

Figure 3: Experimental results on test instance with 60 nodes.

Figure 4: Experimental results on test instance with 90 nodes.

Figure 5: Experimental results on test instance with 120 nodes.

Figures 3–5 clearly show the superiority of TSMA over the other two algorithms. Wide differences in costs are noticeable in these figures. Indeed, it can be seen from Table 4 that the TSMA has achieved 84, 65, and 176 less costs than the corresponding previous best obtained by ENSA-HSP for the instances numbers 2, 3, and 4, respectively. These improvements are quite significant.

5.4. Effectiveness of the Adaptive Penalty Function

In order to show the effectiveness of our proposed parameter-free adaptive penalty function, we have replaced the adaptive penalty function in (2) with the exact penalty function in (1) and kept other ingredients of TSMA including the parameter values in Table 3 intact. We denote this implementation of TSMA by TSMA2. Since the parameter in is problem-dependent, we took , 100,  and  200 and run TSMA2 20 times on each of the test instances, for each value. Average results including average CPU times (in seconds) are summarized in Table 5. A number of observations and comparisons using the results in Table 4 are now presented below.

(1)Dependency on : it can be clearly seen in Table 5 that results are very much dependent on values. While results are comparable on instance number 1 for all values, results for the other instance are not the same. To give an example, in terms of the “mean” value, the best result was obtained for on instance number 2, while, for the instance numbers 3 and 4, the best “mean” values were obtained using .(2)Comparison using “mean”: The TSMA performs better than TSMA2 for all instances, except for instance number 1 for which both perform the same.(3)Comparison using “best”: The TSMA performs better than TSMA2 on the last instance while both are equally matched on the remaining instances. TSMA2 obtained these results for instances 1, 2, and 3 for .(4)Comparison using “time”: The best CPU times are different for different values in TSMA2. However, even if we take the best CPU times obtained by TSMA2 disregarding the values then the results are still comparable between TSMA2 and TSMA.

Table 5: Obtained results for TSMA2.

DAG

Best
Mean
Worst
Time
Best
Mean
Worst
Time
Best
Mean
Worst
Time

30 nodes
1335
1335.0
1335
0.986
1335
1335.0
1335
1.015
1335
1335.0
1335
0.906

60 nodes
2800
2811.7
2820
15.424
2805
2811.5
2818
14.804
2809
2811.0
2818
12.047

90 nodes
3552
3557.2
3570
41.592
3556
3559.4
3565
36.209
3556
3559.6
3565
37.491

120 nodes
5005
5028.1
5069
180.434
5018
5035.1
5068
161.848
5018
5029.2
5055
179.020

A statistical view in terms of boxplot is now shown in Figures 6, 7, and 8 using optimal values obtained by TSMA and TSMA2 over 20 runs. Three figures are presented since the standard deviation is zero for instance number 1. These boxplots show that ranges over which the best results obtained over 20 runs vary. All three figures clearly show that the boxplots of TSMA has less height than those of the corresponding boxplots obtained by TSMA2 for three values. This clearly establishes the superiority of the adaptive penalty function presented in (2) over the exact penalty function (1).

Figure 6: Boxplots of the test instance with 60 nodes.

Figure 7: Boxplots of the test instance with 90 nodes.

Figure 8: Boxplots of the test instance with 120 nodes.

6. Conclusion

In this paper, we have presented a memetic algorithm for the hardware/software partitioning problem. The algorithm has three main components: a local tabu search, a path relinking procedure, and population updating. The local tabu search is a “controlled local search” procedure used for search intensification. The path relinking procedure uses further exploitation of solutions and population updating is used for diversification of solutions. Motivations for each of these components within the proposed memetic algorithm are provided.

The hardware/software partitioning problem is converted into an equivalent unconstrained binary optimization problem by employing a parameter-free adaptive penalty function. We have motivated this penalty function first by theoretically and then by numerically comparing its performance with the exact penalty function. The memetic algorithm is then applied to this unconstrained problem, and robustness with respect to the quality of optimal solution is shown by comparing it with another two algorithms from the literature.

Appendix

In this paper, TGFF (Windows Version 3.1) used the following parameter settings [16] to generate test instances, where 30.tgffopt is for the DAG with 30 nodes, 60.tgffopt is for the DAG with 60 nodes, 90.tgffopt is for the DAG with 90 nodes, 120.tgffopt is for the DAG with 120 nodes, 300.tgffopt is for the DAG with 300 nodes, and 500.tgffopt is for the DAG with 500 nodes. See Algorithm 7.

# 30.tgffopt

periodmul 1

taskdegree 3 3

tgcnt 1

taskcnt 31 1

tasktypecnt 30

transtypecnt 30

tablecnt 1

tablelabel TRANSTIME

typeattrib time 10 10 1 1

transwrite tablecnt 1

tablelabel HARDWARE

typeattrib cost 100 50 0.5 1, time 150 75 0.5 1

pewrite tablecnt 1

tablelabel SOFTWARE typeattrib cost 50 30 0.5 1, time 300 100 0.5 1

pewrite tgwrite .tgff

vcgwrite .vcg

# 60.tgffopt

periodmul 1

taskdegree 4 4

tgcnt 1

taskcnt 61 1

tasktypecnt 60

transtypecnt 60

tablecnt 1

tablelabel TRANSTIME

typeattrib time 10 10 1 1

transwrite tablecnt 1

tablelabel HARDWARE

typeattrib cost 100 50 0.5 1, time 150 75 0.5 1

pewrite tablecnt 1

tablelabel SOFTWARE typeattrib cost 50 30 0.5 1, time 300 100 0.5 1

pewrite tgwrite .tgff

vcgwrite .vcg

# 90.tgffopt

periodmul 1

taskdegree 5 5

tgcnt 1

taskcnt 91 1

tasktypecnt 90

transtypecnt 90

tablecnt 1

tablelabel TRANSTIME

typeattrib time 10 10 1 1

transwrite tablecnt 1

tablelabel HARDWARE

typeattrib cost 100 50 0.5 1, time 150 75 0.5 1

pewrite tablecnt 1

tablelabel SOFTWARE typeattrib cost 50 30 0.5 1, time 300 100 0.5 1

pewrite tgwrite .tgff

vcgwrite .vcg

# 120.tgffopt

periodmul 1

taskdegree 5 5

tgcnt 1

taskcnt 121 1

tasktypecnt 120

transtypecnt 120

tablecnt 1

tablelabel TRANSTIME

typeattrib time 10 10 1 1

transwrite tablecnt 1

tablelabel HARDWARE

typeattrib cost 100 50 0.5 1, time 150 75 0.5 1

pewrite tablecnt 1

tablelabel SOFTWARE typeattrib cost 50 30 0.5 1, time 300 100 0.5 1

pewrite tgwrite .tgff

vcgwrite .vcg

# 300.tgffopt

periodmul 1

taskdegree 6 6

tgcnt 1

taskcnt 301 1

tasktypecnt 300

transtypecnt 300

tablecnt 1

tablelabel TRANSTIME

typeattrib time 10 10 1 1

transwrite tablecnt 1

tablelabel HARDWARE

typeattrib cost 100 50 0.5 1, time 150 75 0.5 1

pewrite tablecnt 1

tablelabel SOFTWARE typeattrib cost 50 30 0.5 1, time 300 100 0.5 1

pewrite tgwrite .tgff

vcgwrite .vcg

# 500.tgffopt

periodmul 1

taskdegree 6 6

tgcnt 1

taskcnt 501 1

tasktypecnt 500

transtypecnt 500

tablecnt 1

tablelabel TRANSTIME

typeattrib time 10 10 1 1

transwrite tablecnt 1

tablelabel HARDWARE

typeattrib cost 100 50 0.5 1, time 150 75 0.5 1

pewrite tablecnt 1

tablelabel SOFTWARE typeattrib cost 50 30 0.5 1, time 300 100 0.5 1

pewrite tgwrite .tgff

vcgwrite .vcg

Algorithm 7

Conflict of Interests

The authors declare that there is no conflict of interests regarding the publication of this paper.

Acknowledgments

This research was supported partially by the National Natural Science Foundation of China under Grants 11226236, 11301255, and 61170308, the Natural Science Foundation of Fujian Province of China under Grant 2012J05007, and the Science and Technology Project of the Education Bureau of Fujian, China, under Grants JA13246 and Jk2012037.

References

J. I. Hidalgo and J. Lanchares, “Functional partitioning for hardware-software codesign using genetic algorithms,” in Proceedings of the 23rd EUROMICRO Conference, pp. 631–638, September 1997.

M. O’Nils, A. Jantsch, A. Hemani, and H. Tenhunen, “Interactive hardware-software partitioning and memory allocation based on data transfer profiling,” in Proceedings of the International Conference on Recent Advances in Mechantronics (ICRAM ’95), pp. 447–452, Istanbul, Turkey, August 1995.

J. Madsen, J. Grode, P. V. Knudsen, M. E. Petersen, and A. Haxthausen, “Lycos: the lyngby cosynthesis system,” Design Automation for Embedded Systems, vol. 2, no. 2, pp. 195–235, 1997.

R. Niemann and P. Marwedel, “An algorithm for hardware/software partitioning using mixed integer linear programming,” Automation for Embedded Systems, vol. 2, no. 2, pp. 165–193, 1997.

K. S. Chatha and R. Vemuri, “Hardware-software partitioning and pipelined scheduling of transformative applications,” IEEE Transactions on Very Large Scale Integration Systems, vol. 10, no. 3, pp. 193–208, 2002.

A. Kalavade, System-level codesign of mixed hardware-software systems, [Ph.D. dissertation], EECS Department, University of California, Berkeley, Calif, USA, 1995.

J. Henkel and R. Ernst, “An approach to automated hardware/software partitioning using a flexible granularity that is driven by high-level estimation techniques,” IEEE Transactions on Very Large Scale Integration Systems, vol. 9, no. 2, pp. 273–289, 2001.

P. Eles, Z. Peng, K. Kuchcinski, and A. Doboli, “Systems level hardware/software partitioning based on simulated annealing and tabu search,” Design Automation for Embedded Systems, vol. 2, no. 1, pp. 5–32, 1997.

R. Ernst, J. Henkel, and T. Benner, “Hardware-software cosynthesis for microcontrollers,” IEEE Design and Test of Computers, vol. 10, no. 4, pp. 425–449, 2002.

R. P. Dick and N. K. Jha, “MOGAC: a multiobjective genetic algorithm for hardware-software cosynthesis of distributed embedded systems,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 17, no. 10, pp. 920–935, 1998.

M. Purnaprajna, M. Reformat, and W. Pedrycz, “Genetic algorithms for hardware-software partitioning and optimal resource allocation,” Journal of Systems Architecture, vol. 53, no. 7, pp. 339–354, 2007.

P. K. Nath and D. Datta, “Multi-objective hardware-software partitioning of embedded systems: a case study of JPEG encoder,” Applied Soft Computing, vol. 15, pp. 30–41, 2014.

T. Wiangtong, P. K. Cheung, and W. Luk, “Comparing three heuristic search methods for functional partitioning in hardware-software codesign,” Design Automation for Embedded Systems, vol. 6, no. 4, pp. 425–449, 2002.

J. C. Wu, Q. Q. Sun, and T. Srikanthan, “Algorithmic aspects for multiple-choice hardware/software partitioning,” Computers and Operations Research, vol. 39, no. 12, pp. 3281–3292, 2012.

P. Liu, J. Wu, and Y. Wang, “Hybrid algorithms for hardware/software partitioning and scheduling on reconfigurable devices,” Mathematical and Computer Modelling, vol. 58, no. 1-2, pp. 409–420, 2013.

Y. G. Zhang, W. J. Luo, Z. M. Zhang, B. Li, and X. F. Wang, “A hardware/software partitioning algorithm based on artificial immune principles,” Applied Soft Computing Journal, vol. 8, no. 1, pp. 383–391, 2008.

M. López-Vallejo and J. C. López, “On the hardware-software partitioning problem: System modeling and partitioning techniques,” ACM Transactions on Design Automation of Electronic Systems, vol. 8, no. 3, pp. 269–297, 2003.

P. Arató, Z. Á. Mann, and A. Orbán, “Algorithmic aspects of hardware/software partitioning,” ACM Transactions on Design Automation of Electronic Systems, vol. 10, no. 1, pp. 136–156, 2005.

W. Jigang, T. Srikanthan, and G. Chen, “Algorithmic aspects of hardware/software partitioning: 1D search algorithms,” IEEE Transactions on Computers, vol. 59, no. 4, pp. 532–544, 2010.

A. Kalavade and P. A. Subrahmanyam, “Hardware/software partitioning for multifunction systems,” IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 17, no. 9, pp. 819–837, 1998.

Y. Peng, M. Lin, and J. Yang, “Hardware-software partitioning research based on resource constraint,” Journal of Circuits and Systems, vol. 10, no. 3, pp. 80–84, 2005 (Chinese).

D. Gajski, N. Dutt, A. We, and S. Lin, High-Level Synthesis Introduction to Chip and System Design, Kluwer Academic Publishers, Dordrecht, The Netherlands, 1994.

M. Sinclair, “An exact penalty function approach for nonlinear integer programming problems,” European Journal of Operational Research, vol. 27, no. 1, pp. 50–56, 1986.

A. Homaifar, S. H. Y. Lai, and C. X. Qi, “Constrained optimization via genetic algorithms,” Simulation, vol. 62, no. 4, pp. 242–254, 1994.

R. Sarker and C. Newton, “A genetic algorithm for solving economic lot size scheduling problem,” Computers & Industrial Engineering, vol. 42, no. 2–4, pp. 189–198, 2002.

T. P. Runarsson and X. Yao, “Stochastic ranking for constrained evolutionary optimization,” IEEE Transactions on Evolutionary Computation, vol. 4, no. 3, pp. 284–294, 2000.

D. W. Coit, A. E. Smith, and D. M. Tate, “Adaptive penalty methods for genetic optimization of constrained combinatorial problems,” INFORMS Journal on Computing, vol. 8, no. 2, pp. 173–182, 1996.

R. Farmani and J. A. Wright, “Self-adaptive fitness formulation for constrained optimization,” IEEE Transactions on Evolutionary Computation, vol. 7, no. 5, pp. 445–455, 2003.

B. Tessema and G. G. Yen, “An adaptive penalty formulation for constrained evolutionary optimization,” IEEE Transactions on Systems, Man, and Cybernetics A, vol. 39, no. 3, pp. 565–578, 2009.

M. M. Ali and W. X. Zhu, “A penalty function-based differential evolution algorithm for constrained global optimization,” Computational Optimization and Applications, vol. 54, no. 3, pp. 707–739, 2013.

H. J. C. Barbosa and A. C. C. Lemonge, “A new adaptive penalty scheme for genetic algorithms,” Information Sciences, vol. 156, no. 3-4, pp. 215–251, 2003.

R. Dawkins, The Selfish Gene, Oxford University, Oxford, UK, 1989.

P. Moscato, “Memetic algorithms: a short introduction,” in New Ideas in Optimization, D. Corne, M. Dorigo, and F. Glover, Eds., pp. 219–234, McGraw-Hill, New York, NY, USA, 1999.

A. R. Buck, J. M. Keller, and M. Skubic, “A memetic algorithm for matching spatial configurations with the histograms of forces,” IEEE Transactions on Evolutionary Computation, vol. 17, no. 4, pp. 588–604, 2013.

G. Lin and W. X. Zhu, “An efficient mememtic algorithm for the max-bisection problem,” IEEE Transactions on Computers, vol. 63, no. 6, pp. 1365–1376, 2014.

M. Urselmann, S. Barkmann, G. Sand, and S. Engell, “A memetic algorithm for global optimization in chemical process synthesis problems,” IEEE Transactions on Evolutionary Computation, vol. 15, no. 5, pp. 659–683, 2011.

G. Iacca, F. Caraffini, and F. Neri, “Memory-saving memetic computing for path-following mobile robots,” Applied Soft Computing, vol. 13, no. 4, pp. 2003–2016, 2013.

Z. Lü and J.-K. Hao, “A memetic algorithm for graph coloring,” European Journal of Operational Research, vol. 203, no. 1, pp. 241–250, 2010.

Z. Z. Zhang, O. Che, B. Cheang, A. Lim, and H. Qin, “A memetic algorithm for the multiperiod vehicle routing problem with profit,” European Journal of Operational Research, vol. 229, no. 3, pp. 573–584, 2013.

T. C. E. Cheng, B. Peng, and Z. Lü, “A hybrid evolutionary algorithm to solve the job shop scheduling problem,” Annals of Operations Research, 2013.

P. Chardaire, M. Barake, and G. P. McKeown, “A {PROBE}-based heuristic for graph partitioning,” IEEE Transactions on Computers, vol. 56, no. 12, pp. 1707–1720, 2007.

Y. Q. Cai, J. H. Wang, J. Yin, and Y. L. Zhou, “Memetic clonal selection algorithm with EDA vaccination for unconstrained binary quadratic programming problems,” Expert Systems with Applications, vol. 38, no. 6, pp. 7817–7827, 2011.

N. F. Unver and M. M. Kokar, “Self controlling tabu search algorithm for the quadratic assignment problem,” Computers & Industrial Engineering, vol. 60, no. 2, pp. 310–319, 2011.

T. James, C. Rego, and F. Glover, “Multistart tabu search and diversification strategies for the quadratic assignment problem,” IEEE Transactions on Systems, Man, and Cybernetics A, vol. 39, no. 3, pp. 579–596, 2009.

S. Kulturel-Konak, “A linear programming embedded probabilistic tabu search for the unequal-area facility layout problem with flexible bays,” European Journal of Operational Research, vol. 223, no. 3, pp. 614–625, 2012.

F. Glover and M. Laguna, Tabu Search, Springer, New York, NY, USA, 1997.

F. Glover, M. Laguna, and R. Martí, “Fundamentals of scatter search and path relinking,” Control and Cybernetics, vol. 29, no. 3, pp. 653–684, 2000.

H. Barbalho, I. Rosseti, S. L. Martins, and A. Plastino, “A hybrid data mining GRASP with path-relinking,” Computers & Operations Research, vol. 40, no. 12, pp. 3159–3173, 2013.

Y. Wang, Z. Lü, F. Glover, and J. Hao, “Path relinking for unconstrained binary quadratic programming,” European Journal of Operational Research, vol. 223, no. 3, pp. 595–604, 2012.

Y. M. Deng and J. F. Bard, “A reactive GRASP with path relinking for capacitated clustering,” Journal of Heuristics, vol. 17, no. 2, pp. 119–152, 2011.

R. P. Beausoleil, G. Baldoquin, and R. A. Montejo, “Multi-start and path relinking methods to deal with multiobjective knapsack problems,” Annals of Operations Research, vol. 157, no. 1, pp. 105–133, 2008.

L. Y. Tseng and S. C. Chen, “Two-phase genetic local search algorithm for the multimode resource-constrained project scheduling problem,” IEEE Transactions on Evolutionary Computation, vol. 13, no. 4, pp. 848–857, 2009.

K. Sörensen and M. Sevaux, “MA|PM: memetic algorithms with population management,” Computers & Operations Research, vol. 33, no. 5, pp. 1214–1225, 2006.

R. P. Dick, D. L. Rhodes, and W. Wolf, “TGFF: task graphs for free,” in Proceedings of the 6th International Workshop on Hardware/Software Codesign, pp. 97–101, March 1998.