tel-00553143, version 1 - 6 Jan 2011 106 Proposed system model and design-flow for SM synthesis .c .c .c Task C FSM.vhd Task B Task.c Compiler Front-end Tree-based Instruction Selection and Mapping Register Allocation FSM Generation Software Tasks Task A Micro-Task Synthesis Design- Flow CDFG-Level IR Assembly-Level IR Datapath.vhd Custom Datapath Model Application Task A Task C Task B Hardware Micro-Tasks .vhd .vhd .vhd .vhd System Micro-Task C Micro-Task B Micro-Task A Monitor Hardware Synthesis Tool Final IC Bitwidth Adaptation Assembly-Level IR Datapath Generation EMF-based RTL-Models for FSM and Datapath Code-Generation Tool Shared Mem Transistor Level Insertion of Power Gating Application.sysdesc Model Transformation Guard Expression Evaluation The design-flow dicussed in Chapter-5 EventA EventB Proposed Textual DSL for System- Level Description System Monitor Synthesis Design- Flow CDFG of Micro-Tasks EMF-based Intermediate Model of the System SM Generation EMF-based RTL-Model for System Monitor Code-Generation Tool SM.vhd Figure 5.1: Design-flow for hardware system monitor generation.
tel-00553143, version 1 - 6 Jan 2011 Basic execution paradigms in a WSN node 107 Poll sensor Process sensor data Poll RF transceiver Process received packet ... (a) Sequential execution paradigm Handle sensor process Handle packet process OS-controlled process switching ... (b) Process-based execution paradigm event5 Task-D event4 Task-A event1 event2 Task-C Task-B (c) Event-driven execution paradigm Figure 5.2: Different execution paradigms for a WSN node system. event3 specific requirement of these systems. In particular, energy-efficient execution requires support for energy management. Similarly, external components (e.g. sensors, radio transceiver, or timers) should be handled easily and efficiently, specially information that is available asynchronously (at any arbitrary time-instance) must be handled. There are three possible approaches to handle such tasks in conventional embedded systems . In the following discussion, we briefly explore these approaches. 5.1.1 Sequential approach The first and the simplest approach to handle tasks in a system is the sequential approach. For example, a system could poll a sensor to decide whether some data is available and process the data right away, then poll the radio to check whether a packet is available, and process the packet, and so on (as shown in Figure 5.2 (a)). However, such a simple model risks of missing data while a packet is processed or missing a packet when sensor information is processed. This risk is particularly large if the sensor-data processing or incoming-packet processing takes substantial amount of time, which can easily be the case. Hence, a simple, sequential approach is clearly insufficient. 5.1.2 Process-based approach Most modern, general-purpose OS support concurrent (quasi-parallel) execution of multiple processes on a single processor. Hence, such a process-based approach would be the first candidate to support concurrency in a sensor node as well. The approach is shown in Figure 5.2 (b) where different processes are run on a single resource (an MCU) and their switching is controlled by an OS. While indeed this approach works in principle, mapping such an execution model of concurrent processes to a sensor node