1 / 9

Elaine Cheong Yang Zhao December 8, 2001

Modeling Event-Based Systems in Ptolemy II EE249: Design of Embedded Systems: Models, Validation, and Synthesis. Elaine Cheong Yang Zhao December 8, 2001. Outline. Project Goals TinyOS Architecture Demo 1 Demo 2 Conclusions. Our Goals. Problem:

dora-craig
Download Presentation

Elaine Cheong Yang Zhao December 8, 2001

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modeling Event-Based Systems in Ptolemy IIEE249: Design of Embedded Systems: Models, Validation, and Synthesis Elaine Cheong Yang Zhao December 8, 2001

  2. Outline • Project Goals • TinyOS Architecture • Demo 1 • Demo 2 • Conclusions

  3. Our Goals • Problem: • TinyOS applications can be difficult to program and debug. • Our Project: • Understand TinyOS architecture. • Model TinyOS in Ptolemy II. • Investigate different models of computation.

  4. send_msg (addr, type, data) msg_send_done (success) msg_rec (type, data) power(mode) init Messaging Component Internal State send_msg_thread init Power (mode) TX_packet (buf) RX_packet_done (buffer) TX_packet_done (success) Commands Events TinyOS Architecture • Component • Frame • Command handlers • Event handlers • Tasks

  5. Sample TinyOS Application Component B Internal State event2 Component A Internal State Task 1 event1 Component C Clock Internal State Internal State LEDs HW clock

  6. Sample TinyOS Code // Component A char TOS_EVENT (Event_1) () { TOS_POST_TASK (Task_1); TOS_SIGNAL_EVENT (Event_2); return 1; } TOS_TASK () { delay (2s); } // Component B char TOS_EVENT (Event_2) () { TOS_CALL_COMMAND (LEDS_on)(); return 1; } // Component C char TOS_COMMAND (LEDS_on)() { VAR(LEDS_on) = 1; return 1; }

  7. Demo 1: DE/FSM • Discrete Event (DE) domain • New actor: PreemptableTask • Inputs: Input, Interrupt • Output: Output • Finite State Machine (FSM) domain • Models component logic

  8. Demo 2: TM/FSM • Timed Multitasking (TM) domain • Formerly known as RTOS • Priority-driven multitasking • Prioritized event queue • Preemption • Finite State Machine (FSM) domain • Models component logic

  9. Conclusions • DE/FSM • TM/FSM • Future Work

More Related