Title: Giotto
1Giotto
- Embedded Control Systems Development
- with
www.eecs.berkeley.edu/fresco/giotto
Thomas A. Henzinger Ben Horowitz
Christoph M. Kirsch University of California,
Berkeley
(presented by Marius Minea)
2Embedded Systems Development
Application
models derives simulates
Control Engineer
Control Design
Matlab
Functionality Timing
Giotto Program
decomposes implements tests
Software Engineer
Distributed Platform
Giotto!
3 Our Approach
- The Time-Triggered Paradigm Kopetz
- -all communication activities triggered by
clock - -predictability (i.e., verifiability)
- -safety-critical applications (e.g.,
automotive) - TTA hardware protocol realization
- Giotto programming language realization
4Motivating Example Flight Control (DARPA SEC
Program)
5Periodic Tasks
roll control
Sensor tasks
Control tasks
Actuator tasks
6200 Hz
1 kHz
200 Hz
1 kHz
7Modes
- Control system of airplane is designed to operate
in different modes. In each mode a particular
set of controllers is deployed. There are
switches between modes. - For example
- Navigational modes (taxi, takeoff, cruise).
- Maneuver modes (dive, roll).
- Fault tolerance modes (track which hardware is
working).
8Giotto
- Giotto is a tool-supported methodology for
embedded control systems design - Giotto consists of
- a time-triggered and platform-independent
programming language - a compiler
- a runtime library
- Giotto provides an abstract programmers model
9The Giotto Methodology
Giotto Program
Functionality Timing
Compilation
Giotto Executable
Scheduling Communication
Giotto Runtime Library
RTOS, e.g., VxWorks
Distributed Platform
10Task Definition Abstract Syntax
State
f
Input ports
Output ports
Period
11Task Invocation Time-Deterministic Semantics
Task
State
f
Input ports
Output ports
Period 10ms
Time
Read _at_ time t
Write _at_ time t10ms
12Task Invocation Time-Deterministic Semantics
Actual time the task uses the CPU (may be
preempted)
Task
State
f
Input ports
Output ports
Period 10ms
Dont care
Time
Read _at_ time t
Write _at_ time t10ms
13Input/OutputSensors-Control Law-Actuators
State
f
Sensors
Actuators
14Inter-task Communication Connections
P
Q
15Different Periods
Task
P
Q
Q
Time
t
t10ms
t
t5ms
t5ms
16Q-to-Q Connection
P
Q
17Zero-Delay Semantics
Task
P
Q
Q
Time
t
t
18P-to-Q Connection
P
Q
19Zero-Delay Semantics
Task
P
Q
Q
Time
t
t
20Time-Deterministic Semantics
Task
P
Perhaps on same CPU
Q
Q
Dont care
Time
t5ms
t5ms
t
21Time-Deterministic Semantics
Task
P
Q
Q
Time
t5ms
t5ms
t
22Time-Deterministic Semantics
Task
P
Most recent value guaranteed to be available (may
have to be buffered)
Q
Q
Time
t5ms
t5ms
t
23Time-Deterministic Semantics
Task
P
Q
Q
t5ms
t5ms
t
t10ms
t10ms
24An Abstract Programmers Model
High-Level Programming
Giotto
Input/Output Ports
Functionality
Time-Determ. Computation Zero-Delay Communication
Timing
25Giotto Modes
Some Motivations
- Multi-modal control
- Fault tolerance
- Event modeling
- Resource sharing
- Uncertain environments
26Giotto Modes
- A mode is a parameterized set of tasks.
- A Giotto program consists of a set of modes and
mode switches. - A Giotto system is in a single mode at any given
time.
27Abstract Syntax of a Mode
Entry Port
P
1
Q
2
Period 10ms
Frequencies
28Abstract Syntax of a Mode Switch
Connection
M
M
Frequency 2 evaluation of trigger predicate
every 5ms
Trigger predicate
29Mode M
P
1
Connection
Q
2
Period 10ms
30Mode M
P
1
R
4
Connection
Period 10ms
31Concrete Syntax
start m ( ) mode m ( ) period 10 ms
taskfreq 1 do P ( ) taskfreq 2 do Q (
x, y ) exitfreq 2 if y 5 then m ( y
) mode m ( int z ) period 10 ms
taskfreq 1 do P ( ) taskfreq 4 do
R ( x, z )
Tasks are C procedures
32Semantics of the Mode Switch
Task
P
P
Q
Q
R
Mode Switch _at_ t10ms
t10ms
Easy Case
33Semantics of the Mode Switch
Task
P
Q
Time
Mode Switch _at_ t5ms
Interesting Case
34Semantics of the Mode Switch
Task
P
P
Q
R
R
R
t5ms
t5ms
t7.5ms
t10ms
35Mode M
P
1
Connection
Q
2
36Semantics of the Mode Switch
Task
P
Mode switch already finished!
Q
R
R
Time
t5ms
t5ms
37Mode M
P
1
R
4
Connection
38Semantics of the Mode Switch
Task
P
Q
R
R
Time
t5ms
t5ms
39Mode M
P
1
R
4
Connection
40Semantics of the Mode Switch
Task
P
Q
R
R
Time
t5ms
t5ms
41Mode M
P
1
R
4
Connection
42Semantics of the Mode Switch
Task
P
Initial value
Q
R
R
Time
t5ms
t5ms
43Semantics of the Mode Switch
Task
P
Q
R
R
Time
44The Abstract Programmers Model
High-Level Programming
Giotto
Input/Output Ports
Functionality
Time-Determ. Computation Zero-Delay Communication
Timing
Modes
Decomposition
45The Giotto Compiler
- Automatic code generation
- Compilation directives in the form of Giotto
annotations for distributed platforms
46The Giotto Compiler
Giotto Program
- Two possible answers
- Giotto executable
- Not schedulable
Giotto Compiler
(either because program overconstrained,
or because compiler not smart enough)
Giotto Executable
47Closing the GapGiotto-Architecture Annotations
Giotto Program
Hosts (CPUs), Nets, Worst-case execution /
transmission times
Giotto-A Program
Giotto Compiler
Distributed Platform
48Closing the GapGiotto-Mapping Annotations
Giotto Program
Giotto-A Program
Hosts, Nets, Performance
Tasks to Hosts, Connections to Nets
Giotto-AM Program
Giotto Compiler
Distributed Platform
49Closing the GapGiotto-Schedule Annotations
Giotto Program
Giotto-A Program
Hosts, Nets, Performance
Tasks to Hosts, Connections to Nets
Giotto-AM Program
Tasks to Priorities (say), Connections to TDMA
(say)
Giotto-AMS Program
Giotto Compiler
Distributed Platform
50Platform Dependency
Computation
Task
P
Q
Q
Time
51Giotto-AM
Task
Host A
P
Host A
Host A
Q
Q
Time
52Giotto-AMS
Task
Host A
P
2.
Host A
Host A
Q
Q
1.
1.
Priority
Time
53Platform Dependency
Task
P
Q
R
R
Communication
Time
54Giotto-AMS
Task
Host A
P
Network C
Host B
B
B
Q
R
R
Time slot for connection
Time
t10ms
Real deadline for P!
55The Giotto Runtime Library
Giotto Program
Functionality Timing
Compilation
Giotto Executable
Scheduling Communication
Giotto Runtime Library
RTOS, e.g., VxWorks
Distributed Platform
56The Giotto Runtime Library
Giotto Runtime Library
Scheduling Communication
- Task, connection mapping
- Task priorities
- Connection TDMA slots
Abstraction
RTOS, e.g., VxWorks
Real-Time OS Services
- Timer service
- Scheduling service
- TCP/IP stack
Distributed Platform
57Pure Lego Demo
58Heterogeneous Lego-VxWorks Demo
VxWorks
Lego
Wireless Ethernet Infrared bridge
59Behavior of each Robot
Lead
Someone elses sensor pushed
Stop
Someone elses evading finished
My sensor pushed
Evading finished
Follow
Evade
My sensor pushed
60Soon to Fly GiottoETH Zurich Helicopter