Table of Contents

Dataflow Structure plugin

Familiarise yourself with Workcraft interface to learn its common features that are available for all plugins.

This plugin is intended for capturing, simulation and verification of Dataflow Structure (DFS) models. It supports Static and Dynamic aspects of this model and also spread token and counterflow execution semantics. For simulation and verification a DFS model is automatically translated into a Signal Transition Graph (STG) that allows re-using the features of the STG plugin.

Capturing

In order to create a DFS model choose File→Create work… menu item and in the New work dialogue select Dataflow Structure as the model type.

Components

Dataflow Structures plugin supports 3 families of components:

Select the corresponding generator tool to create components of a needed type.

Static components

The following terminology is used to describe the execution semantics of DFS model:

The above rules of token propagation define a so-called spread token execution semantics. A token can occupy several adjacent registers: its head expands to the succeeding registers, while its tail catches up.

Note that logic components can model Early evaluation – see the corresponding entry in the Property editor. An early evaluating logic component is denoted by EE label and its evaluation rules change as follows:

Dynamic components

As the name suggests, dynamic components enable the change of a Dataflow Structure in run-time, e.g. to selectively include, exclude or reorder the sections of a dataflow pipeline.

In addition to the terminology introduced for the static components, the dynamic components operate with two types of tokens: True or False. We use terms T-marked and F-marked to specify the state of a marked dynamic register.

In a control register True and False tokens are depicted as empty circles with “T” and “F” symbols respectively. In the push and pop registers True tokens are depicted as filled circles (the same as for static registers), while False tokens are depicted as empty circles.

Counterflow components

The counterflow components are introduced to enable forward and backward flow of tokens. The forward flow is similar to the token propagation in standard static components, while the backward flow of tokens is used to inform the preceding components that their output is no longer needed. This so-called counterflow execution semantics is useful to model preemption and speculative execution.

The details of counterflow execution are too complex for this document and can be found elsewhere [1]. Note that counterflow components are intended for experienced DFS users.

Connections

When the connection tool [C] Connect is active you can connect DFS components. Several connections may start at the same component and a component can have several incoming connections. If an incorrect connection is attempted (e.g. a connection from a dynamic component to a counterflow component) then a warning message will be issued.

Capturing DFS model with static and dynamic components

Note that the type of token received by a control register can be inverted by setting the Inverting property of the corresponding connection (the inversion is depicted as a small bubble at the arrowhead of the connection). This can be used to dynamically include or exclude a portion of a pipeline. In the above example the control register c0 dynamically decides which branch of the pipeline is exercised: p0→l6→r3→l7→p1 or p2→l1→p3.

Editing

For model editing, activate the selection tool [S] Select. All the standard editing features (select, drag-and-drop, delete, copy, undo, group, etc.) work the same – see generic help on Selection controls and Property editor for details.

Similar to all the other models, textual comments can be created by activating the [N] Text Note tool and clicking the editor panel in the position you want to put the text. Double-click on the note box to edit its text label in-place or do it through the property editor panel when the note is selected.

Cycle analysis

All the components can be associated with a Delay value in the Property editor (zero by default) that can be utilised for performance analysis of the Dataflow Structures. For this activate the cycle analyser tool [A] Cycle analyser – several slowest cycles (10 by default) will be enumerated in the Tool controls panel and the slowest nodes of the whole DFS graph will be highlighted in red. Selecting a cycle in the Tools control highlights it on the DFS graph and the slowest components of that cycle are also highlighted in red.

Cycle analysis

Simulation

For simulation of a DFS model activate the simulation tool [M] Simulate. The enabled components are highlighted and can be executed by clicking them. The simulation tool controls provide the means for analysis and navigation through the simulation trace, see generic help on Simulation controls for details.

Simulation

Note that simulation of a DFS model is just an abstraction over the simulation of an automatically generated STG representation of the DFS components.

Verification

Verification of a DFS model done via translation into an STG model and formulation of verification tasks in terms of the obtained STG. A DFS can be checked for deadlocks and output persistency by choosing a corresponding item from Verification menu:

For example, if the inverting property of some arcs is set incorrectly (notice that we intentionally swapped the arcs highlighted in blue), then verification reveals the reachability of a deadlock state. The verification tool reports a trace (or a several traces) leading to the problematic state. A reported trace can be simulated (by pressing the  Play  button next to the trace) to better understand the causes of the problem.

Detection of a deadlock


[1] D. Sokolov, I. Poliakov, A. Yakovlev: “Analysis of static data flow structures”, Fundamenta Informaticae, vol. 88(4), pp. 581–610, 2008.