What are embedded systems? Challenges in embedded ...

42
© 2000 Morgan Kaufman Overheads for Computers as Components Introduction zWhat are embedded systems? zChallenges in embedded computing system design. zDesign methodologies.

Transcript of What are embedded systems? Challenges in embedded ...

Page 1: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Introduction

zWhat are embedded systems?zChallenges in embedded computing

system design.zDesign methodologies.

Page 2: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Definition

zEmbedded system: any device that includes a programmable computer but is not itself a general-purpose computer.zTake advantage of application

characteristics to optimize the design:ydon’t need all the general-purpose bells and

whistles.

Page 3: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Embedding a computer

CPU

mem

input

output analog

analog

embeddedcomputer

Page 4: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Examples

zPersonal digital assistant (PDA).zPrinter.zCell phone.zAutomobile: engine, brakes, dash, etc.zTelevision.zHousehold appliances.zPC keyboard (scans keys).

Page 5: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Early history

zLate 1940’s: MIT Whirlwind computer was designed for real-time operations.yOriginally designed to control an aircraft

simulator.

zFirst microprocessor was Intel 4004 in early 1970’s.zHP-35 calculator used several chips to

implement a microprocessor in 1972.

Page 6: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Early history, cont’d.

zAutomobiles used microprocessor-based engine controllers starting in 1970’s.yControl fuel/air mixture, engine timing, etc.yMultiple modes of operation: warm-up,

cruise, hill climbing, etc.yProvides lower emissions, better fuel

efficiency.

Page 7: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Microprocessor varieties

zMicrocontroller: includes I/O devices, on-board memory.zDigital signal processor (DSP):

microprocessor optimized for digital signal processing.zTypical embedded word sizes: 8-bit, 16-

bit, 32-bit.

Page 8: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Application examples

zSimple control: front panel of microwave oven, etc.zCanon EOS 3 has three microprocessors.y32-bit RISC CPU runs autofocus and eye

control systems.

zAnalog TV: channel selection, etc.zDigital TV: programmable CPUs +

hardwired logic.

Page 9: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Automotive embedded systems

zToday’s high-end automobile may have 100 microprocessors:y4-bit microcontroller checks seat belt;ymicrocontrollers run dashboard devices;y16/32-bit microprocessor controls engine.

Page 10: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

BMW 850i brake and stability control system

zAnti-lock brake system (ABS): pumps brakes to reduce skidding.zAutomatic stability control (ASC+T):

controls engine to improve stability.zABS and ASC+T communicate.yABS was introduced first---needed to

interface to existing ABS module.

Page 11: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

BMW 850i, cont’d.

brake

sensor

brake

sensor

brake

sensor

brake

sensor

ABS hydraulicpump

Page 12: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Characteristics of embedded systems

zSophisticated functionality.zReal-time operation.zLow manufacturing cost.zLow power.zDesigned to tight deadlines by small

teams.

Page 13: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Functional complexity

zOften have to run sophisticated algorithms or multiple algorithms.yCell phone, laser printer.

zOften provide sophisticated user interfaces.

Page 14: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Real-time operation

zMust finish operations by deadlines.yHard real time: missing deadline causes

failure.ySoft real time: missing deadline results in

degraded performance.

zMany systems are multi-rate: must handle operations at widely varying rates.

Page 15: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Non-functional requirements

zMany embedded systems are mass-market items that must have low manufacturing costs.yLimited memory, microprocessor power, etc.

zPower consumption is critical in battery-powered devices.yExcessive power consumption increases

system cost even in wall-powered devices.

Page 16: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Design teams

zOften designed by a small team of designers.zOften must meet tight deadlines.y6 month market window is common.yCan’t miss back-to-school window for

calculator.

Page 17: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Why use microprocessors?

zAlternatives: field-programmable gate arrays (FPGAs), custom logic, etc.zMicroprocessors are often very efficient:

can use same logic to perform many different functions.zMicroprocessors simplify the design of

families of products.

Page 18: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

The performance paradox

zMicroprocessors use much more logic to implement a function than does custom logic.zBut microprocessors are often at least as

fast:yheavily pipelined;ylarge design teams;yaggressive VLSI technology.

Page 19: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Power

zCustom logic is a clear winner for low power devices.zModern microprocessors offer features to

help control power consumption.zSoftware design techniques can help

reduce power consumption.

Page 20: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Challenges in embedded system design

zHow much hardware do we need?yHow big is the CPU? Memory?

zHow do we meet our deadlines?yFaster hardware or cleverer software?

zHow do we minimize power?yTurn off unnecessary logic? Reduce memory

accesses?

Page 21: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Challenges, etc.

zDoes it really work?yIs the specification correct?yDoes the implementation meet the spec?yHow do we test for real-time characteristics?yHow do we test on real data?

zHow do we work on the system?yObservability, controllability?yWhat is our development platform?

Page 22: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Design methodologies

zA procedure for designing a system.zUnderstanding your methodology helps

you ensure you didn’t skip anything.zCompilers, software engineering tools,

computer-aided design (CAD) tools, etc., can be used to:yhelp automate methodology steps;ykeep track of the methodology itself.

Page 23: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Design goals

zPerformance.yOverall speed, deadlines.

zFunctionality and user interface.zManufacturing cost.zPower consumption.zOther requirements (physical size, etc.)

Page 24: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Levels of abstraction

requirements

specification

architecture

componentdesign

systemintegration

Page 25: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Top-down vs. bottom-up

zTop-down design:ystart from most abstract description;ywork to most detailed.

zBottom-up design:ywork from small components to big system.

zReal design uses both techniques.

Page 26: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Stepwise refinement

zAt each level of abstraction, we must:yanalyze the design to determine

characteristics of the current state of the design;yrefine the design to add detail.

Page 27: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Requirements

zPlain language description of what the user wants and expects to get.zMay be developed in several ways:ytalking directly to customers;ytalking to marketing representatives;yproviding prototypes to users for comment.

Page 28: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Functional vs. non-functional requirements

zFunctional requirements:youtput as a function of input.

zNon-functional requirements:ytime required to compute output;ysize, weight, etc.;ypower consumption;yreliability;yetc.

Page 29: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Our requirements form

namepurposeinputsoutputsfunctionsperformancemanufacturing costpowerphysical size/weight

Page 30: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

E xample: GPS moving map

requirements

zMoving map obtains position from GPS, paints map from local database.

lat: 40 13 lon: 32 19

I-78

Scotch Road

Page 31: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS moving map needs

zFunctionality: For automotive use. Show major roads and landmarks.zUser interface: At least 400 x 600 pixel

screen. Three buttons max. Pop-up menu.zPerformance: Map should scroll smoothly.

No more than 1 sec power-up. Lock onto GPS within 15 seconds.zCost: $500 street price = approx. $100

cost of goods sold.

Page 32: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS moving map needs, cont’d.

zPhysical size/weight: Should fit in dashboard.zPower consumption: Current draw

comparable to CD player.

Page 33: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS moving map requirements form

name GPS moving mappurpose consumer-grade

moving map for drivinginputs power button, two

control buttonsoutputs back-lit LCD 400 X 600functions 5-receiver GPS; three

resolutions; displayscurrent lat/lon

performance updates screen within0.25 sec of movement

manufacturing cost $100 cost-of-goods-sold

power 100 mWphysical size/weight no more than 2: X 6:,

12 oz.

Page 34: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Specification

zA more precise description of the system:yshould not imply a particular architecture;yprovides input to the architecture design

process.

zMay include functional and non-functional elements.zMay be executable or may be in

mathematical form for proofs.

Page 35: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS specification

zShould include:yWhat is received from GPS;ymap data;yuser interface;yoperations required to satisfy user requests;ybackground operations needed to keep the

system running.

Page 36: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Architecture design

zWhat major components go satisfying the specification?zHardware components:yCPUs, peripherals, etc.

zSoftware components:ymajor programs and their operations.

zMust take into account functional and non-functional specifications.

Page 37: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS moving map block diagram

GPSreceiver

searchengine renderer

userinterfacedatabase

display

Page 38: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS moving map hardware architecture

GPSreceiver

CPU

panel I/O

display framebuffer

memory

Page 39: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

GPS moving map software architecture

position databasesearch renderer

timeruserinterface

pixels

Page 40: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Designing hardware and software components

zMust spend time architecting the system before you start coding.zSome components are ready-made, some

can be modified from existing designs, others must be designed from scratch.

Page 41: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

System integration

zPut together the components.yMany bugs appear only at this stage.

zHave a plan for integrating components to uncover bugs quickly, test as much functionality as early as possible.

Page 42: What are embedded systems? Challenges in embedded ...

© 2000 Morgan Kaufman

Overheads for Computers as Components

Summary

zEmbedded computers are all around us.yMany systems have complex embedded

hardware and software.

zEmbedded systems pose many design challenges: design time, deadlines, power, etc.zDesign methodologies help us manage

the design process.