+ overview of embedded systems & embedded software engineering csci 589: software engineering...

55
+ Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

Upload: madlyn-chandler

Post on 03-Jan-2016

259 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

Overview of Embedded Systems& Embedded Software Engineering

CSCI 589:Software Engineering for Embedded Systems

Page 2: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Software Qualities

Qualities (a.k.a. “ilities”) are goals in the practice of software engineering

External vs. Internal qualities Product vs. Process qualities

Page 3: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+External vs. Internal Qualities

External qualities are visible to the user reliability, efficiency, usability

Internal qualities are the concern of developers they help developers achieve external qualities verifiability, maintainability, extensibility, evolvability,

adaptability

Page 4: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Product vs. Process Qualities

Product qualities concern the developed artifacts maintainability, understandability, performance

Process qualities deal with the development activity products are developed through process maintainability, productivity, timeliness

Page 5: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities

Correctness ideal quality established w.r.t. the requirements specification absolute

Reliability statistical property probability that software will operate as expected

over a given period of time relative

Page 6: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities (cont.)

Robustness “reasonable” behavior in unforeseen

circumstances subjective a specified requirement is an issue of correctness;

an unspecified requirement is an issue of robustness

Usability ability of end-users to easily use software extremely subjective

Page 7: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities (cont.)

Understandability ability of developers to easily understand produced

artifacts internal product quality subjective

Verifiability ease of establishing desired properties performed by formal analysis or testing internal quality

Page 8: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities (cont.)

Performance equated with efficiency assessable by measurement, analysis, and

simulation

Evolvability ability to add or modify functionality addresses adaptive and perfective maintenance problem: evolution of implementation is too easy evolution should start at requirements or design

Page 9: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities (cont.)

Reusability ability to construct new software from existing pieces must be planned for occurs at all levels: from people to process, from

requirements to codeInteroperability

ability of software (sub)systems to cooperate with others

easily integratable into larger systems common techniques include APIs, plug-in protocols,

etc.

Page 10: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities (cont.)

Scalability ability of a software system to grow in size while

maintaining its properties and qualities assumes maintainability and evolvability goal of component-based development

Page 11: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Some Software Qualities (cont.)

Heterogeneity ability to compose a system from pieces developed in

multiple programming languages, on multiple platforms, by multiple developers, etc.

necessitated by reuse goal of component-based development

Portability ability to execute in new environments with minimal effort may be planned for by isolating environment-dependent

components necessitated by the emergence of highly-distributed systems

(e.g., the Internet) an aspect of heterogeneity

Page 12: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Software Process Qualities

Process is reliable if it consistently leads to high-quality products

Process is robust if it can accommodate unanticipated changes in tools and environments

Process performance is productivityProcess is evolvable if it can accommodate new

management and organizational techniquesProcess is reusable if it can be applied across

projects and organizations

Page 13: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Assessing Software Qualities

Qualities must be measurable Measurement requires that qualities be precisely defined Improvement requires accurate measurement Currently most qualities are informally defined and are

difficult to assess

Page 14: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Software Engineering “Axioms”

Adding developers to a project will likely result in further delays and accumulated costs

Basic tension of software engineering better, cheaper, faster — pick any two functionality, scalability, performance — pick any two

The longer a fault exists in software the more costly it is to detect and correct the less likely it is to be properly corrected

Up to 70% of all faults detected in large-scale software projects are introduced in requirements and design detecting the causes of those faults early may reduce their

resulting costs by a factor of 100 or more

Page 15: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

Embedded Software

Interaction with physical world

Executes on devices, not “computers”

Written by engineers who are domain experts

Current methods offered by computer scientists are not always satisfactory

Complexity and size of embedded software are growing rapidly severe constraints remain

Page 16: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Properties of Embedded Software Timeliness

speed up in software not hardware

Concurrency Predictability and adaptability

Liveness Non-terminating

Interfaces Processes not procedures

Heterogeneity Reactivity

Continuously changing to adapt to changing environment

Page 17: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+What Is an Embedded System?

A computer whose end function is not to be a computer Automobiles

ABS “radio” Engine

Digital cameras Household appliances TVs

A combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function.

Page 18: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Put Another Way

An embedded system is a specialized computer system that is usually integrated as part of a larger system consists of a combination of hardware and software

components forms a computational engine performs a specific function constrained in its application reactive time-constrained

Page 19: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ Modern Embedded Systems

Novel computing platforms Smart phones Mobile robots Motes Sensors

Novel usage scenarios Search-and-rescue Environment exploration Traffic management Medicine / Assisted living Wireless sensor nets Mobile grids

Novel SE challenges Distribution Decentralization Mobility Heterogeneity Resource constraints Context awareness Real-time requirements

Page 20: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Typical Embedded System

Page 21: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Reactive Systems

Respond to the environment via sensors

Control the environment using actuators

Must achieve performance consistent with the environment periodic vs. aperiodic eventse

Page 22: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Embedded Systems Functions

Monitor and react to environment

Control the environment

Process information

Application-specific behavior

Optimization

Resource-economy

Real-time performance

Multi-rate performance

Page 23: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Interfacing with the Environment

Page 24: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Car Window Lift Aided by Sensors

Page 25: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Car Window Lift – Software Design

Page 26: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Car Front Light Mgmt System

Page 27: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+More Cars

Page 28: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

Page 29: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Real-Time Computing

Page 30: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Car Shift Control System - HRTC

Page 31: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Traditional vs. RT Systems

System capacity High throughput

vs. Schedulability and ability to meet deadlines

Responsiveness Fast average

vs. Ensured worst-case latency and response time

Overload Fairness to all

vs. Stability, priority to important tasks

Page 32: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+RT Events

Asynchronous unpredictable

Synchronous predictable and precisely regular

Isochronous regular within a time window

Page 33: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+RT System Design Challenges

Response time factors Suitability of architecture Processing element power Communication speed Adequacy of scheduling system

Failure recovery causes processor failures board failures link failures invalid behavior of external environment interconnectivity failure

Page 34: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Building an Embedded System

Desktop

Embedded

Page 35: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Ferrari’s Build Process

Page 36: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Embedded vs. Desktop Systems

Energy efficiency

Custom power requirements

Security

Reliability

Environment extremes

Efficient UI

Page 37: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Hardware Abstraction Layer (HAL)

Page 38: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Embedded System Development

Page 39: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ Challenges for SE

Resource constraints Demand highly efficient computation, communication, and

memory footprint Demand unorthodox solutions

e.g., off-loading components

Hardware and software heterogeneity Proprietary operating systems Dialects of programming languages Device-specific data formats Lack of support for inter-device interaction Lack of support for code mobility

Page 40: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ From Design to Implementation

Architectures provide high-level concepts Components, connectors, ports, events, configurations

Programming languages provide low-level constructs Variables, arrays, pointers, procedures, objects

Bridging the two often is an art-form Middleware can help “split the difference”

Existing middleware technologies Support some architectural concepts (e.g., components, events) but not others (e.g., connectors, configurations) Impose particular architectural styles

End result architectural erosion Architecture does not match the implementation

Page 41: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ How do we get from

Page 42: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ How do we get from

Page 43: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

to

How do we get from

Page 44: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

to

?

to

How do we get from

Page 45: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Architectural Middleware

Native support for architectural concepts as middleware constructs

System design support via an accompanying ADL

Quality assurance via analysis and simulation of architectural models

Round-trip development from architecture to implementation and back

Automated transformation of architectural models to implementations

Page 46: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ Prism-MW

An architectural middleware for ES

Supports architecture-based software development Implementation of a software system in terms of

its architectural elements

Efficient

Scalable

Flexible and Extensible Allows us to cope with heterogeneity

Supports arbitrary architectural styles

Page 47: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ Architectural Middleware Architecture

Page 48: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ Prism-MW Design

Page 49: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

Architecture – Ar1

class DemoArch { static public void main(String argv[]) { Architecture arch = new Architecture (”Ar1");

// create componentsComponent a = new CompA ("A");Component b = new CompB ("B");Component c = new CompC (“C");// create connectorsConnector d = new Connector(“D");// add components and connectors arch.addComponent(a);arch.addComponent(b);arch.addComponent(c);arch.addConnector(d);// establish the interconnectionsarch.attach(a, d);arch.attach(b, d);arch.attach(d, c);}

}

Using Prism-MW

Comp BComp A

Comp C

Connector D

Connector D

Comp A Comp B Comp C

Page 50: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

Architecture - DEMO

Component B handles the event and sends a response

public void handle(Event e){

if (e.equals("Event_C")) {... Event e1= new Event("RSP_to_C“, REPLY);e1.addParameter("response", resp);send(e1);}...

}

Send

(e1)

Using Prism-MW

Component C sends an event

Event e = new Event ("Event_C“, REQUEST);e.addParameter("param_1", p1);send (e);

Send

(e)

Comp BComp A

Comp C

Connector D

Page 51: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+

Connector D

Event Dispatching

Comp BComp A

Comp C

E1

E2

E3

E4

E5

send

Eve

ntha

ndle

Eve

nt

Thread Pool

E

X EX

Scaffold

Topology-based routing Easy redeployment and redistribution of

components onto different hardware configurations

2E

Page 52: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ Prism-MW Performance

Efficiency

• 1750 SLOC

• 4600 B for the core

• 160 B per component

• 240 B per connector

• 70 B per weld

• 160 B per event

• 240 B per event parameter

100 001 components100 000 connectors

Total event roundtrip time 2.7 sec

Scalability

• Numbers of devices, threads and eventsnot limited by Prism-MW

• Numbers of components and connectors

available_memory – middleware_size

average_element_size

Page 53: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+Prism-MW Benchmarks on a

PC

Page 54: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+ External Adoption

Troops Deployment SimulationUS Army

MIDASBosch Research and Technology Center

Page 55: + Overview of Embedded Systems & Embedded Software Engineering CSCI 589: Software Engineering for Embedded Systems

+MIDAS Architecture