SDL Implementations for Wireless Sensor Networks Incorporation of - - PowerPoint PPT Presentation

sdl implementations for wireless sensor networks
SMART_READER_LITE
LIVE PREVIEW

SDL Implementations for Wireless Sensor Networks Incorporation of - - PowerPoint PPT Presentation

SDL Implementations for Wireless Sensor Networks Incorporation of PragmaDevs RTDS into the Deterministic Protocol Stack BiPS Tobias Braun, Dennis Christmann, Reinhard Gotzhein, Alexander Mater {tbraun, christma, gotzhein,


slide-1
SLIDE 1

SDL Implementations for Wireless Sensor Networks

Incorporation of PragmaDev’s RTDS into the Deterministic Protocol Stack BiPS Tobias Braun, Dennis Christmann, Reinhard Gotzhein, Alexander Mater {tbraun, christma, gotzhein, a_mater09}@cs.uni-kl.de http://vs.cs.uni-kl.de 2014-09-30 – SAM 2014, Valencia, Spain

slide-2
SLIDE 2

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Outline

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

1 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-3
SLIDE 3

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Motivation

◮ challenges of modern (wireless) sensor systems

◮ efficiency ◮ energy ◮ storage ◮ predictability ◮ communication: Transfer rates, delays, . . . ◮ software implementations: Run-time, waiting times ◮ complexity ◮ reuse ◮ determinism ◮ . . . 2 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-4
SLIDE 4

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Motivation

◮ challenges of modern (wireless) sensor systems

◮ efficiency → manual implementation ◮ energy ◮ storage ◮ predictability → manual implementation ◮ communication: Transfer rates, delays, . . . ◮ software implementations: Run-time, waiting times ◮ complexity → model-driven implementation ◮ reuse → model-driven implementation ◮ determinism → manual implementation ◮ . . . 2 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-5
SLIDE 5

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Motivation

◮ challenges of modern (wireless) sensor systems

◮ efficiency → manual implementation ◮ energy ◮ storage ◮ predictability → manual implementation ◮ communication: Transfer rates, delays, . . . ◮ software implementations: Run-time, waiting times ◮ complexity → model-driven implementation ◮ reuse → model-driven implementation ◮ determinism → manual implementation ◮ . . .

  • bjective: Find a trade-off combining the benefits of manual and

model-driven implementations

2 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-6
SLIDE 6

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Hybrid Design: Model-driven vs. Hand-written

SDL (RTDS) BiPS hardware ◮ Specification and Description Language (SDL)

◮ language for the specification of distributed

systems

◮ tool support for model-driven implementations

⇒ use for applications and higher-layer protocols

3 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-7
SLIDE 7

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Hybrid Design: Model-driven vs. Hand-written

SDL (RTDS) BiPS hardware ◮ Specification and Description Language (SDL)

◮ language for the specification of distributed

systems

◮ tool support for model-driven implementations

⇒ use for applications and higher-layer protocols

◮ Black burst-integrated Protocol Stack (BiPS)

◮ protocol framework for wireless sensor nodes ◮ operating system functionalities ◮ manual bare implementation for Imote2

⇒ use for hardware-related functionality and time-critical (MAC) protocols

3 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-8
SLIDE 8

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Hybrid Design: Model-driven vs. Hand-written

SDL (RTDS) BiPS hardware ◮ Specification and Description Language (SDL)

◮ language for the specification of distributed

systems

◮ tool support for model-driven implementations

⇒ use for applications and higher-layer protocols

◮ Black burst-integrated Protocol Stack (BiPS)

◮ protocol framework for wireless sensor nodes ◮ operating system functionalities ◮ manual bare implementation for Imote2

⇒ use for hardware-related functionality and time-critical (MAC) protocols

3 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-9
SLIDE 9

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Black burst-integrated Protocol Stack

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

4 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-10
SLIDE 10

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

BiPS – (Deterministic) Protocols

◮ BBS – Synchronization protocol with bounded offset ◮ RB – reservation-based MAC (TDMA) ◮ CB – contention-based MAC (CSMA/CA) ◮ . . .

SDL (RTDS) BiPS hardware

sensor application, control algorithm, ... HW timers, GPIO, DMA,... transceiver (CC2420) UART,LED,... clustering, routing, middleware... MAC BBS ACTP RB CB MB black burst 1 - drivers 0 - system software 2 - protocols 4 - applications 3 - higher-layer protocols schedulers app (BAS) communication (BCS) multiplexer

BiPS

5 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-11
SLIDE 11

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

BiPS – Operating System Functionalities

◮ hardware drivers ◮ schedulers

◮ BiPS Communication Scheduler (BCS) ◮ BiPS Application Scheduler (BAS)

SDL (RTDS) BiPS hardware

sensor application, control algorithm, ... HW timers, GPIO, DMA,... transceiver (CC2420) UART,LED,... clustering, routing, middleware... MAC BBS ACTP RB CB MB black burst 1 - drivers 0 - system software 2 - protocols 4 - applications 3 - higher-layer protocols schedulers app (BAS) communication (BCS) multiplexer

BiPS

6 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-12
SLIDE 12

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Incorporation of SDL into BiPS

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

7 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-13
SLIDE 13

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Incorporation of SDL into BiPS – Integration Steps

◮ integration steps

  • 1. schedule the SDL system with BAS
  • 2. interface the SDL environment with BiPS

SDL (RTDS) BiPS hardware

sensor application, control algorithm, ... HW timers, GPIO, DMA,... transceiver (CC2420) UART,LED,... clustering, routing, middleware... MAC BBS ACTP RB CB MB black burst 1 - drivers 0 - system software 2 - protocols 4 - applications 3 - higher-layer protocols schedulers app (BAS) communication (BCS) multiplexer

BiPS SDL C++

1 2 2 2

8 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-14
SLIDE 14

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Incorporation of SDL into BiPS

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

9 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-15
SLIDE 15

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – Overview

◮ tasks of an SDL scheduler

◮ serialize SDL transition executions ◮ deliver SDL signals inter and intra SDL systems ◮ manage SDL timers 10 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-16
SLIDE 16

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – Overview

◮ tasks of an SDL scheduler

◮ serialize SDL transition executions ◮ deliver SDL signals inter and intra SDL systems ◮ manage SDL timers

◮ integration approach

◮ single task scheduling

→ PragmaDev’s rtosless template

◮ adoption of PragmaDev’s CPPScheduler for intra-task scheduling

→ BiPS SDL Scheduler (BSS)

◮ signal-based (FIFO) ◮ non-preemptive execution of transitions ◮ scheduling of BSS as application of BAS ◮ SDL system runs with lower priority than BCS ◮ interruptible execution of the SDL system in favor of BiPS protocols 10 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-17
SLIDE 17

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – BSS in BiPS

BiPS

SDL system

OS template BiPS SDL Scheduler (BSS)

Process A Process B

SDL Environment Framework

schedulers app (BAS) BCS

1 - drivers 2 - protocols 0 - system software 3/4 - higher-layer protocols / applications 11 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-18
SLIDE 18

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – Comments on BSS

◮ realization of SDL time (NOW)

◮ derivation from hardware clock ◮ fine-grained (1 µs )

TIMER ti; DCL p Duration := 100; DCL t Time; wait t := NOW + p; SET(t, ti); /* Perform operations */

12 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-19
SLIDE 19

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – Comments on BSS

◮ realization of SDL time (NOW)

◮ derivation from hardware clock ◮ fine-grained (1 µs )

◮ incorporation of SDL timers

◮ SDL SET with absolute time values ◮ delegation to timer system of BAS

→ setup of hardware timer

◮ expiration of timer by hardware interrupt

→ execution of BSS after interrupt mode

TIMER ti; DCL p Duration := 100; DCL t Time; wait t := NOW + p; SET(t, ti); /* Perform operations */

12 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-20
SLIDE 20

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – Comments on BSS

◮ realization of SDL time (NOW)

◮ derivation from hardware clock ◮ fine-grained (1 µs )

◮ incorporation of SDL timers

◮ SDL SET with absolute time values ◮ delegation to timer system of BAS

→ setup of hardware timer

◮ expiration of timer by hardware interrupt

→ execution of BSS after interrupt mode

◮ processing of external events

◮ announced by hardware interrupts ◮ execution of BSS via BAS after interrupt mode

TIMER ti; DCL p Duration := 100; DCL t Time; wait t := NOW + p; SET(t, ti); /* Perform operations */

12 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-21
SLIDE 21

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Scheduling the SDL System – Mode of Operation

wakeup ExecuteSDLSystem update SDL time create timer signals for expired timers execute scheduled Environment enqueue into SDL signal queue get signal from signal queue get timestamp of next timer timestamp execute signal transition timers expired? signal queue empty? timer queue empty? false true false false true true true false

BSS BAS

is signal from can- celled timer? schedule wakeup at timestamp 13 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-22
SLIDE 22

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Incorporation of SDL into BiPS

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

14 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-23
SLIDE 23

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Interfacing the SDL Environment – Overview

◮ tasks of the SDL environment

◮ providing access to hardware peripherals from within SDL systems ◮ transfer data to/from peripherals ◮ trigger the execution of the system in consequence of external events 15 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-24
SLIDE 24

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Interfacing the SDL Environment – Overview

◮ tasks of the SDL environment

◮ providing access to hardware peripherals from within SDL systems ◮ transfer data to/from peripherals ◮ trigger the execution of the system in consequence of external events

◮ realization as SDL process → Environment Core Process (ECP)

◮ runs under control of BSS ◮ sub-divided into Environment Core Components (ECCs) ◮ access to BiPS functionality (drivers, protocols) ◮ interaction with SDL system via SDL signals ◮ consists of interface definition (SDL package) and implementation (C++) 15 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-25
SLIDE 25

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Interfacing the SDL Environment – Architecture

BiPS

SDL system

OS template BiPS SDL Scheduler (BSS)

Process A Process B Environment Core Process (ECP)

UART multiplexer

UART-ECC interface definition UART-ECC implementation

UART-ECC

TO-ECC interface definition TO-ECC implementation

TO-ECC

SDL Environment Framework

schedulers app (BAS) BCS

1 - drivers 2 - protocols 0 - system software 3/4 - higher-layer protocols / applications 16 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-26
SLIDE 26

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Interfacing the SDL Environment – Initialization of ECCs

SDL Process P1 ECP BIPS UART-ECC notifySignal(UART_Init(...)) UART_Init(port1) registerSignal(UART_Send,this) registerSignal(UART_Init,this) new UART-ECC(this) registerCallback (UART_REC, port1)

  • 1. ECP creates required ECCs depending on declared SDL signals

17 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-27
SLIDE 27

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Interfacing the SDL Environment – Initialization of ECCs

SDL Process P1 ECP BIPS UART-ECC notifySignal(UART_Init(...)) UART_Init(port1) registerSignal(UART_Send,this) registerSignal(UART_Init,this) new UART-ECC(this) registerCallback (UART_REC, port1)

  • 1. ECP creates required ECCs depending on declared SDL signals
  • 2. ECC registers responsible signals at ECP

17 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-28
SLIDE 28

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Interfacing the SDL Environment – Initialization of ECCs

SDL Process P1 ECP BIPS UART-ECC notifySignal(UART_Init(...)) UART_Init(port1) registerSignal(UART_Send,this) registerSignal(UART_Init,this) new UART-ECC(this) registerCallback (UART_REC, port1)

  • 1. ECP creates required ECCs depending on declared SDL signals
  • 2. ECC registers responsible signals at ECP
  • 3. ECP forwards signal to registered ECC

17 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-29
SLIDE 29

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Evaluation

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

18 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-30
SLIDE 30

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Evaluation – Scenario

◮ objectives

  • 1. functional evaluation
  • 2. quantification of integration’s advantage over

pure SDL solution

◮ Scenario

1s synch phase 100ms 50ms transmission slot master slave 1 slave 2 ...

◮ realizations

  • 1. SDL only (w/o BBS and MAC protocols of BiPS)
  • 2. full SDL/BiPS integration

19 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-31
SLIDE 31

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Evaluation – Results

−10 10 20 30 synch offset [µs]

SDL SDL/BiPS

w/o load

SDL SDL/BiPS

w/ load

synchronization offset (slaves only)

20 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-32
SLIDE 32

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Evaluation – Results

−10 10 20 30 synch offset [µs]

SDL SDL/BiPS

w/o load

SDL SDL/BiPS

w/ load

synchronization offset (slaves only)

50 100 150 200 250

deviation [µs]

SDL SDL/BiPS

w/o load

SDL SDL/BiPS

w/ load

temporal deviation of data frames

20 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-33
SLIDE 33

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Conclusions

1

Introduction

2

BiPS

3

Incorporation of SDL into BiPS Scheduling the SDL System Interfacing the SDL Environment

4

Evaluation

5

Conclusions

21 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-34
SLIDE 34

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Conclusions

◮ results of incorporating SDL into BiPS

◮ BSS: extended SDL scheduler under control of BiPS ◮ extendible and modular environment framework 22 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-35
SLIDE 35

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Conclusions

◮ results of incorporating SDL into BiPS

◮ BSS: extended SDL scheduler under control of BiPS ◮ extendible and modular environment framework

◮ lessons learned

  • 1. hybrid approaches have advantages w.r.t. efficiency and predictability
  • 2. BiPS is an adequate framework and basis for SDL
  • 3. RTDS provides a flexible interface for new software platforms

22 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-36
SLIDE 36

Introduction BiPS Incorporation of SDL into BiPS Evaluation Conclusions

Conclusions

◮ results of incorporating SDL into BiPS

◮ BSS: extended SDL scheduler under control of BiPS ◮ extendible and modular environment framework

◮ lessons learned

  • 1. hybrid approaches have advantages w.r.t. efficiency and predictability
  • 2. BiPS is an adequate framework and basis for SDL
  • 3. RTDS provides a flexible interface for new software platforms

◮ future work

◮ more sophisticated scheduling strategies 22 / 22 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-37
SLIDE 37

SDL Environment – Signals from External Events

SDL Process P1 BSS ECP UART-ECC BIPS UART_Receive(port1, message) wakeup EVENT_emit eventWakeup scheduleWakeup sendMessage(P1, UART_Receive) forwardSignal(P1, UART_Receive) UART_REC(port1,message) UART Interrupt Interrupt Context

1 / 3 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-38
SLIDE 38

BiPS – Multiplexer with Transmission Opportunities (TOs)

super slot

BBS synch phase

  • virt. slot

region

app 1 app 2

TX TO id = 10 prio = 0 TX TO id = 3 prio = 1 TX TO id = 4 prio = 0 RX TO id = 2 setData() RX TO id = 0 rxCallback() setData() / rxCallback() e n q u e u e ( ) callback() enqueue() callback() callback() enqueue()

macro slot RB ACTP CB

2 / 3 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern

slide-39
SLIDE 39

SDL Environment: Class Diagram with Observer Pattern

+notifySignal(signal) EnvObserver +registerSignal(signalID, observer) EnvSubject +forwardSignal(processID, signal) +scheduleWakeup() +registerForExecution(ecc) ECP RTDS_Env_proc +execute() ECC 0..* 1 0..* 0..* 0..*

  • bserver

* forwardSignal register notify 3 / 3 SAM 2014 - T. Braun, D. Christmann, R. Gotzhein, A. Mater – University of Kaiserslautern