Giotto and TMO - PowerPoint PPT Presentation

About This Presentation
Title:

Giotto and TMO

Description:

AAC. AAC. Reservation Q. for t = from 10am to 10:50 am ... Example of AAC (Autonomous Activation Control) {start-during (10am, 10:05am) finish-by 10:10 am, ... – PowerPoint PPT presentation

Number of Views:150
Avg rating:3.0/5.0
Slides: 37
Provided by: yeran
Category:
Tags: tmo | aac | giotto

less

Transcript and Presenter's Notes

Title: Giotto and TMO


1
Giotto and TMO
  • Yerang Hur
  • System Design Research Lab.
  • Dept. of Computer and Information Science

2
Outline
  • Giotto
  • overview
  • programming language
  • code generation
  • TMO
  • overview
  • programming scheme
  • TMOSM (TMO Support Middleware)

3
Overview Embedded Control System Development
Application
decomposes designs simulates
Control Engineer
Control Design
Matlab!
Functionality Timing
Giotto Program
decomposes implements tests
Software Engineer
Distributed Platform
Giotto!
Henzinger, Horowitz, and Kirsch, 2001
4
Automatic Compilation
Giotto Program
Software Engineer
Platform Annotation
Giotto-P Program
Giotto Compiler
Giotto-PS Program
Schedule Annotation
Communication Annotation
Giotto-PSC Program
Giotto Executable
5
Language Primitives
  • Port
  • a physical location connected to a sensor, an
    actuator, an input of a control law
  • Task
  • a periodic task which consists of ports and a
    sequential piece of code with WCET (Worst-Case
    Execution Time)
  • Connection
  • association an input port with an output port
  • Mode
  • a set of tasks and mode switches

6
Giotto Tasks
P
Q
t
0
5
10
15
20
25
A Giotto task reads the values in its input port
in invocation
and writes its results to its output ports at
the end of its period
7
Giotto Tasks
P
Q
t
0
5
10
15
20
25
A Giotto task must finish within the tasks
period.
The compiler uses a suitable scheduling mechanism
which guarantees the deadlines.
Even if P finishes its computation before the
time 15
its results are buffered in P.
8
Giotto Mode
  • A set of concurrent Giotto tasks and mode switch
    predicate
  • Mode switch
  • gets evaluated periodically.
  • may occur in a middle of a round.
  • Example exitfreq 2 if (sensor1 not(sensor2))
    then Stop1()
  • switch predicate is evaluated every (LCM of
    periods of tasks/exitfreq).

9
Example robot system
Someone elses sensor pushed
Stop
Lead
My sensor pushed
Someone elses sensor pushed
My evasion finished
Someone elses evasion finished
Follow
Evade
My sensor pushed
10
Port Declaration
const int STOP 0 //command int com
STOP //mode finished bool fin TRUE //TRUE
means pushed bool sensor1 // robot 1 touch
sensor bool sensor2 // robot 2 touch sensor int
motorL1 STOP // robot 1 left motor int motorR1
STOP // robot 1 right motor int motorL2
STOP // robot 2 left motor int motorR2 STOP
// robot 2 right motor
11
Giotto Program mode Lead1Follow
command1
motorCtr1
motorCtr2
t (ms)
0
100
200
300
400
500
mode Lead1Follow() period 400ms entryfreq 1
taskfreq 1 do int com command1() taskfreq 4
do (int motorL1, int motorR1) motorCtr1(com)
taskfreq 4 do (int motorL2, int motorR2)
motorCtr2(com) exitfreq 2 if (sensor1
not(sensor2)) then Stop1() exitfreq 2 if
(sensor2 not(sensor1)) then Stop2()
12
Giotto Program mode Stop1
command1
motorCtr1
motorCtr2
t (ms)
0
100
200
300
400
500
mode Stop1() period 400ms entryfreq 2
taskfreq 1 do int com command1() taskfreq 2
do (int motorL1, int motorR1) motorCtr1(STOP)
taskfreq 2 do (int motorL2, int motorR2)
motorCtr2(STOP) exitfreq 1 if (TRUE) then
Evade1Stop()
13
Giotto Program mode Evade1Stop
evade1
motorCtr1
t (ms)
0
100
200
300
400
500
mode Evade1Stop() period 400ms entryfreq 1
taskfreq 1 do (int com, bool fin)
evade1() taskfreq 4 do (int motorL1,
motorR1) motorCr1(com) exitfreq 1 if (fin)
then Lead1Follow()
14
Period and Unit
Task P
Task Q
t
0
5
10
15
20
25
Period of mode period of the least frequent
task in a mode
Unit of mode period of mode/ mode switch
frequency
Example mode S with task P, task Q, and mode
switch frequency 4
period of S 20 , unit of S5
15
Mode Switch Example
command1
evade1
motorCtr1
motorCtr2
0
100
200
300
400
500
600
t (ms)
Mode switch
Mode switch
from Lead1Follow to Stop1
from Stop1 to Evade1Stop
16
Code Generation
  • Users provide platform-related description called
    annotation.
  • Annotation
  • P annotation (Platform) specifies names, IP
    addresses, and priorities for each host.
  • S annotation (Schedule) specifies task-to-host
    mappings and the priorities of the tasks.
  • C annotation (Communication) specifies
    port-to-network mappings and the time slots of
    the ports.

17
Example P annotation (Platform)
Two hosts bot1 and bot2 are connected by a
network net12.
host bot1 address 192.168.0.1 priorities p0 gt
p1 host bot2 address 192.168.0.2 priorities q0
gt q1 net n12 address 192.168.0.0 connects
bot1, bot2
18
Example S annotation (Schedule)
Task command1 is mapped to host bot1 with
priority p1. Task motorCtr1 is mapped to host
bot1 with priority p0. Task motorCtr2 is mapped
to host bot2 with priority q0.
mode Lead1Follow() period 400ms entryfreq 1
taskfreq 1 do int com command1() host bot1
priority p1 taskfreq 4 do (int motorL1, int
motorR1) motorCtr1(com) host bot1
priority p0 taskfreq 4 do (int motorL2, int
motorR2) motorCtr2(com) host bot2
prioty q0 ...
19
Example C annotation (Communication)
SensorX ports are exchanged between the robots
twice per round, because he mode switch predicate
is evaluated every 200ms. Signals from sensor1 is
delivered from bot1 to bot2. Signals from sensor2
is delivered from bot2 to bot1.
mode Lead1Follow() period 400ms entryfreq 1
... net n12 slots s0 (0,20), s1 (20,40),
s2 (200,220), s3 (220,240),
s4 (340, 360) push sensor1 from bot1 to
bot2 in net n12 slots s0, s2 push sensor2
from bot2 to bot1 in net n12 slots s1, s3
push com from bot1 to bot2 in net n12 slots s4
20
Putting It TogetherLead1Follow Mode with
Annotation Details
sensor1
sensor2
com
command1
motorCtr1
motorCtr2
0
100
200
300
400
500
21
Summary Giotto
  • Giotto is a design methodology for embedded
    control systems.
  • The programmer specifies the platform-independent
    programmers model in the time-triggered
    programming language.
  • The Giotto compiler produces executables combined
    with run-time library for a particular platform.

22
TMO (Time-triggered Message-triggered Objects)
  • Overview
  • Programming Scheme
  • TMOSM (TMO Support Middleware)

23
Overview Real-Time Extension of Conventional
Objects
  • Spontaneous Method (SpM) SpM executions are
    triggered when the clock reaches specific values
    determined at design time.
  • Service Method (SvM) SvM executions are
    triggered by service request messages.
  • Basic Concurrency Constraint (BCC) SpM
    executions have the higher priority over SvM
    executions.
  • Deadline A deadline is associated with an output
    action and completion of a method.

24
Time-triggered Spontaneous Methods (SpMs)
Example of AAC (Autonomous Activation Control)
for t from 10am to 1050 am every 30
min start-during (t, t5 min) finish-by t10 min
start-during (10am, 1005am) finish-by 1010
am, start-during (1030am, 1035am) finish-by
1040 am
25
Programming Schme
Capabilities for accessing other
TMOs, channels, and I/O devices
Object Data Store (ODS)
Time-triggered spontaneous messages
Service request Q
Message-triggered service methods
26
Example CAMIN (Coordinated Anti-Missile
Interceptor Network)
27
Example CAMIN Theater
Step 0 high-level specification of the initial
application environment
Step 1 high-level design of application
environment such as incorporation of sensors,
actuators, and control strategy
ODS
Theater Space sky land sea
Defense target in land command post
Defense target in sea command ship (0-n) vs
Radar in land Interceptor launcher in land
Fighter airplanes
28
Example (continued)
SpM
Update the state of the defense target in
land Update the state of defense target in sea
Update the state of the radar in land Update
the state of the interceptor launcher in land
Update the state of the fighter airplanes
SvM
Accept vs (invoked by Alien TMO)
29
TMOSM (TMO Support Middleware)
  • A middleware architecture for TMO execution
  • Windows NT implementation
  • User-friendly C API called TMOSL
  • UDP-based communication
  • CORBA is also supported

30
TMOSM
  • Timer interrupts activate middleware thread WTST
    (Watchdog Timer and Scheduler Thread).
  • WTST manages and scheduling and activation all
    other threads in TMOSM.
  • Allocates a time slice for every thread.
  • Checks for deadline violation of threads
    associated with each TMOs methods.
  • LIIT (Local I/O Interface Thread) a periodic
    middleware thread processing I/O functions.
  • ICT (Incoming Communication Thread) a periodic
    middleware thread managing the distribution of
    messages coming through the communication network.

31
TMOSM
TMO
TMO
TMOSM
SpM thread
SvM thread
ICT
LIIT
WTST
timer interrupt
Windows NT
Communication Networks
32
TMOSM Scheduling Cycle
- VMST (Virtual Machine System Thread)
time-slices not allocated to middleware threads
are called a VMST time-slice.
- A VMST time-slice is distributed to application
threads associated with TMOs
33
SpM Activation
  • WTST periodically examines the registered SpMs
    and put it to SpM reservationQ.
  • WTST moves a SpM to readyQ when the time for its
    execution arrives.
  • The application scheduler selects a thread from
    readyQ according to the scheduling policy during
    a time-slice for VMST.

34
SvM Execution
  • When receiving a service request message, ICT
    places an identified SvM thread to SvM waitingQ.
  • WTST checks for a possible conflict with SpM
    execution and moves it to readyQ.
  • The application scheduler selects a thread from
    readyQ according to the scheduling policy during
    a time-slice for VMST.

35
Other Works Related TMO
  • DREAM (Distributed Real-time Ever Available
    Microcomputing) kernel
  • operating system kernel supporting real-time
    processes
  • TMOSL (TMO Support Library)
  • Collection of C classes
  • Interface between TMOSM and applications
  • CORBA-compliant TMO

36
Summary TMO
  • TMO is a programming scheme based on both
    time-triggered and message-triggered executions.
  • TMO applications are distributed real-time
    systems.
Write a Comment
User Comments (0)
About PowerShow.com