110 likes | 154 Views
TinyGALS: A Programming Model for Event-Driven Embedded Systems. Elaine Cheong, Judy Liebman University of California, Berkeley Jie Liu, Feng Zhao Palo Alto Research Center. ACM Symposium on Applied Computing Melbourne, FL, March 9-12, 2003. Embedded software architecture tomorrow
E N D
TinyGALS: A Programming Model for Event-Driven Embedded Systems Elaine Cheong, Judy Liebman University of California, Berkeley Jie Liu, Feng Zhao Palo Alto Research Center ACM Symposium on Applied Computing Melbourne, FL, March 9-12, 2003
Embedded software architecture tomorrow • Reusable, reconfigurable components. • Easy to use. • Fast prototyping. • Software synthesis Introduction • Embedded software architecture today • Inherited from writing device drivers and optimizing assembly code. • Poor scalability. • Poor common infrastructure. • Poor resource management.
Motivation • Application characteristics • Ad-hoc networked embedded systems • Low-power • Unstructured, unsynchronized events • Collaborative nodes • Local communication (peer-to-peer) • Global communication (ad-hoc routing)
Example: Sensor Networks Sensing motes Base
global_nodedata; global_parent_id; sensing clock Get sensor data Send local data init init init POT PHOTO GENERIC_COMM Clock logic receiving start CLOCK Receive packets Update local data init Update Routing Table GENERIC_COMM BLESS send BLESS forward Send BLESS mesg Routing Table GENERIC_COMM BLESS receive GENERIC_COMM TinyGALS
Scheduler Guarded Variable Asynchronous Write Synchronous Read Event Queue Module A Module B TinyGUYS local name init Component ___________________ ___________________ ___________________ ___________________ ___________________ ___________________ Component Component start outportA1 inportB1 Synchronous Communication Asynchronous Communication TinyGALS Architecture Guarded Yet Synchronous TinyGUYS global name Globally Asynchronous Locally Synchronous
PARAM_GET() data structures data structures Event Queue PARAM_PUT() Module A Module B app_init() init start app_start() A_out1() BCOMP1_INPUT() B_in1_put() Software Synthesis Scheduler
global_nodedata; global_parent_id; sensing MAIN clock Get sensor data Send local data Init init Init Start init init POT PHOTO GENERIC_COMM TARGET_TRACKING Clock logic Send done Init Init Init Clock Send receiving Send Get data Fire event Send done Data ready start BLESS Receive channel 8 CLOCK Receive packets Update local data init Send On Off Update Routing Table Send done GENERIC_COMM LEDS CLOCK PHOTO Receive channel 7 BLESS send BLESS forward Send BLESS mesg GENERIC_COMM Routing Table GENERIC_COMM BLESS receive GENERIC_COMM Target Tracking Example:Before and After… OS View (TinyOS) TinyGALS View
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.
Future Work • Blocking write: retry when queue is full. • Priority scheduling algorithm with queue insertions. • Run-time reconfigurability of modules. • Heterarchy: distributed multi-tasking.