Modelling, Analysis and Scheduling with Dataflow Models Marc - - PowerPoint PPT Presentation

modelling analysis and scheduling with dataflow models
SMART_READER_LITE
LIVE PREVIEW

Modelling, Analysis and Scheduling with Dataflow Models Marc - - PowerPoint PPT Presentation

technische universiteit eindhoven Modelling, Analysis and Scheduling with Dataflow Models Marc Geilen, Bart Theelen, Twan Basten, Sander Stuijk, AmirHossein Ghamarian, Jeroen Voeten Eindhoven University of Technology Department of Electrical


slide-1
SLIDE 1

technische universiteit eindhoven

Department of Electrical Engineering Electronic Systems

Modelling, Analysis and Scheduling with Dataflow Models

Marc Geilen, Bart Theelen, Twan Basten, Sander Stuijk, AmirHossein Ghamarian, Jeroen Voeten Eindhoven University of Technology

slide-2
SLIDE 2

2

Electronic Systems

Overview

  • Dataflow model of computation
  • Models of multiprocessor SoC and NoCs
  • Integrated model of application, architecture and mapping
  • Synchronous Dataflow Graphs
  • Exact algorithms based on state-space exploration
  • Kahn Process Networks
  • Implementation of KPNs, deadlock detection and resolution
  • Reactive Process Networks
  • Integrating reactive behaviour with dataflow
  • Scenarios and Trade-offs
  • Improving WCET estimation
  • Working with trade-offs
slide-3
SLIDE 3

3

Electronic Systems

Models of Computation

functionality concurrency timing energy quality …

Basic dimensions processing communication storage

functionality concurrency timing energy quality …

Aspects Derivatives execution time energy dissipation perceived quality

(for complete system models)

reconfiguration time

slide-4
SLIDE 4

4

Electronic Systems

Our Goals

  • Models of computation (and communication)
  • Aimed at automated analysis and synthesis
  • Solid mathematical foundation
  • Basic algorithms and properties
  • Domain of embedded systems, often NoC based MPSoc
  • Towards variability and sensor networks
slide-5
SLIDE 5

5

Electronic Systems

Conflicting Requirements modeling ease, expressivity analyzability implementation efficiency

Kahn Process Networks: + (streaming), - (only functional behavior), o (no static implementations) Synchronous Dataflow Graphs:

  • (periodic kernels), + (timing, schedulability), + (static implementations)

strongest conflicts

slide-6
SLIDE 6

6

Electronic Systems

control dynamic stream processing streaming kernel(s)

(multi-)periodic input streams (multi-)periodic

  • utput streams

input events

  • utput events

irregular output streams irregular input streams (re)configuration events status

Application Domain: Multimedia Applications Synchronous Data Flow (SDF) Kahn Process Networks (KPN) Automata / State machines Reactive Process Networks (RPN)

slide-7
SLIDE 7

7

Electronic Systems

Streaming MoCs and the Design Flow (Synchronous) Data Flow Kahn Process Networks (KPN) Reactive Process Networks (RPN)

typically C code HW/SW parallel code implementation code

MIPS DSP MIPS DSP DSP Acc DSP Acc Memory Interconnect

(Semantic framework) (Executable specifications) (Implementation and analysis)

slide-8
SLIDE 8

8

Electronic Systems

Streaming MoCs Expressiveness Hierarchy

RPN: Reactive Process Networks KPN: Kahn Process Networks DF: Data Flow DDF: Dynamic DF BDF: Boolean DF SDF: Synchronous DF HSDF: Homogeneous SDF

  • BDF and larger: Turing complete
  • Better notions of expressiveness

needed RPN DDF KPN BDF SDF HSDF

slide-9
SLIDE 9

9

Electronic Systems

  • Basic building blocks of any type of dataflow graph
  • Actor firing: consumption and production of tokens

Dataflow Actors A

2 2 3 4 5

actor channel (unbounded, fifo) tokens (data items)

slide-10
SLIDE 10

10

Electronic Systems

Synchronous Dataflow (SDF) Graphs

  • Actor fires atomically, reading and writing fixed number of tokens on

the inputs and outputs

  • Formal semantics models conservatively the behaviour of real

kernels Comparable to Computation Graphs (Karp, Miller) Weighted Marked (Timed) Graphs (Petri-Nets) channel rate token execution time acto r

A,2 B,1 C,1 3 3 2 2 1 1 1 3

Self-loop channel

1 1

slide-11
SLIDE 11

11

Electronic Systems

Synchronous Dataflow (SDF) Graphs

  • Worst-case, conservative approximation of actual read and write

instances and variable (bounded) execution time.

  • Can model buffer storage limitations
  • Can model scheduling decisions
  • Models application mapping. E.g., communication latency or

memory access latency

  • Models multimedia applications
  • Composibility, resource virtualization, TDMA
slide-12
SLIDE 12

12

Electronic Systems

Conservative model

A 2 2 1 A 2 2 1

model execution actual execution conservativity + monotonicity

slide-13
SLIDE 13

13

Electronic Systems

A NoC-based SoC Platform

P M

tile

CA buf

Network

P M

tile

CA buf R R P M

tile

CA buf

processor memory communication assist guaranteed throughput

  • r best effort

data connection control flow connection buffer

slide-14
SLIDE 14

14

Electronic Systems

Philosophy

(H)SDF task graph architecture mapping Mapping-enhanced (H)SDF model writing data to the buffer transfer of data into the network input buffer

  • f size 2

processor cycle

  • utput buffer of size 1

& propagation delays ie, critical cycle covers buffer-related actors increasing output buffer leads to throughput improvement

5 5 5 5 16 4 4 0.2 0.3 0.3 5 0.2 5

mcm

progressive refinement in the unifying MoC of (H)SDF

slide-15
SLIDE 15

15

Electronic Systems

Analysis

  • Many problems NP Complete, defined on HSDF only

buffer sizes, throughput, (deadlock?)

  • Conversion SDF to HSDF leads to potentially exponential blowup
  • We have implemented exact methods based on sate-space

exploration Surprisingly efficient compared to Maximum Cycle Mean methods

  • Tool set, called SDF3

www.es.ele.tue.nl/sdf3

A A A, C A, C B B B B A

Periodic Phase Transient Phase

slide-16
SLIDE 16

16

Electronic Systems

Analysis

  • Throughput computation
  • Latency definition for SDF
  • Liveness, boundedness, consistency

Based on throughput analysis

  • Minimum buffer sizes

State-space exploration; critical cycle analysis

  • Buffer size vs. Throughput (latency) trade-offs

Generalization of minimum buffer size problem

slide-17
SLIDE 17

17

Electronic Systems

` 5 6 7 8 9 10 11 0.05 0.1 0.15 0.2 0.25 throughput storage

Pareto optimal trade-offs

slide-18
SLIDE 18

18

Electronic Systems

Limitations of SDF Graphs

Limitations

  • Static, periodic behaviour
  • Fixed execution times

(potentially high over-estimation of worst-case)

  • No Dynamic instantiation, reconfiguration

Extensions

  • Kahn Process Networks (KPN)
  • Scenarios (Scenario Aware Dataflow)
  • Reactive Process Networks (RPN)
slide-19
SLIDE 19

19

Electronic Systems

Kahn Process Networks (KPN)

  • Data-dependent data rates

(for instance Variable Length Decoding)

  • Asynchronous reads and writes
  • Continuous functions on streams
  • Semantics: function compositions + fixed-point
  • Determinate, scheduling independent (functionality)
  • Undecidable (e.g., buffer minimisation
  • r deadlock freedom)

while(true) do read(a, n); write(b, 2*n);

  • d
slide-20
SLIDE 20

20

Electronic Systems

KPN

  • Buffer management needs to be done at run-time
  • Too small buffers lead to artificial deadlock

Resolve at run-time

  • Requirements on the execution of

KPNs [Parks, 95]

  • Boundedness
  • Completeness
  • Traditional execution

model [Parks, 95]

  • Does not (always) follow

Kahn’s semantics

e e f f f e e f f f

slide-21
SLIDE 21

21

Electronic Systems

Improved KPN scheduler

  • A scheduler that is correct for every KPN cannot exist
  • A scheduling algorithm has been defined which is correct for every

bounded and effective KPN. It is executed in bounded memory by

  • ur scheduler and produces the complete output.

1. Schedule enabled processes (in a fair way) 2. Until (local) deadlock occurs (cyclic causal chain) 3. Resolve deadlock by increasing the smallest full FIFO

slide-22
SLIDE 22

22

Electronic Systems

Reactive Process Networks

Limitations of KPN

  • No non-determinism / reactive behaviour
  • Only continuous functions

Extension Reactive Process Networks

  • Integrate reactive behaviour, (sporadic) event communication with

determinate dataflow models

  • Coordination between streaming and control required to get some

level of predictability

  • Determinacy is lost
slide-23
SLIDE 23

23

Electronic Systems 3D Video

Mode Change Parameters / User Interaction Parameters / User Interaction Object -based rendering Scene Graph & Physics

sg nrObj

Filter & Overlay Mode Change

f r

Control Dynamic Stream Processing Streaming Kernels

Scene Graphs Frames Add /Remove Object Renderers

...

3D Video

Mode Change Parameters / User Interaction Parameters / User Interaction Object -based rendering Scene Graph & Physics

sg nrObj

Filter & Overlay Mode Change

f r

Control Dynamic Stream Processing Streaming Kernels

Scene Graphs Frames Add /Remove Object Renderers

fr sg ...

slide-24
SLIDE 24

24

Electronic Systems

Scenarios

  • Worst-case execution time estimation is overly pessimistic in many

modern dynamic applications

  • Scenarios are detectible situations in which better bounds can be
  • given. This can e.g. be exploited by on-line scheduling and

frequency and voltage scaling methods.

slide-25
SLIDE 25

25

Electronic Systems

Scenario-Aware Data Flow (SADF)

  • Problem - traditional data flow models are not capable of expressing the

dynamism of modern streaming applications

  • Dynamism supported by SADF
  • Parameterized numbers of

consumed/produced tokens

  • Inactive processes
  • Discrete execution time distributions
  • Correlations between above

for different processes

  • Example: Pipelined MPEG-4 SP
  • Analysis of correctness as well as worst-case and long-run average

performance is possible

  • Tool support for exhaustive and simulation-based performance analysis
slide-26
SLIDE 26

26

Electronic Systems

Analysing trade-offs

  • Inherent trade-offs between computation, communication, storage

and quality or other non-functional properties

  • Pareto points are abstractions of multi-dimensional optimisation

criteria / cost functions

  • An Algebra of Pareto Points

Incremental, compositional computation of system trade-offs.

specification alternative realisations design configuration design-time run-time

Q1 Q2

a b

slide-27
SLIDE 27

27

Electronic Systems

Challenges

  • Expressivity while maintaining analyzability
  • Dynamism and reconfiguration
  • Abstraction without loosing accuracy
  • Composability and compositionality
  • MoCs for non-functional aspects
  • Unification or integration of MoCs
slide-28
SLIDE 28

28

Electronic Systems

References

Can be found on www.es.ele.tue.nl/~epicurus

  • Throughput Analysis of Synchronous Data Flow Graphs

A.H. Ghamarian, M.C.W. Geilen, S. Stuijk, T. Basten, A.J.M. Moonen, M.J.G. Bekooij, B.D. Theelen and M.R.

  • Mousavi. ACSD 2006
  • Application Scenarios in Streaming-Oriented Embedded System Design

S.V. Gheorghita, T.Basten, H. Corporaal. In International Symposium in System-on-Chip (SoC 2006)Execution of KPN [ESOP 2003]

  • A Scenario-Aware Data Flow Model for Combined Long-Run Average and Worst-Case Performance Analysis

B.D. Theelen, M.C.W. Geilen, T. Basten, J.P.M. Voeten, S.V. Gheorghita and S. Stuijk. MEMOCODE 2006

  • Exploring Trade-Offs in Buffer Requirements and Throughput Constraints for Synchronous Dataflow Graphs
  • S. Stuijk, M.C.W. Geilen and T. Basten. In Design Automation Conference, DAC 06,
  • An Algebra of Pareto Points

M.C.W. Geilen, T. Basten, B.D. Theelen, R.H.J.M. Otten. ACSD 2005

  • A toolkit: SDF3, http://www.es.ele.tue.nl/sdf3 [ACSD 2006]
  • Liveness and Boundedness of Synchronous Data Flow Graphs

A.H. Ghamarian, M.C.W. Geilen, T. Basten, B.D. Theelen, M.R. Mousavi and Sander Stuijk. FMCAD 2006.

  • Predictable embedding of large data structures in multiprocessor networks-on-chip
  • S. Stuijk, T. Basten, B. Mesman and M.C.W. Geilen. In Digital System Design, 8th Euromicro Conference, DSD

05

  • Reactive Process Networks.

M.C.W. Geilen and T. Basten. EMSOFT 2004

  • Requirements on the Execution of Kahn Process Networks

M.C.W. Geilen and T. Basten. ESOP 2003