Chapter 16
Component based embedded
systems
Building Reliable Componentbased
Overview
Introduction
Component technology in embedded systems
Case study – ABB’s Field Devices
Prerequisites for effective development of Componentbased embedded systems
Summary
Building Reliable Componentbased
Where is the problem?
Huge market arises for embedded devices, and thus for
software for them
Similar basic functionalities are repeated
New functionalities are added constantly
Shorter development time is required
Building Reliable Componentbased
Introduction
Building Reliable Componentbased
Embedded vs. Component-based
Monolithic approach
requires re-implementing
the functionalities
Embedded devices
are too small for
component offthe
shelf technologies
Component based SE
provides a mean to reuse
the functionalities
Component based SE
can provide a
framework instead of
technology
Building Reliable Componentbased
Component technology in embedded
world
Contractually specified interfaces
Component as a unit of composition and independent
deployment
Explicit context dependencies
Component granularity
Reuse
Location transparency
Component wiring
Portability, platform independence
Building Reliable Componentbased
Contractually specified interfaces
State-of-the-art technologies approach:
Interfaces as pure collection of methods.
• Embedded environment constraint:
Nonfunctional specifications are equally
important part of the contract
Building Reliable Componentbased
Interfaces II
Component interfaces support:
Late binding,
Polymorphism,
Semantic specification
Pre conditions,
Post conditions,
Invariants
Building Reliable Componentbased
Unit of composition and independent
deployment
Run-time composition
Component model,
Run-time environment,
Dynamic communication,
Design-time composition
Capable of generating
monolithic firmware from
component-based design,
Optimization
Building Reliable Componentbased
Explicit context dependencies
What is a context in embedded world?
Other components and interfaces
Run-time environment
CPU,
RTOS,
Component implementation language,
Resource constraints
Building Reliable Componentbased
Component granularity
Coarse-grained components,
Fine-grained components,
Too heavy bag of
unnecessary functionality,
Light, unneeded functionality
reduced,
Too much resources used,
Scarcer uses of resources,
Greater communication
overhead,
Building Reliable Componentbased
Reuse
Black-box reuse
From component’s user point of view,
White-box reuse
From composition environment point of view
Gray-box reuse (composition environment)
If clear conventions for knowledge about implementation
are introduced
Building Reliable Componentbased
Architecture and frameworks
Defining components alone will not lead to reuse
Common architecture for family of embedded devices
Framework for development
Building Reliable Componentbased
Portability, Platform independence
Source level portability suffices,
Design-time composition,
Run-time environment restrictions
Source level portability requires:
Agreement on implementation language,
Agreement on available libraries,
Providing proper abstractions (i.e. RTOS API)
Building Reliable Componentbased
Other issues
Location transparency
For embedded devices there is a single location,
Component wiring
Needed for flexible composition of software,
Optimizes component interaction,
Component ”glue code” should be in implementation
language
Building Reliable Componentbased
Case study – ABB’s Field devices
Synchronous approach
Architecture of the field devices
Dynamic behavior
Inter-component communication
Building Reliable Componentbased
Synchronous approach
Synchronous languages have been developed to simplify
the programming of reactive systems
Provide the mean to handle concurrency, determinism,
response time control
Based on synchrony hypothesis
Building Reliable Componentbased
Architecture of the field device
Block Container
Scheduler
AO Function Block
SP
AO
Algorithm
Transducer Block
OUT
MODE
OUT_CHAN
READBACK
IN_CHAN
POS_VALUE
CTRL_PAR
I/O
HW
FEEDBACK
Profibus PA Mapper
Pos
Control
Pos
Measure.
AccessManager
Profibus PA Stack
Display, Buttons
Local Operation
Persistent Storage
PC/Handheld-Interface
Building Reliable Componentbased
Dynamic behavior
manipulated
variable
(3)
a)
setpoint
Controlled
System
Controller
(2)
actual
value
(1)
b)
Sensors
(1)
PID
(2)
Building Reliable Componentbased
out
out
error
Setpoint
Tv,Tv,kp
speed
speed
Signalbus
Actuator
(3)
Inter-component communication
Based on Signal Bus
Signal Bus communication is maintained by Object
Manager
Communication itself is based on signals
One source per signal
Building Reliable Componentbased
Types of Interfaces
User
Interface
(1)
(4)
Communication
Link
(2)
Realtime
System
(3)
Mass storage
Interface
Building Reliable Componentbased
Process
Interface
Prerequisites for effective development
Component model
Additionally must address non functional properties,
Allow for code generation,
Allow for efficient functional interfaces,
Allow for specification of architectural styles that
describe component connections and containment
relations,
Building Reliable Componentbased
Framework
Component
Model
Component-based
Architecture for
field devices
Component
Repository
Composition
environment
Building Reliable Componentbased
Run-time
environment
Prerequisites II
Component-based architecture for field devices
Framework,
Compile time optimizations,
Field-bus architecture,
Repository
Storage and retrieval of components,
Storage of non-functional properties, implementation,
support and test scripts,
Versioning
Building Reliable Componentbased
Prerequisites III
Composition environment
Constraint verification,
Component adaptation and code generation,
Composition techniques,
Definition of composition rules
Building Reliable Componentbased