tinygals: a programming model for event-driven embedded systems elaine cheong uc berkeley ptolemy...
Post on 19-Dec-2015
222 views
TRANSCRIPT
TinyGALS: A Programming Model for Event-Driven Embedded Systems
Elaine CheongUC Berkeley Ptolemy Group / PARC
Judy Liebman (LLNL)Jie Liu, Feng Zhao (PARC)
Fifth Biennial Ptolemy MiniconferenceBerkeley, CA, May 9, 2003
Introduction Embedded software architecture today
Inherited from writing device drivers and optimizing assembly code.
Poor scalability. Poor common infrastructure. Poor resource management.
Embedded software architecture tomorrow
Reusable, reconfigurable components. Easy to use. Fast prototyping. Software synthesis
Motivation
Application characteristicsAd-hoc networked embedded systemsLow-powerUnstructured, unsynchronized eventsCollaborative nodes
Local communication (peer-to-peer)Global communication (ad-hoc routing)
Example: Sensor Networks
Base
Sensing motes
TinyGALS
POT
Clock logic
CLOCK
Get sensor data
PHOTO
sensing
clock Send local data
GENERIC_COMM
Send BLESS mesg
BLESS send
Receive packets
GENERIC_COMM
receiving
Update local data
init
init
initinit
start
global_nodedata;global_parent_id;
BLESS receive
GENERIC_COMM
BLESS forward
GENERIC_COMM
Update Routing Table
Routing Table
TinyGALS Architecture
initComponent
Module A
__________________________________________________________________________________________________________________ outportA1
SynchronousCommunication
Component
Module B
ComponentinportB1
AsynchronousCommunication
Scheduler
EventQueue
start
TinyGUYSglobal name
SynchronousRead
AsynchronousWrite
Guarded Variable
TinyGUYSlocal name
Globally Asynchronous Locally Synchronous
Guarded Yet Synchronous
Software Synthesis
app_start()
app_init()
init
Module B
start
Module A
EventQueue
PARAM_PUT()
PARAM_GET()data
structures
A_out1()
B_in1_put()BCOMP1_INPUT()
data structures
Scheduler
Target Tracking Example:Before and After…
MAIN
TARGET_TRACKING
CLOCK
GENERIC_COMM
BLESS
Init
Clock
Send
Send done
LEDS
Send
Send done
Receive channel 8S
end
Send done
Receive channel 7
Init
Init Start
Init
Fire event
On Off
PHOTO
Init
Get data
Data ready
POT
Clock logic
CLOCK
Get sensor data
PHOTO
sensing
clock Send local data
GENERIC_COMM
Send BLESS mesg
BLESS send
Receive packets
GENERIC_COMM
receiving
Update local data
init
init
initinit
start
global_nodedata;global_parent_id;
BLESS receive
GENERIC_COMM
BLESS forward
GENERIC_COMM
Update Routing Table
Routing Table
OS View (TinyOS) TinyGALS View
Memory Usage
Code Size Scheduler Target counting application
TinyOS 86 bytes 19929 bytes
TinyGALS 112 bytes 24750 bytes
Future Work
Port to NesC language (TinyOS).Implement as Ptolemy domain?
Compare to CI domain.Blocking write: retry when queue is full.Priority scheduling algorithm with queue
insertions.Run-time reconfigurability of modules.Heterarchy: distributed multi-tasking.
Conclusions
TinyGALS provides a globally asynchronous, locally synchronous model of computation for event-driven embedded software.
Allows reuse of software components. TinyGUYS provides protected, quick access to
global data. Software synthesis tools created to generate
communication and scheduling code.
http://ptolemy.eecs.berkeley.edu/papers/03/TinyGALS/