33
courseware Force-Directed Scheduling Sune Fallgaard Nielsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 321 DK2800 Lyngby, Denmark

Force-Directed Scheduling

Embed Size (px)

DESCRIPTION

Force-Directed Scheduling. Sune Fallgaard Nielsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 321 DK2800 Lyngby, Denmark. Overview / Agenda. Motivation Introduction Defining problem and model Solution Results Conclussion. - PowerPoint PPT Presentation

Citation preview

Page 1: Force-Directed Scheduling

courseware

Force-Directed Scheduling

Sune Fallgaard Nielsen

Informatics and Mathematical ModellingTechnical University of Denmark

Richard Petersens Plads, Building 321DK2800 Lyngby, Denmark

Page 2: Force-Directed Scheduling

[M-1] High-Level Synthesis 2SoC-MOBINET courseware

Overview / Agenda

Motivation Introduction Defining problem and model Solution Results Conclussion

Page 3: Force-Directed Scheduling

[M-1] High-Level Synthesis 3SoC-MOBINET courseware

Motivation

The mapping from a behavioral model to a physical Register-Transfer level description is a NP-complete problem.

Therefore an exhaustive comparison on all possible solutions is infeasible.

An algorithm finding an efficient mapping is required.

Page 4: Force-Directed Scheduling

[M-1] High-Level Synthesis 4SoC-MOBINET courseware

Introduction

The paper was written in 1989. The interest on High-Level Languages like VHDL

is increasing at that time. Synthesis tools capable of generating a RTL

realization from a behavioral model is needed.

Page 5: Force-Directed Scheduling

[M-1] High-Level Synthesis 5SoC-MOBINET courseware

Introduction

implementationdesign specification

Physical domain

Mathematical domain

specification

create a model of the physical problem

synthesis

create an alogorithm to solve the problem

implementation

Transform the optimized model back to the physical domain

Page 6: Force-Directed Scheduling

[M-1] High-Level Synthesis 6SoC-MOBINET courseware

Introduction

implementationdesign specification

Physical domain

Mathematical domain

specification

create a model of the physical problem

synthesis

create an alogorithm to solve the problem

implementation

Transform the optimized model back to the physical domain

Page 7: Force-Directed Scheduling

[M-1] High-Level Synthesis 7SoC-MOBINET courseware

Defining problem and model

The problem: For a given function, find an optimal solution. An optimal solution can be constrainted by area-, power-, performance- or flexibility requirements depending on the application.

The model:Scheduling : Determine for each operation the time at which it should be performed without violating any precedence contraints.

Page 8: Force-Directed Scheduling

[M-1] High-Level Synthesis 8SoC-MOBINET courseware

Solution

Common Approach New Approach

List Scheduling Force-Directed Scheduling

Resources given Time contraints given

Minimize delay Minimize required resources

Page 9: Force-Directed Scheduling

[M-1] High-Level Synthesis 9SoC-MOBINET courseware

Solution

Common Approach New Approach

List Scheduling Force-Directed Scheduling

Resources given Time contraints given

Minimize delay Minimize required resources

Page 10: Force-Directed Scheduling

[M-1] High-Level Synthesis 10SoC-MOBINET courseware

Force-Directed Scheduling

The Force-Directed Scheduling approach reduces the amount of:

• Functional Units• Registers• Interconnect

This is achieved by balancing the concurrency of operations to ensure a high utilization of each unit.

Page 11: Force-Directed Scheduling

[M-1] High-Level Synthesis 11SoC-MOBINET courseware

Force-Directed Scheduling

The Force-Directed Scheduling algorithm consists of 3 steps:

1.Determine a time frame of each operation

2.Create a distribution graph

3.Calculate the force (a new metric)

Page 12: Force-Directed Scheduling

[M-1] High-Level Synthesis 12SoC-MOBINET courseware

Scheduling – An example

Solve the differential equationy’’ + 3zy’ + 3y = 0

This can be calculated using this iterative algorithmwhile(z < a) repeat

zl := z + dz;

ul := u – (3 · z · u · dz) – (3 · y · dz);

yl := y + (u · dz);

z := zl;

u := ul;

y := yl;

Page 13: Force-Directed Scheduling

[M-1] High-Level Synthesis 13SoC-MOBINET courseware

Scheduling – An example

Data-Flow and Control-Flow Graphs

ASAP Scheduling ALAP Scheduling

Page 14: Force-Directed Scheduling

[M-1] High-Level Synthesis 14SoC-MOBINET courseware

Scheduling – An example

Data-Flow and Control-Flow Graphs

ASAP Scheduling ALAP Scheduling

Page 15: Force-Directed Scheduling

[M-1] High-Level Synthesis 15SoC-MOBINET courseware

Scheduling – An example

Step 1 : Determine a time frame of each operation

Error in Figure

Page 16: Force-Directed Scheduling

[M-1] High-Level Synthesis 16SoC-MOBINET courseware

Scheduling – An example

Step 2 : Create a distribution graph

DG(1) = 2.833 DG(3) = 0.833DG(2) = 2.333 DG(4) = 0

Page 17: Force-Directed Scheduling

[M-1] High-Level Synthesis 17SoC-MOBINET courseware

Scheduling – An example

b

ti tb

iDGjDGjForce

)1(

)()()(

A metric called force is introduced. The force is used to optimize the utilization of units. A high positive force value indicates a poor utilization.

Step 3 : Calculate the force (a new metric)

Page 18: Force-Directed Scheduling

[M-1] High-Level Synthesis 18SoC-MOBINET courseware

Scheduling – An example

Step 3 : Calculate the force (a new metric)

Fixed

Free

Page 19: Force-Directed Scheduling

[M-1] High-Level Synthesis 19SoC-MOBINET courseware

Scheduling – An example

2

1 2

)()1()1(

i

iDGDGForce

Step 3 : Calculate the force (a new metric)With the operation x’ in control-step 1.

DG(1) = 2.833 DG(3) = 0.833DG(2) = 2.333 DG(4) = 0

25.02

333.2833.2833.2

Poor utilization

Page 20: Force-Directed Scheduling

[M-1] High-Level Synthesis 20SoC-MOBINET courseware

Scheduling – An example

3

2

2

1 2

)()3(

2

)()2()2(

ii

iDGDG

iDGDGForce

Step 3 : Calculate the force (a new metric)With the operation x’ in control-step 2. (x’’ must be in control-step 3)

DG(1) = 2.833 DG(3) = 0.833DG(2) = 2.333 DG(4) = 0

12

333.2833.0833.0

2

333.2833.2333.2

Good utilization

Direct force (calculated as before)Indirect force (on x’’ in control-step 3)

Page 21: Force-Directed Scheduling

[M-1] High-Level Synthesis 21SoC-MOBINET courseware

Scheduling – An example

By repeatedly assigning operations to various control-steps and calculating the force associated with the choice several force values will be available.

The Force-directed scheduling algorithm chooses the assignment with the lowest force value, which also balances the concurrency of operations most efficiently.

Page 22: Force-Directed Scheduling

[M-1] High-Level Synthesis 22SoC-MOBINET courseware

Force-Directed Scheduling

The Force-Directed Scheduling approach reduces the amount of:

• Functional Units• Registers• Interconnect

By introducing Registers and Interconnect as storage operations, the force is calcuted for these as well. The 3 steps of the algorithm are carried out for these operations also.

Page 23: Force-Directed Scheduling

[M-1] High-Level Synthesis 23SoC-MOBINET courseware

Force-Directed Scheduling

Page 24: Force-Directed Scheduling

[M-1] High-Level Synthesis 24SoC-MOBINET courseware

Force-Directed Scheduling

Introducing Registers and Interconnect as operations.

Since the Registers and Interconnect area consumption is reduced in solution b, it might be optimal.

Page 25: Force-Directed Scheduling

[M-1] High-Level Synthesis 25SoC-MOBINET courseware

Force-Directed List Scheduling

List Scheduling Force Directed Scheduling

Resources given Time contraints given

Minimize delay Minimize required resources

If the problem is the other way around, ie. if the resources are

given a Force-Directed List Scheduling algorithm can be applied.

Page 26: Force-Directed Scheduling

[M-1] High-Level Synthesis 26SoC-MOBINET courseware

Force-Directed List Scheduling

The Force-Directed List Scheduling utilizes the strengths of the:

•Force-Directed Scheduling and•List Scheduling

Force-Directed List Scheduling is similar to List Scheduling except force is the priority function, not mobility.

Page 27: Force-Directed Scheduling

[M-1] High-Level Synthesis 27SoC-MOBINET courseware

Force-Directed List Scheduling

List Scheduling Force-Directed List Scheduling

We have 1 adder and 1 multiplier

Mobility is a poor metric Force is a better metric

Page 28: Force-Directed Scheduling

[M-1] High-Level Synthesis 28SoC-MOBINET courseware

Results

Test Application : Fifth-order Elliptic Wave Filter

xp is a pipelined multiplier

Many optimal results, depending on the applicationOne result, ASAP is not optimal.

Page 29: Force-Directed Scheduling

[M-1] High-Level Synthesis 29SoC-MOBINET courseware

Results – The Design Space

The Force-Directed List Scheduling gives better means for exploring the design space.

It offers many results and depending on the application the designer can choose to use more or less resources and see what implications it will have on the delay.

Page 30: Force-Directed Scheduling

[M-1] High-Level Synthesis 30SoC-MOBINET courseware

One more optimization

The Force-Directed List Scheduling is implemented in a system called HAL.

HAL also uses techniques called register merging and multiplexer merging.

These techniques minimizes the cost on registers and interconnections.

Page 31: Force-Directed Scheduling

[M-1] High-Level Synthesis 31SoC-MOBINET courseware

Results

Comparison on various syntesis tools normalized to HAL86 Test Application : Differential Equation

Non-pipelined MultiplierPipelined Multiplier

Page 32: Force-Directed Scheduling

[M-1] High-Level Synthesis 32SoC-MOBINET courseware

Results

Physical unit and interconnection requirements Test Application : Wave Filter

Page 33: Force-Directed Scheduling

[M-1] High-Level Synthesis 33SoC-MOBINET courseware

Conclussions

•The Force-Directed Scheduling and Force-Directed List Scheduling algorithms allows the designer to explore the design space.

•By taking into account the cost of interconnection, registersand multiplexers a more precise algorithm is realized.

•The HAL system, using these algorithms, shows promisingresults compared to other systems.