48
Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

  • Upload
    isleen

  • View
    43

  • Download
    3

Embed Size (px)

DESCRIPTION

Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2. Teacher: Ju xiaoming ( 琚小明 ) Office: B219 Tel: 62233155-834 Email: [email protected] PPT download: 202.120.91.126 seidown download 21. Textbook: - PowerPoint PPT Presentation

Citation preview

Page 1: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

Computers as Components:Principles of Embedded Computing

System Design

Xiaoming JU

2005.2

Page 2: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 2

Teacher: Ju xiaoming ( 琚小明 )Office: B219Tel: 62233155-834Email: [email protected]

PPT download:202.120.91.126

seidown download 21

Page 3: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 3

Textbook: W. Wolf, Computers as Components: Principles of Embedded Computing System Design, 2001, Academic Press.

Reference books: 1. Berger Arnold. 吕骏 译 . 嵌入式系统设计 . 北京:电子工业出版社, 2002.2. 王田苗 . 嵌入式系统设计与实例开发--基于 ARM 微处理器与 µC/OS-II 实时操作系统(第 2 版) . 北京:清华大学出版社, 2003.

Network :http://www.embed.com.cn/http://www.embedded.com/http://www.esconline.com/http://www.laogu.com/http://www.embedworld.com/http://www.pocketix.com/

Page 4: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 4

outlineIntroduction to Embedded Systems Models and Architectures for Embedded

System Specification Specification Languages for Embedded

System Design A Specification Example: Telephone

Answering Machine Embedded System PlatformSystem-Design Methodology

Page 5: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 5

gradingAttendance and homework 10%Paper Reading, Final Presentation

and Report 30%Final Exam 60%

Page 6: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 6

IntroductionWhat are embedded systems?Challenges in embedded computing

system design.Design methodologies.

Page 7: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 7

Definition (P.1)Embedded system: any device that

includes a programmable computer but is not itself a general-purpose computer.

Take advantage of application characteristics to optimize the design: don’t need all the general-purpose bells

and whistles.

Page 8: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 8

Embedding a computer

CPU

mem

input

output analog

analog

embeddedcomputer

Page 9: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 9

ExamplesPersonal digital assistant (PDA).Printer.Cell phone.Automobile: engine, brakes, dash, etc.Television.Household appliances.PC keyboard (scans keys).

Page 10: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 10

Early history (P.2)Late 1940’s: MIT Whirlwind computer

was designed for real-time operations. Originally designed to control an aircraft

simulator.First microprocessor was Intel 4004 in

early 1970’s.HP-35 calculator used several chips to

implement a microprocessor in 1972.

Page 11: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 11

Early history, cont’d.Automobiles used microprocessor-

based engine controllers starting in 1970’s. Control fuel/air mixture, engine timing,

etc. Multiple modes of operation: warm-up,

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

efficiency.

Page 12: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 12

Microprocessor varietiesMicrocontroller: includes I/O devices,

on-board memory.Digital signal processor (DSP):

microprocessor optimized for digital signal processing.

Typical embedded word sizes: 8-bit, 16-bit, 32-bit.

Page 13: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 13

Application examples (P.2)Simple control: front panel of

microwave oven, etc.Canon EOS 3 camera has three

microprocessors. One of 32-bit RISC CPU runs autofocus and

eye control systems.Analog TV: channel selection, etc.Digital TV: programmable CPUs +

hardwired logic.

Page 14: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 14

Automotive embedded systemsToday’s high-end automobile may

have 100 microprocessors: 4-bit microcontroller checks seat belt; microcontrollers run dashboard devices; 16/32-bit microprocessor controls

engine.

Page 15: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 15

BMW 850i brake and stability control system (P.3)Anti-lock brake system (ABS): pumps

brakes to reduce skidding.Automatic stability control (ASC+T):

controls engine to improve stability.ABS and ASC+T communicate.

ABS was introduced first---needed to interface to existing ABS module.

Page 16: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 16

BMW 850i, cont’d.

brake

sensor

brake

sensor

brake

sensor

brake

sensor

ABS hydraulicpump

Page 17: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 17

Characteristics of embedded systems (P.3)Sophisticated functionality.Real-time operation.Low manufacturing cost.Low power.Designed to tight deadlines by small

teams.

Page 18: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 18

Functional complexityOften have to run sophisticated

algorithms or multiple algorithms. Cell phone, laser printer.

Often provide sophisticated user interfaces.

Page 19: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 19

Real-time operationMust finish operations by deadlines.

Hard real time: missing deadline causes failure.

Soft real time: missing deadline results in degraded performance.

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

Page 20: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 20

Non-functional requirementsMany embedded systems are mass-

market items that must have low manufacturing costs. Limited memory, microprocessor power,

etc.Power consumption is critical in battery-

powered devices. Excessive power consumption increases

system cost even in wall-powered devices.

Page 21: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 21

Design teams (P.4)Often designed by a small team of

designers.Often must meet tight deadlines.

6 month market window is common. Can’t miss back-to-school window for

calculator.

Page 22: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 22

Why use microprocessors? (P.4)

Alternatives: field-programmable gate arrays (FPGAs), custom logic, etc.

Microprocessors are often very efficient: can use same logic to perform many different functions.

Microprocessors simplify the design of families of products.

Page 23: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 23

The performance paradoxMicroprocessors use much more

logic to implement a function than does custom logic.

But microprocessors are often at least as fast: heavily pipelined; large design teams; aggressive VLSI technology.

Page 24: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 24

PowerCustom logic is a clear winner for low

power devices.Modern microprocessors offer

features to help control power consumption.

Software design techniques can help reduce power consumption.

Page 25: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 25

Challenges in embedded system design (P.5)How much hardware do we need?

How big is the CPU? Memory?How do we meet our deadlines?

Faster hardware or cleverer software?How do we minimize power?

Turn off unnecessary logic? Reduce memory accesses?

Page 26: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 26

Challenges, etc.Does it really work?

Is the specification correct? Does the implementation meet the spec? How do we test for real-time characteristics? How do we test on real data?

How do we work on the system? Observability, controllability? What is our development platform?

Page 27: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 27

Design methodologies (P.6)A procedure for designing a system.Understanding your methodology helps

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

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

Page 28: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 28

Design goals (P.7)Performance.

Overall speed, deadlines.Functionality and user interface.Manufacturing cost.Power consumption.Other requirements (physical size,

etc.)

Page 29: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 29

Levels of abstraction (P.7)requirements

specification

architecture

componentdesign

systemintegration

Top-down

Bottom-up

Page 30: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 30

Top-down vs. bottom-upTop-down design:

start from most abstract description; work to most detailed.

Bottom-up design: work from small components to big

system.Real design uses both techniques.

Page 31: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 31

Stepwise refinementAt each level of abstraction, we

must: analyze the design to determine

characteristics of the current state of the design;

refine the design to add detail; ensure all design objects.

Page 32: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 32

Requirements (P.8)Plain language description of what

the user wants and expects to get.May be developed in several ways:

talking directly to customers; talking to marketing representatives; providing prototypes to users for

comment.

Page 33: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 33

Functional vs. non-functional requirementsFunctional requirements:

output as a function of input.Non-functional requirements:

time required to compute output; size, weight, etc.; power consumption; reliability; etc.

Page 34: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 34

Our requirements form (P.9)namepurposeinputsoutputsfunctionsperformancemanufacturing costpowerphysical size/weight

Page 35: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 35

Example: GPS moving map requirements (P.10)Moving map

obtains position from GPS, paints map from local database.

lat: 40°13′ lon: 32°19′

I-78

Scot

ch R

oad

Display position

Current position

Page 36: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 36

GPS moving map needsFunctionality: For automotive use. Show

major roads and landmarks.User interface: At least 400 x 600 pixel

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

No more than 1 sec power-up. Lock onto GPS within 15 seconds.

Cost: $500 street price = approx. $100 cost of goods sold.

Page 37: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 37

GPS moving map needs, cont’d.Physical size/weight: Should fit in

hand.Power consumption: Should run for 8

hours on four AA batteries.

Page 38: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 38

GPS moving map requirements form (P.10)

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 39: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 39

Specification (P.11)A more precise description of the system:

should not imply a particular architecture; provides input to the architecture design

process.May include functional and non-

functional elements.May be executable or may be in

mathematical form for proofs.

Page 40: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 40

GPS specificationShould include:

What is received from GPS; map data; user interface; operations required to satisfy user

requests; background operations needed to keep

the system running.

Page 41: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 41

Architecture design (P.11)What major components go satisfying

the specification?Hardware components:

CPUs, peripherals, etc.Software components:

major programs and their operations.Must take into account functional and

non-functional specifications.

Page 42: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 42

GPS moving map block diagram (P.12)

GPSreceiver

searchengine renderer

userinterfacedatabase

display

Page 43: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 43

GPS moving map hardware architecture

GPSreceiver

CPU

panel I/O

display framebuffer

memory

Page 44: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 44

GPS moving map software architecture

position databasesearch renderer

timeruserinterface

pixels

Page 45: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 45

GPS

Page 46: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 46

Designing hardware and software components (P.13)Must spend time architecting the

system before you start coding.Some components are

ready-made, some can be modified from existing

designs, others must be designed from scratch.

Page 47: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 47

System integration (P.13)Put together the components.

Many bugs appear only at this stage.Have a plan for integrating

components to uncover bugs quickly, test as much functionality as early as possible.

Page 48: Computers as Components: Principles of Embedded Computing System Design Xiaoming JU 2005.2

© 2005 ECNU SEI Principles of Embedded Computing System Design 48

SummaryEmbedded computers are all around us.

Many systems have complex embedded hardware and software.

Embedded systems pose many design challenges: design time, deadlines, power, etc.

Design methodologies help us manage the design process.