11-DFD and CDFG-19-08-2024
11-DFD and CDFG-19-08-2024
Hardware/Software Introduction
1
Outline
X = 1; X=1
Y = X + 1;
Y=X+1
– I is a set of inputs {i0, i1, …, im} u,d,o, t = 1,0,0,0 GoingUp !(req > floor)
• I,O,V may represent complex data types (i.e., integers, floating point, etc.)
• F,H may include arithmetic operations
• H is an action function, not just an output function
– Describes variable updates as well as outputs
• Complete system state now consists of current state, si, and values of all variables
1. List all possible states 2. Declare all variables (none in this example)
3. For each state, list possible transitions, with conditions, to other states
4. For each state and/or transition, req > floor
list associated actions
5. For each state, ensure exclusive u,d,o, t = 1,0,0,0 GoingUp !(req > floor)
and complete exiting transition
conditions req > floor timer < 10
u,d,o,t = 0,0,1,0
• No two exiting conditions can Idle !(timer < 10) DoorOpen
be true at same time req == floor
req < floor
u,d,o,t = 0,0,1,1
– Otherwise nondeterministic
state machine u,d,o,t = 0,1,0,0
!(req<floor)
GoingDn
• One condition must be true at
any given time u is up, d is down, o is open
req < floor
– Reducing explicit transitions t is timer_start
• Known as OR-decomposition
– States can execute concurrently
• Known as AND-decomposition
Concurrency
• Statecharts
B
– Graphical language to capture HCFSM C D
– timeout: transition with time limit as condition C1 D1
• When all of node’s input edges have at least one token, node may *
fire
Z
• When node fires, it consumes input tokens processes Nodes with arithmetic
transformation and generates output token transformations
• Nodes may fire simultaneously A B C D
• Several commercial tools support graphical languages for capture
modulate convolve
of dataflow model
t1 t2
– Can automatically translate to concurrent process model for
transform
implementation
– Each node becomes a process Z
Nodes with more complex
transformations
• Don’t need real-time operating system and its overhead tt1 tt2
•
transform
How would you map this model to a sequential programming
language? Try it... tZ
appearance” schedules
Synchronous dataflow
– Only one statement needed to call each node’s associated
procedure
• Allows procedure inlining without code explosion, thus reducing
overhead even more
each other
floor
up1 up/down
up2 buttons on
dn2 each
up3 floor
dn3
...
dnN