DFG, FSM, Petri-Net, UML
DFG, FSM, Petri-Net, UML
The Data Flow Graph (DFG) model translates the data processing
requirements into a data flow graph.
The Data Flow Graph (DFG) is a data driven model in which the program
execution is determined by data. This model emphasizes on the data and
operations on the data which transforms the input data to output data.
Indeed DFG is a visual model in which the operation on the data (process) is
represented using a block (circle) and data flow is represented using arrows.
An inward arrow to the process (circle) represents input data and an outward
arrow from the process (circle) represents output data in DFG notation.
Embedded applications which are computational intensive and data driven are
modeled using the DFG model. DSP applications are typical examples for it.
Suppose one of the functions in our application contains the computational
requirement x=a+b; and y=x-c. Following figure shows the implementation of
a DFG model for implementing these requirements.
In a DFG model, a data path is the data flow path from input to output. A DFG
model is said to be acyclic DFG if it doesn't contain multiple values for the
input variable and multiple output values for a given set of inputs. A DFG
model translates the program as a single sequential process execution.
ii) FSM:
iii) Petri-net:
FSM is limited in a way. It cannot have two states active at the same moment,
next to each other.
The UML statechart is an attempt to overcome this limitation while retaining its
good features.
UML (Unified Modeling Language) is designed to specify, visualize, construct
and document software-intensive systems.
The essential syntax of statecharts is very much like FSM's.
In a statechart, it is possible that there are states within states, so there is a
kind of a hierarchical structure. They are called substates and superstates or
parentstates.
Another possibility is concurrent states. By using branching, a state can be
followed by more than one other state. Each transition can be guarded with its
own condition.
When more than one condition is satisfied, two states can be active at the
same moment.
Compared to FSM, the design of an embedded system can be visualized a lot
better and less complicated with sub- and superstates.
A good example to explain the usage of a statechart is a soda machine.