Path-Based Scheduling

14
courseware Path-Based Scheduling Sune Fallgaard Nielsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 322 DK2800 Lyngby, Denmark

description

Sune Fallgaard Nielsen Informatics and Mathematical Modelling Technical University of Denmark Richard Petersens Plads, Building 322 DK2800 Lyngby, Denmark. Path-Based Scheduling. Overview. Motivation Introduction – Prior work / new paradigm Defining problem and model constraints - PowerPoint PPT Presentation

Transcript of Path-Based Scheduling

Page 1: Path-Based Scheduling

courseware

Path-Based Scheduling

Sune Fallgaard Nielsen

Informatics and Mathematical ModellingTechnical University of Denmark

Richard Petersens Plads, Building 322DK2800 Lyngby, Denmark

Page 2: Path-Based Scheduling

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

Overview

Motivation Introduction – Prior work / new paradigm Defining problem and model constraints Solution:

AFAP Scheduling Algorithm The scheduling steps using AFAP

Results Conclussion

Page 3: Path-Based Scheduling

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

Motivation

Derive a synthesis tool which:

Minimizes the number of control steps

Takes constraints into account

Considers loops and conditional branches

( which no prior work has done )

Page 4: Path-Based Scheduling

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

Introduction

Prior work: scheduling <- minimize cost function

Cost function:

- Fixed hardware (uP): Number of states

- Hardware syntheses: Number of states + hardware Scheduling:

Minimizing the cost function by moving operations around Optimal solution:

- Optimal schedule emphasizing concurrency

- Force directed serialization + moving mobile operations

Page 5: Path-Based Scheduling

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

Introduction / Problem

Path-Based Scheduling for Synthesis:

Forget cost functions!

Instead: Emphasize on conditional branches, loops

Minimize number of control steps

- taking constraints into account ( main problem )

Main problem: Gain advantages from looking at branches

Page 6: Path-Based Scheduling

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

Constraints

Internal constraints:- Units can only receive and output values once per cycle- With single phase clock this implies single use per cycle

External constraints:- Amount of hardware available:- Area, units etc.- Timing constraints

Page 7: Path-Based Scheduling

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

AFAP scheduling

AFAP ( As Fast As Possible )

Basic idea: Control-flow directed graph

- Nodes (ops.). Edges (precedence relations).

Longest path: Max number of operations. Cycles only traversed once (%loop unfolding)

Scheduling: Put as many operations into one control step as possible in all possible paths.

Goal: Finite State Machine to implement control

Page 8: Path-Based Scheduling

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

AFAP Scheduling for a single path

AFAP Sch. for a single path ( no loops/branches )

1. Longest path is computed

2. For every path constraints are computed (variables, IOs, func. Units, max delay) and “Cut”s are lain in according to constraints

3. Interval graph is formed with cliques (complete subgraph of all poss. edges)

4. Cuts an cliques are stored for later processing

Page 9: Path-Based Scheduling

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

AFAP Scheduling for a single path

Page 10: Path-Based Scheduling

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

AFAP – The algorithm

The four steps to Nirvana ( or something ):

1. Transform the control flow graph into a directed acyclic graph (DAG)

2. All paths in the DAG are scheduled AFAP

3. Schedules are overlapped in a way to minimize the number of control steps

4. The finite state machine is built.

Page 11: Path-Based Scheduling

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

AFAP – Example

Page 12: Path-Based Scheduling

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

Building finite state machine

Trivial finite state machine design:

Overlapping of intervals to form states (same cut -> same state)

Construct state transitions (figure out control signals for each state)

Construct state transition conditions (rules for looping, waiting etc)

Page 13: Path-Based Scheduling

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

Results

Comparison is difficult since goals are different. Different compiler machines used

Page 14: Path-Based Scheduling

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

Conclusion: Good things / bad things

Good things:Real life examplesGood results

Bad things:No support for secondary hardware constraints - like busses, registers, ports etc.No smart loop unfolding capabilitiesNo pipeline scheduling capabilitiesNo instruction execution reordering supported