Instruction scheduling is an optimization phase aimed at balancing the performance-cost tradeoffs of the design of digital systems. In this paper, a formal framework is tailored in particular to find an optimal solution to the resource-constrained instruction scheduling problem in high-level synthesis. The scheduling problem is formulated as a discrete optimization problem and an efficient population-based search technique; particle swarm optimization (PSO) is incorporated for efficient pruning of the solution space. As PSO has proven to be successful in many applications in continuous optimization problems, the main contribution of this paper is to propose a new hybrid algorithm that combines PSO with the traditional list scheduling algorithm to solve the discrete problem of instruction scheduling. The performance of the proposed algorithms is evaluated on a set of HLS benchmarks, and the experimental results demonstrate that the proposed algorithm outperforms other scheduling metaheuristics and is a promising alternative for obtaining near optimal solutions to NP-complete scheduling problem instances.

High-level synthesis (HLS) is the
process of generating the register transfer level (RTL) design from the
behavioral description of the digital system [

Instruction scheduling is an
important optimization phase aimed at balancing the cost and performance
tradeoffs in the design of digital circuits. It can be considered the most
important step during the architecture synthesis [

Optimal scheduling
algorithms have been typically based on integer linear programming (ILP) [

Among these heuristics, list scheduling is the
most popular because of its simplicity, low run time, and capability to produce
good scheduling results for small-size problems. In list scheduling, operations
are sorted in a list in a topological order (top to bottom) using the precedence
information dictated by data or control dependencies [

Utilizing evolutionary searching techniques to find good
node order for list scheduler has been investigated in the literature. Genetic
algorithms were used in [

In this paper, an instruction scheduling algorithm using the PSO approach is presented. The algorithm utilizes a novel approach that employs PSO in conjunction with list scheduling to solve the resource constrained instruction scheduling (CIS) problem. The local and global search heuristics in PSO are iteratively adjusted making it an effective technique for exploring the discrete solution space for an optimal solution. Compared with a number of different scheduling heuristics, the proposed algorithm was found to generate better scheduling results in most of the tested benchmarks.

The main contributions
of this work are

formulation of the resource constrained instruction scheduling problem as a discrete optimization problem,

proposing a new hybrid scheduling algorithm that combines a discrete implementation of PSO and list scheduling algorithm,

evaluating the proposed algorithm using a set of HLS benchmarks and comparing its performance with existing scheduling heuristics.

The rest of this paper is organized as follows. An
overview of particle swarm optimization is presented in Section

Particle swarm optimization (PSO) proposed
by Dr. Eberhart
and Dr. Kennedy
in 1995 is a computational paradigm based
on the phenomenon of collective intelligence inspired by the social
behavior of bird flocking or fish schooling
[

However, the original
intent of PSO was to graphically simulate the choreography of a bird block or a
fish school. It was found that particle swarm model can be used effectively as
an optimizer in many domains such as training artificial neural networks, linear
constrained function optimization, wireless network optimization, data
clustering, and many other areas where GA can be applied [

The input to the resource-constrained instruction
scheduling algorithm is a directed acyclic graph called the data flow graph
(DFG) defining the instructions and the dependencies among them [

A resource-constrained scheduling algorithm tends to
schedule the instructions into the control steps such that the execution time
of these instructions are minimized without violating constraints imposed by
the available resources [

data dependencies imposed by the DFG must be obeyed. Let

at any control step, the number of active operations of any type must be
less than or equal to the number of available resources of that type; that
is, at any given control cycle, the number of resources used is constrained by

As mentioned in Section

In order to use PSO
for instruction scheduling problems, a direct correlation must be found between
the particle vector and the solution of scheduling problem. Suppose we would
like to use a swarm of

Since 1995, PSO has proven to be successful in solving many continuous
optimization problems. The first use of PSO in discrete optimization was for
solving the traveling salesman problem TSP [

According to (

The new velocity
vector consists of three SSs, the old velocity vector

The specific steps
of the PSO-CIS algorithm are presented in Figure

PSO-CIS algorithm.

In this section, we present the experimental results for
the PSO-CIS algorithm described in Section

Six high-level syntheses DFG benchmarks were used to
evaluate the proposed approach, namely, a second order differential equation
solver (HAL), an autoregressive lattice filter (ARF), an elliptic wave filter (EWF), a finite impulse response filter (FIR), and
two implementations for computing the discrete cosine transform (COSINE1) and (COSINE2).
The number of nodes in these DFGs ranges
from 21 to 82 nodes, and they present a set of challenging testing samples for
the instruction scheduling problem that is widely used in the HLS literature [

DFG of elliptic wave filter benchmark.

For each benchmark, we run the proposed
algorithm under the constraints imposed by the predefined set of resources. A
population of 10 particles is generated. The cognitive and social
components in the heuristic are balanced by setting parameters

Experimental results are summarized in Table

Schedule length in cycles generated by different scheduling algorithms.

Benchmark (node/edges) | Resource-constraints | ILP-based CPLEX | FDS | MB-list scheduling | MB-MMAS (average of 5 runs) | PSO-CIS (average of 5 runs) |
---|---|---|---|---|---|---|

HAL(21/25) | 1a, 1fm, 1m, 3i, 3o | 8 | 8 | 8 | 8 | 8 |

ARF(28/30) | 2a, 1fm, 2m | 11 | 11 | 11 | 11 | 11 |

EWF(34/47) | 1a, 1fm, 1m | 27 | 28 | 28 | 27.2 | 27.4 |

FIR(40/39) | 2a, 2m, 3i, 3o | 13 | 19 | 19 | 17.2 | 17 |

COSINE1(66/76) | 2a, 2m, 1fm, 3i, 3o | X | 18 | 19 | 17.4 | 17.2 |

COSINE2(82/91) | 2a, 2m, 1fm, 3i, 3o | X | 23 | 23 | 21.2 | 21.2 |

The reason behind the results is due to the fact that PSO-CIS and MB-MMAS algorithms are both based on list scheduling, and utilize an evolutionary-based searching approach for constructing a better scheduling list. The combination of different methods for producing the scheduling list and for generating the actual schedule is the key factor in improving the overall schedule quality produced by these hybrid algorithms compared to the stand alone list scheduler and the force-directed scheduling algorithms.

Detraction from
these encouraging results is the time complexity of the PSO-CIS algorithm. For
all the benchmarks, the runtime of the PSO-CIS algorithm ranges from 0.12
second to 1.66 second. This is close to the run time obtained by the MB-MMAS
which ranges between 0.1 and 1.76 second. List scheduling is always the fastest
due to its one-pass nature with complexity

In this paper, a novel instruction scheduling algorithm utilizing particle swarm optimization was presented. PSO is used in conjunction with the traditional list scheduling algorithm to minimize the total schedule time in resource-constrained scheduling problems. The algorithm is based on the phenomenon of collective intelligence as a group of particles use local and global search heuristics to explore the discrete search space for an optimal solution. The solutions are iteratively constructed from efficient operation swaps guided by a fitness function that ranks the quality of the solution in the population. Experimental results over a set of HLS benchmarks demonstrate that PSO is an efficient method for solving the discrete problem of the instruction scheduling. The proposed algorithm produced better schedules in most test cases compared to other instruction scheduling heuristics.