嵌入式系统导论-实验课-3-slides.pdf
文本预览下载声明
1
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Introduction to Embedded Systems
Exercise 3:
StateCharts
Kai Huang
huangk@in.tum.de
07.11.2014
2
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
StateCharts
? Specification model
? Suitable for complex systems, since they can
model hierarchy and concurrency
? Transitions can be guarded by conditions
? Transitions can be associated with actions
3
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Basic States and Super-States
? Basic States: states not composed of other
states
? Super-States: states containing other states
S: Super-State
E: Basic State
E: Sub-State of S
S: Ancestor State of E
4
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Hierarchy: OR-Super-States
? OR-Super-State:
? a Super-State A in which exactly one of its
(immediate) sub-states (X, Y, Z) is active
whenever A is active
Y Z
X
A
sub-states are
related by
“exclusive-or”
5
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Concurrency: AND-Super-States
? AND-Super-State:
? a Super-State A in which all its (immediate)
sub-states (B, C) are active whenever A is
active
A
X Y
B C
sub-states
are related
by “and”
6
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Tree Representation
A
B E
C D F M
G H
I K L
C: Basic State
B: OR-Super-State
A: AND-Super-State
? Super-States
have at least
one children
? Basic States
have no
children
7
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Set of States
? Basic States
? State
? OR-Super-States
? Union of children
? AND-Super-States
? Cartesian product of children
(computed traversing the tree from leaves to root)
8
Swiss Federal
Institute of Technology
Computer Engineering
and Networks Laboratory
Edge Labels
? Events: exist only until next model evaluation
?
显示全部