Overview of Dataflow Languages. Waheed Ahmad

Similar documents
Dataflow Languages. Languages for Embedded Systems. Prof. Stephen A. Edwards. March Columbia University

Embedded Systems 8. Identifying, modeling and documenting how data moves around an information system. Dataflow modeling examines

Modelling, Analysis and Scheduling with Dataflow Models

Fundamental Algorithms for System Modeling, Analysis, and Optimization

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Embedded Systems 7. Models of computation for embedded systems

Embedded Systems 7 BF - ES - 1 -

fakultät für informatik informatik 12 technische universität dortmund Data flow models Peter Marwedel TU Dortmund, Informatik /10/08

Computational Models for Concurrent Streaming Applications

Hardware Software Codesign

SDL. Jian-Jia Chen (slides are based on Peter Marwedel) TU Dortmund, Informatik 年 10 月 18 日. technische universität dortmund

Reliable Embedded Multimedia Systems?

Computational Process Networks a model and framework for high-throughput signal processing

Hierarchical FSMs with Multiple CMs

Reliable Dynamic Embedded Data Processing Systems

FSMs & message passing: SDL

Compositionality in Synchronous Data Flow: Modular Code Generation from Hierarchical SDF Graphs

Concurrent Models of Computation

HW/SW Codesign. Exercise 2: Kahn Process Networks and Synchronous Data Flows

EE382N.23: Embedded System Design and Modeling

Embedded Systems CS - ES

By: Chaitanya Settaluri Devendra Kalia

Tokens vs. Signals: On Conformance between Formal Models of Dataflow and Hardware

From synchronous models to distributed, asynchronous architectures

Dynamic Dataflow Graphs

Modelling and simulation of guaranteed throughput channels of a hard real-time multiprocessor system

Lecture 4: Synchronous Data Flow Graphs - HJ94 goal: Skiing down a mountain

Symbolic Buffer Sizing for Throughput-Optimal Scheduling of Dataflow Graphs

ESE532: System-on-a-Chip Architecture. Today. Process. Message FIFO. Thread. Dataflow Process Model Motivation Issues Abstraction Recommended Approach

Towards Translating FSM-SADF to Timed Automata

Main application of SDF: DSP hardware modeling

PROGRAM ANALYSIS & SYNTHESIS

Implementation of Process Networks in Java

Petri Nets ee249 Fall 2000

A Schedulability-Preserving Transformation Scheme from Boolean- Controlled Dataflow Networks to Petri Nets

EE213A - EE298-2 Lecture 8

Bounded Scheduling of Process Networks. Thomas M. Parks. B.S.E (Princeton University) in the

EE249 Discussion Petri Nets: Properties, Analysis and Applications - T. Murata. Chang-Ching Wu 10/9/2007

Deadlock Avoidance for Streaming Applications with Split-Join Structure: Two Case Studies

Compositionality in system design: interfaces everywhere! UC Berkeley

Introduction to Electronic Design Automation. Model of Computation. Model of Computation. Model of Computation

Reactive Process Networks

Asynchronous Elastic Dataflows by Leveraging Clocked EDA

Cover Page. The handle holds various files of this Leiden University dissertation

LabVIEW Based Embedded Design [First Report]

HW/SW Cyber-System Co-Design and Modeling

Building Synchronous DataFlow graphs with UML & MARTE/CCSL

HETEROGENEOUS MULTIPROCESSOR MAPPING FOR REAL-TIME STREAMING SYSTEMS

Hardware-Software Codesign. 6. System Simulation

Performance Analysis of Weakly-Consistent Scenario-Aware Dataflow Graphs

STATIC SCHEDULING FOR CYCLO STATIC DATA FLOW GRAPHS

Parameterized Modeling and Scheduling for Dataflow Graphs 1

TKT-1527 Digital System Design Issues Tero Arpinen. Introduction to SoC modeling and Models of Computation

Node Prefetch Prediction in Dataflow Graphs

Buffer Sizing to Reduce Interference and Increase Throughput of Real-Time Stream Processing Applications

Coverability Graph and Fairness

Applying Models of Computation to OpenCL Pipes for FPGA Computing. Nachiket Kapre + Hiren Patel

Static Scheduling and Code Generation from Dynamic Dataflow Graphs With Integer- Valued Control Streams

Counting Interface Automata and their Application in Static Analysis of Actor Models

Multicore DSP Software Synthesis using Partial Expansion of Dataflow Graphs

Dynamic Dataflow Modeling in Ptolemy II. by Gang Zhou. Research Project

Functional modeling style for efficient SW code generation of video codec applications

Petri Nets ~------~ R-ES-O---N-A-N-C-E-I--se-p-te-m--be-r Applications.

Synchronous dataflow scenarios

Computational Process Networks

CS 6110 S14 Lecture 38 Abstract Interpretation 30 April 2014

Software Synthesis Trade-offs in Dataflow Representations of DSP Applications

Petri Nets. Petri Nets. Petri Net Example. Systems are specified as a directed bipartite graph. The two kinds of nodes in the graph:

Energy-Aware Scheduling for Acyclic Synchronous Data Flows on Multiprocessors

Dynamic Scheduling Implementation to Synchronous Data Flow Graph in DSP Networks

Outline. Petri nets. Introduction Examples Properties Analysis techniques. 1 EE249Fall04

Modeling, Testing and Executing Reo Connectors with the. Reo, Eclipse Coordination Tools

Interface Automata and Actif Actors

Dynamic Dataflow. Seminar on embedded systems

Requirements on the Execution of Kahn Process Networks

A Deterministic Concurrent Language for Embedded Systems

Actors and their composition. Jörn W. Janneck

Modal Models in Ptolemy

A Deterministic Concurrent Language for Embedded Systems

Distributed Deadlock Detection for. Distributed Process Networks

Static Dataflow with Access Patterns: Semantics and Analysis

The Ptolemy II Framework for Visual Languages

Editor. Analyser XML. Scheduler. generator. Code Generator Code. Scheduler. Analyser. Simulator. Controller Synthesizer.

CS294-48: Hardware Design Patterns Berkeley Hardware Pattern Language Version 0.5. Krste Asanovic UC Berkeley Fall 2009

A Predictable RTOS. Mantis Cheng Department of Computer Science University of Victoria

Lecture 6. Abstract Interpretation

Probabilistic Model Checking. Mohammad Roohitavaf

WEEK 5 - APPLICATION OF PETRI NETS. 4.4 Producers-consumers problem with priority

Static Analysis of Actor Networks

Concurrent Models of Computation

Static Dataflow Graphs

DIGITAL VS. ANALOG SIGNAL PROCESSING Digital signal processing (DSP) characterized by: OUTLINE APPLICATIONS OF DIGITAL SIGNAL PROCESSING

System-level Synthesis of Dataflow Applications for FPGAbased Distributed Platforms

Buffer Dimensioning for Throughput Improvement of Dynamic Dataflow Signal Processing Applications on Multi-Core Platforms

Petri Nets. Robert A. McGuigan, Department of Mathematics, Westfield State

Software Synthesis from Dataflow Models for G and LabVIEW

Lecture 7 February 26, 2010

Mapping Multiple Processes onto SPEs of the CELL BE Platform using the SCO Model of Computation

A Deterministic Concurrent Language for Embedded Systems

EE382V: Embedded System Design and Modeling

Transcription:

Overview of Dataflow Languages Waheed Ahmad w.ahmad@utwente.nl

The purpose of models is not to fit the data but to sharpen the questions. Samuel Karlins 11 th R.A Fisher Memorial Lecture Royal Society of London, 1983 In this presentation, we will introduce ourselves with concept of Dataflow Languages examine existing models; Kahn Process Networks and Synchronous Dataflow (SDF) get familiar how new extension of SDF i.e. Scenario- Aware Dataflow overcomes bottlenecks of previous models. 2

Table of Contents 1. Need for Dataflow Languages 2. Dataflow Languages i. Characteristics of Dataflow Languages ii. Benefits of Dataflow Language 3. Kahn Process Networks i. Definition ii. Properties i.e. Monotonic Mapping and Determinism iii. Limitations 4. Synchronous Dataflow i. Definition ii. Firing Rules and Scheduling iii. Limitations 5. Scenario-Aware Dataflow i. Definition and Semantics ii. SDF vs. SADF iii. Example MP3 Decoder 6. Conclusions 3

(1) Why Dataflow Language? To formalise the model of a system. To be able to formally synthesise, analyse, verify qualitative and quantities properties of system. Throughput Analysis Latency Analysis Buffer Analysis Boundedness Deadlock Absence Solid mathematical foundation. 4

(2) Dataflow Languages Consists of directed graph of the data flowing between operations. Each program instruction is represented by a node on the graph. Inputs and outputs of each instruction are denoted by arcs to and from each node. The arcs carry data from one node to another, providing for the flow of data throughout the program. A := X + Y B := Y / 10 C := A * B (a) x y 10 + / * C (b) 5

(2) Basic Characteristics Every process runs concurrently. Processes can be described with imperative code. Processes communicating through FIFO buffers. FIFO buffer helps to decouple source and sink. Therefore source process can continue to produce data without having to wait for the sink to finish processing the previous data 6

(2) Benefits Ability to achieve massive parallelism. Each instruction within a dataflow program can be executed whenever data is waiting on its incoming arcs. It is safe to execute multiple instructions simultaneously without the instructions affecting each other. Representation with nodes and arcs over imperative programming languages: The ability to develop programs graphically. 7

(3) Kahn Process Networks (KPN) Proposed by Kahn in 1974 as a general-purpose scheme for parallel programming Concurrent processes communicate via infinitely large unidirectional FIFO channels. Language augmented with send() and wait() operations that write and read from channels read: destructive and blocking reading an empty channel blocks until data is available write: non-blocking Laid the theoretical foundation for dataflow. Unique attribute: deterministic 8

(3) A Kahn Process From Kahn s original 1974 paper process f(in int u, in int v, out int w) { u int i; bool b = true; for (;;) { i = b? wait(u) : wait(w); printf("%i\n", i); send(i, w); b =!b; } } v Process alternately reads from u and v, prints the data value, and writes it to w f w 9

(3) Monotonic Mapping Any process P in Kahn Process Networks with m inputs and n outputs is a mapping from its input signals to its output signals, PP: SS mm SS nn. A process is monotonic in its mapping from input signals to output signals if s1 s2 PP sss PP(sss) Networks of monotonic processes are always determinate. 10

(3) Determinism A Kahn process uses blocking read, making it impossible to test the presence of input data without consuming them. If a process tries to read from an empty input it is suspended until it has enough input data. A process may not test channel for presence of data. At any given point a process is either enabled or blocked waiting for data on one of its channels. 11

(3) Kahn Process - Limitations Difficult to schedule. Schedule is a finite sequence of node firings which eventually leads back to the initial state of the graph. Might be appropriate for coarse-grain systems. Evaluating correctness and performance is undecidable. 12

(4) Synchronous Dataflow (SDF) Proposed by Edward Lee and David Messerchmitt, Berkeley, 1987 Synchronous Data Flow is a special case of Data Flow in which number of input samples consumed on each input and the number of output samples produced on each output can be specified a priori. 13

(4) Synchronous Dataflow (SDF) A SDF graph consists of nodes and arcs. Nodes are called actors and they represent operations. Arcs represent data values called tokens which stored in first-in first-out (FIFO) queues. The word token represents any data type or any data structure. Nodes are free from side effects. 14

(4) Firing Rules An actor is enabled for execution when tokens equal to its consumption rate are available on all of the inputs. When an actor executes, it always produces and consumes the same fixed amount of tokens. The flow of data through the graph may not depend on values of the data which means SDF graph may not contain datadependent switch statements. Delay is a property of an arc, and a delay of n samples means that n tokens are initially in the queue of that arc. 15

(4) Iterations Balance equations (one for each channel): Schedulable statically f A N = Get a well-defined iteration Decidable: buffer memory requirements deadlock f B M number of tokens consumed number of firings per iteration number of tokens produced fire A { produce N } N channel M fire B { consume M } 16

(4) Scheduling Example Consider the feedforward (acyclic) synchronous dataflow graph shown below: The notation means that When A executes, it produces 20 tokens. When B executes, it consumes 10 tokens and produces 20 tokens. When C executes, it consumes 10 tokens. First step in scheduling is to figure out how many times to execute each actor so that all intermediate tokens that are produced get consumed. This is called load balancing. In the example SDF graph above, we must Fire A 1 time Fire B 2 times Fire C 4 times 17

(4) Schedules - Example Dash represents Single appearance schedule in which each actor appears only once. It results in smallest code size. Short dash represents minimum buffer size schedule. 18

(4) SDF - Limitations Static, periodic behaviour Analysing only the worst-case scenario does not provide a guaranteed conservative bound on the behaviour over all scenarios. On the other hand, creating a single SDF graph from the worst-case execution times of actors over all scenarios, can be too pessimistic. Worst-case Performance Analysis of Synchronous Dataflow Scenarios (Marc Geilen, Sander Stuijk) 19

Goal (5) Scenario-Aware Dataflow Motivation Design-time performance prediction of hard and soft real-time streaming applications running on platforms with guaranteed and/or (lossless) besteffort services. Starting Point SDF cannot express dynamism. KPN don t support relevant analysis techniques. 20

(5) Scenario-Aware Dataflow SADF extends SDF with scenarios Such scenarios denote different modes of operations in which resource requirements can differ considerably. SADF can express Parameterised numbers of communicated tokens. Inactive process Discrete execution time distributions 21

(5) SADF Semantics The vertices of an SADF graph are called processes and represent pieces of behaviour. The edges between processes of an SADF graph are called channels Channels may contain an infinite amount of tokens and they forward tokens in first-in-firstout order. In SADF, production and consumption rates may be fixed or parameterised. 22

(5) SADF Semantics SADF distinguishes two types of processes. Kernels represent the data processing behaviour of a system. Detectors model the control behaviour that dynamically determines the scenarios in which the system operates. SADF also distinguishes two types of channels: Data channels and control channels used to exchange scenariovalued tokens. 23

(5) SADF Semantics Kernel Semantics Wait for scenario-valued token on control inputs. Fix scenario and hence rates and execution time distribution. Detector contain automata to capture occurrences of scenarios Real life: data-dependent control behaviour (normal state machine) Worst/best case only model: non-deterministic state machine Worst/best case and average case model: Markov Chain 24

(5) SADF Semantics Detector Semantics The firing of a detector also starts with determining the scenario. If a detector has control ports, the scenario is determined by interpreting the first token on all its control ports. The subscenario refers to certain consumption/production rates and an execution time distribution of the detector. Together, scenario and subscenario fix the rates and execution time distribution. After establishing the scenario and subscenario, the detector waits until sufficient tokens are available on its input ports. Firing ends with removing the number of tokens from the (data and control) channels as specified by the consumption rates and producing the number of tokens to output ports conform the production rates. 25

(5) SDF vs. SADF MPEG-4 Decoder 26

(5) SADF Example MP3 Decoder 3 Frame types Short (S) Frame = 96 Short Blocks Long (L) Frame = 32 Long Blocks Mixed (M) Frame = 2 Long Blocks + 90 Short Blocks 2 Block types Long (BL) Short (BS) 27

(5) MP3 Decoder 28

(6) Conclusions SADF extends SDF with scenarios SADF can capture dynamism. SADF is fully analysable at design-time Parameterised numbers of communicated tokens Representation of inactive process Discrete execution time distributions 29