The syntax of a dataflow model has the following pattern
dataflow graph <name> {
inputs <inputs>
outputs <outputs>
<edges>
}
<inputsignals>
Example
The following is an example of a dataflow model.
dataflow graph Model {
inputs i
outputs o
i --> A
A[1] ---> B
B[2.5] - initial tokens: 1 --> A
B --> o
}
input signals
i = [-inf, 0, 5, 10]
i2= [0.0, 2.0, 4.0, 6.0]
Syntax of Dataflow Models
Dataflow models are a graph-like structure and the discussion about syntax of graphs applies. The syntax of a dataflow model always starts with dataflow graph <name> {. It ends with a closing curly bracket }. If the graph has inputs, they can be declared as:
inputs <input1>, <input2>, ...
If the graph has outputs, they can be declared as:
outputs <output1>, <output2>, ...
The core of the description of the dataflow model is in the form of dependencies A -- <annotations> --> B. A is either an actor or an input. B is either an actor or an output.
Actors can be followed by a specification of the firing duration. Actors without firing duration specification have a default duration of 0. The specification needs to be added only once with an arbitrary mention of the actor. The specification has the form [execution time: <d>], or it can be shortened to [<d>].
Optional <annotations> is one or more of the following, separated by ;
-
initial tokens: <n>declares that the channel hasninitial tokens; it can be shortened to just<n> -
production rate: <n>declares the production rate of the producing actor onto the channel for a multi-rate graph -
consumption rate: <n>declares the consumption rate of the consuming actor from the channel for a multi-rate graph -
name: <channelname>gives the channel a name
The specification of the dataflow graph is optionally followed by the definition of input signals that can be offered to the inputs of the graph. An input signal is specified as follows.
<name> = [ t1, t2, t3, ...] where t1, t2,t3, are time stamps, which can be written is integers or floating point numbers. The value can also be -inf to denote the value minus infinity.
<name> is a name for the signal. If it corresponds to the name of an input of the dataflow graph it may be automatically coupled. Alternative signals may be defined that can later be assigned to inputs of the dataflow graph.