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 Engineering Electronic Systems
Overview 2 • 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 Electronic Systems
Models of Computation 3 Derivatives Basic dimensions Aspects (for complete functionality system models) concurrency timing processing execution energy time quality … energy functionality concurrency communication dissipation timing energy perceived quality quality … storage reconfiguration time … Electronic Systems
Our Goals 4 • 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 Electronic Systems
Conflicting Requirements 5 modeling ease, expressivity strongest conflicts implementation analyzability efficiency Kahn Process Networks: + (streaming), - (only functional behavior), o (no static implementations) Synchronous Dataflow Graphs: - (periodic kernels), + (timing, schedulability), + (static implementations) Electronic Systems
Application Domain: Multimedia Applications 6 Automata / Reactive Process Networks (RPN) State machines output events input events control events status irregular input irregular output streams streams dynamic stream processing (re)configuration (multi-)periodic (multi-)periodic input streams output streams streaming kernel(s) Kahn Process Networks (KPN) Synchronous Data Flow (SDF) Electronic Systems
Streaming MoCs and the Design Flow 7 typically C code Reactive Process Networks (RPN) (Semantic framework) parallel code Kahn Process Networks (KPN) (Executable specifications) implementation code (Synchronous) Data Flow (Implementation and analysis) MIPS MIPS DSP Acc DSP Interconnect DSP Memory Acc DSP HW/SW Electronic Systems
Streaming MoCs Expressiveness Hierarchy 8 • BDF and larger: Turing complete RPN • Better notions of expressiveness needed DDF KPN RPN: Reactive Process Networks BDF KPN: Kahn Process Networks SDF DF: Data Flow DDF: Dynamic DF HSDF BDF: Boolean DF SDF: Synchronous DF HSDF: Homogeneous SDF Electronic Systems
Dataflow Actors 9 • Basic building blocks of any type of dataflow graph actor 2 2 A 3 4 channel (unbounded, fifo) 5 tokens (data items) • Actor firing: consumption and production of tokens Electronic Systems
Synchronous Dataflow (SDF) Graphs 10 • Actor fires atomically, reading and writing fixed number of tokens on the inputs and outputs • Formal semantics models conservatively the behaviour of real kernels acto Self-loop channel r channel execution time 3 2 3 1 1 C,1 A,2 B,1 1 1 2 3 1 rate Comparable to token Computation Graphs (Karp, Miller) Weighted Marked (Timed) Graphs (Petri-Nets) Electronic Systems
Synchronous Dataflow (SDF) Graphs 11 • 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 Electronic Systems
Conservative model 12 model execution 2 A 1 2 actual execution 2 A 1 2 conservativity + monotonicity Electronic Systems
A NoC-based SoC Platform 13 tile memory processor P M tile P M buf buffer tile CA communication buf P M assist CA Network buf guaranteed throughput CA or best effort data connection R R control flow connection Electronic Systems
Philosophy 14 mapping architecture (H)SDF task graph progressive refinement in the unifying MoC of (H)SDF Mapping-enhanced (H)SDF model writing 5 ie, critical cycle covers data to buffer-related actors the buffer 5 4 0.2 5 mcm 0.3 processor 5 0.3 cycle increasing output buffer 4 0.2 5 5 leads to throughput improvement input buffer 16 of size 2 transfer of data output buffer of size 1 into the network & propagation delays Electronic Systems
Analysis 15 • 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 A A B A, C Transient Phase B A, C Periodic Phase • Tool set, called SDF3 A B www.es.ele.tue.nl/sdf3 B Electronic Systems
Analysis 16 • 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 Electronic Systems
17 Pareto optimal trade-offs ` 0.25 0.2 throughput 0.15 0.1 0.05 0 5 6 7 8 9 10 11 storage Electronic Systems
Limitations of SDF Graphs 18 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) Electronic Systems
Kahn Process Networks (KPN) 19 • 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) while(true) do read(a, n); write(b, 2*n); • Undecidable (e.g., buffer minimisation od or deadlock freedom) Electronic Systems
KPN 20 • 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 e e e e KPNs [Parks, 95] • Boundedness • Completeness f f f f • Traditional execution model [Parks, 95] f f • Does not (always) follow Kahn’s semantics Electronic Systems
Improved KPN scheduler 21 • 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 our 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 Electronic Systems
Reactive Process Networks 22 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 Electronic Systems
23 Parameters / Parameters / Parameters / Parameters / User Interaction User Interaction User Interaction User Interaction Mode Change Mode Change 3D Video 3D Video Control Control Mode Change Mode Change Dynamic Stream Dynamic Stream Processing Processing Add /Remove Add /Remove Object Renderers Object Renderers nrObj nrObj ... ... sg f r sg f r Scene Scene sg fr Filter & Filter & Object -based Graph & Graph & Overlay Overlay rendering Physics Physics Scene Frames Scene Frames Graphs Object -based Graphs rendering Streaming Streaming Kernels Kernels Electronic Systems
Scenarios 24 • 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. Electronic Systems
Scenario-Aware Data Flow (SADF) 25 • 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 Electronic Systems
Recommend
More recommend